Video encoding is a process for making video files smaller using compression. The majority of video encoding services today are used for video consumption via the web.
You may see the term “transcoding” used interchangeably with “encoding.” Transcoding is the process of decoding (decompressing) from one codec then encoding (compressing) it into another. Encoding on its own really only happens when the video is first captured, from light into something digital. Otherwise, you're usually transcoding from one format to another. So even though most people call it just encoding, they’re referring to the latter part of transcoding.
We mentioned a few use cases above but mainly, encoding makes viewing video over the internet possible. Uncompressed video files are so large that they could never fit on a DVD, Blu Ray disk, or be streamed over your home internet connection. For example, uncompressed video can have a data rate between 3,000 and 12,000 Mbps. For comparison, the average home internet connection in the USA is only 18Mbps, yet, because of encoding, you can still stream a great looking HD movie over that connection.
However, it's a little more complicated than simply encoding one input file and one output file. To deliver a great user experience across a variety of internet connections, you actually need to encode the input file to many different output files at different resolutions and compression rates. This approach is referred to as encoding for adaptive bitrate, or ABR.
Encoding works similarly to a zip file. It uses math to find patterns within the video and replaces all the repetitive pieces with references which reduces the size of the file. There’s one big difference to note between compression with a zip file and encoding. A zip file will bring the complete file back 100% after you’ve uncompressed it (aka lossless compression). When we encode a video, however, we want to squeeze as much visual data as possible into fewer bits, so the compression algorithm actually throws away details it doesn’t think is necessary, resulting in some data loss (aka lossy compression). The challenge is knowing what data can be thrown out while maintaining an excellent video experience.
For a vast majority of use cases, encoding is the most time consuming part of processing video. How long it takes depends on a lot variables but, generally, a short video could take a few seconds while a long video with a large file size using an advanced codec could take days.
No matter how fast stand-alone video encoding API services claim to be, they all require you to encode the entire video first before you can publish it. So there will always be some waiting period before you can make it available to your viewers. But there are innovations happening in this space which are essentially eliminating the wait time.
Just-in-time encoding is an encoding process that lets you publish your videos (near) instantly. You don't have to wait until the video is fully transcoded to publish it. When a viewer requests to playback a video, the transcoding process starts and bytes of the video are delivered to the viewer as soon as the first frame of the video is encoded. There’s no wait time for you or for your viewer. Every Mux Video customer gets just-in-time encoding. Create an account and test it out.
Encoding requires you to decide what tradeoffs you’re willing to make. It’s during this process when you must decide how much you want to compress the file and how much data you want to throw away. For example, you may choose to encode a higher quality video that you can deliver to users with a great internet connection, or limit the quality of the video, so you can save money on storing it, or delivering it to users. What you choose to optimize will depend on many factors, including the type of content you have.
Configuring all the settings can require a lot of manual work. One approach might be to pick a handful of bitrates and have a static bitrate ladder for your videos (this would be easiest for you but sacrifices video performance) or you could automate this process.
Advancements in encoding quality:
Per-title encoding is a process that creates a customized adaptive bitrate ladder for each video based on the complexities of each video. There are services that add an additional layer of sophistication and use machine learning to do per-title encoding. This automates the process plus delivers the most optimized quality. Per-title encoding is included for every Mux account. Sign up today.
If you have just one or a few videos, you can use encoding software and encode the video on your desktop. However, any more than that and you’ll want to automate the process. For example, if you’re building an app with user-generated content (UGC), like the next YouTube, you’re going to need a process that can handle scale. It wouldn’t be feasible to manually encode each video, one at a time, on your desktop.
Try Mux with a risk free trial and $20 in credit.