A Primer on Video Codecs

primer video codecs

Ever more frequently, brands and individuals are telling stories and connecting to audiences through video, as attested by recent statistics that show that 78% of viewers stream videos every week from a platform while many people watch video daily. That trend has inspired 80% of businesses to adopt video as a marketing tool.

Video’s wide acceptability would not have transpired without the key role video codecs play in allowing content access on various devices. Why? Because codecs create the formats for the encoded video that’s so much in demand with file extensions like MP4, MKV, and WebM.

This article explains the capabilities of the popular codecs, their strengths and weaknesses, along with a suggestion on how to pick a codec that best suits your video undertakings.

This is part of a series of articles about video format.

The Role of Video Codecs in Digital Media

In today’s fast-paced digital sphere, how you deliver videos counts a lot. You need a tool to compress them before transferring them over the internet and making them available to viewing devices. One way to achieve that is by compressing videos with codecs, which also optimize them for playback. Performing those tasks properly would greatly smooth out your videos and accord them a higher frame rate.

Codecs comprise an encoder (co) and a decoder (dec) for compressing and decompressing videos, respectively. Videos can be encoded for storage or streaming and then decoded when ready for viewing on a video player, such as VLC or QuickTime.

As internet speed rises and video files keep ballooning, viewers find it hard to stream uncompressed 4K HD videos with their mobile data. That’s why codecs are essential for broadcasters and online content creators.

Codecs and Container Formats

By familiarizing yourself with the next-generation video formats, you’ll readily understand the differences between codecs and container formats.

A container format is a package that contains a file’s metadata, including the audio codec, video codec, and closed captions. For instance, properties like file size, file extension, etc. are displayed in a video or audio file, as in this example:

Standard container formats for videos include MOV, FLV, and WMV; audios have their own container formats. In addition, containers differ from codecs in that the former acts as storage units for codecs. Container formats open and allow codecs to access only the target device that supports the stored codec.

For instance, H.264, a widely used codec, is often incorporated with the AAC audio codec and is typically packaged into the .mp4 format, showcasing its versatility in different container formats.

“Video

Codecs for the Video Industry

This section describes five of the best codecs for video production. Which one to choose depends on your needs.

H.264, aka AVC

H.264, also known as Advanced Video Coding (AVC), is likely the most versatile and prevalent codec, particularly for streaming. Because of this codec’s wide market penetration, Cable TV broadcasting and Blu-ray disks have adopted it as a standard.

It remains the best video codec, primarily due to its extensive support across various browsers and devices.

Pros

  • H.264’s principal development goal was to build a standard capable of delivering high video quality at a lower bitrate than that employed by the previous standards.
  • Almost any device can play H.264.
  • H.264 serves the streaming platform YouTube and numerous devices perfectly well.
  • H.264 supports container formats like MP4, MOV, F4V, 3GP, and TS.

Cons
You must pay a license fee to use H.264.

H.265, aka HEVC

H.265, also known as High-Efficiency Video Coding (HEVC), is faster than its predecessor, H.264.

H.265 is particularly effective for compressing high-detail, “cinematic” videos, offering advanced compression algorithms that can provide better video quality than H.264 at the same bitrate. However, HEVC may not be supported by some devices and browsers, making it less compatible.

Pros

  • H.265 compresses video with many techniques, retaining myriad details and delivering the best quality in the smallest possible format.
  • With a 50% higher compression efficiency than H.264, H.265 is less common but produces significantly smaller files.
  • H.265 works well for high-definition (HD) video.

Cons
A license fee applies.

AV1

AV1, which stands for AOMedia Video 1, was created by the Alliance for Open Media (AOM). Chrome and Android browsers have always supported AV1.

As of 2023, AV1 is recognized as the best video codec in terms of video quality, offering comparable visual quality to H.265 while consuming 12% less data. This efficiency makes it highly suitable for modern video streaming demands.

Pros

  • Open source and royalty free, AV1 is an alternative to fee-based H.265.
  • AV1 delivers a bitrate saving of up to 50%, which translates to exceptional quality and much higher compression than legacy codecs like H.265 and H.264.
  • AV1 is free, saving you bandwidth costs.
  • AV1 supports the container formats MP4, 3GP, and MKV.

VP9

As an alternative to H.265, VP9 offers superior quality at an identical bitrate. Though slated primarily for users on Android and other Google platforms (YouTube and Chrome), VP9’s playback limitation might be a deal breaker for broad markets.

For high-resolution content, especially 4K or above, VP9, along with AV1, is preferred for YouTube due to their superior compression and quality.

Pros

  • Like AV1, VP9 is another license-free and open-source codec developed by Google.
  • VP9 supports all Google products: Chrome, YouTube, Android.
  • VP9 supports the container formats WebM and MKV.

Cons
VP9 does not work on Apple devices—a significant shortcoming.

H.266, aka VVC

H.266, also known as Versatile Video Coding (VVC), was created as HEVC’s successor by the German firm Fraunhofer, whose proposal states that H.266 reduces data requirements by 50% of the bitrate relative to HEVC, leading to video files being transmitted twice as fast. HD video then becomes more ideal for mobile streaming.

At this point, even though still too new for a definitive evaluation of its performance, H.266 promises to significantly boost video’s transmission speed and lower the storage cost.

Choices, Choices

Now can you pick the best video codec from those described above? The choice depends on your goals and needs. The answer to these two questions could help you decide:

  • Are you looking for a codec for online videos or for live streaming?
  • Are you up for paying a premium for a codec or would you rather opt for a royalty-free one?
Last updated: Mar 9, 2024