Video codecs play a very important role in our daily lives. Do you doubt it? Here is an example that should speak to you: you sit on your sofa to watch Netflix or Disney+ . Before delivering any frames, video streaming services use a codec to reduce the size of a video file before streaming it over the Internet through a process called video encoding. It is thanks to this process that Netflix manages to broadcast more than 450,000 hours of content every minute!
The importance of video codecs in everyday life
Video codecs aren’t just for watching content for entertainment. It is also thanks to them that you can have a meeting on Zoom or Microsoft Teams from your smartphone, even with limited bandwidth. When you share a media file on WhatsApp , Facebook, or Twitter , it needs to be re-encoded to a smaller size.
But what exactly is video encoding? What is it and how does it work? What are the best codecs? Do your devices support them? To see more clearly (and shine in society), follow the guide!
What is video encoding?
When we talk about video encoding, we are referring to the process of converting raw video into a digital format compatible with many devices. How compressed are they? These are multi-gigabyte videos that only weigh a few hundred megabytes after conversion. This essential passage, especially for live broadcasting, allows them to be delivered much more quickly.
These encoders, therefore, use audio and video codecs that apply algorithms to reduce the size of a video before it is delivered. To sum up: encoding is therefore a process, while codecs are the way to do it.
What is a video codec?
As you can see, content distributors use a video compression technology called codecs to be able to store and distribute these large files more easily. If we go back to our video streaming example, the codecs use lossy compression
In effect, “unnecessary” data is deleted so that the video is transmitted more quickly. Then that same video is decompressed for viewing.
How does a video codec work?
As you can imagine, codecs use complex compression algorithms. These algorithms evolve to optimize and improve compression. For example, why not only store information about changes between one frame and the next, rather than storing entire frames? In this way, a static scene can be compressed more efficiently by taking into account only moving objects, without affecting the background.
Compensation algorithms can also improve compression by predicting where a pixel will be in subsequent frames. Information is of course lost during compression, but the objective remains to have an image of acceptable quality (this is also a question of perception) for a fraction of its original size.
Video containers: mp4, mov, wmv, etc.
Once compressed, the components of a stream are placed into a file format that contains the video codec, audio codec, subtitles, and all metadata. These file formats are called containers. The most famous are .mp4, .wmv, .ts and .mov.
Most of the time, these containers accept several types of codecs. On the other hand, not all playback platforms accept all containers and codecs. This is the reason why the encoding is done in several file formats, in order to be broadcast on as many devices as possible.
The most common example is surely that of a .mov file which can contain exactly the same codecs and data as a .wmv. The .mov can only be played on Apple’s QuickTime software . The .wmv can be viewed on Microsoft’s Windows Media Player.
The main video codecs for streaming
As you know, we watch videos on the Internet through different devices that require the encoding of videos in different codecs. There are, of course, next-generation codecs that improve encoding efficiency and quality. But “legacy” codecs continue to be used to enable video playback on older machines.