Video Codecs

Introduction

A video codec (coder-decoder) is a technology that compresses and decompresses digital video data.

  • Uncompressed digital video files are extremely large, making them impractical for storage and transmission.
  • Codecs address this issue by reducing file sizes, enabling efficient storage and streaming while striving to maintain acceptable video quality.
It is important to understand that compression is a trade-off:

  • Greater compression generally means smaller file sizes but can potentially lead to some loss of quality, although modern codecs are very good at minimizing this.



Types of Video Codecs

Several video codecs exist, each with its own strengths and weaknesses, optimized for different use cases. Here are some of the most prominent.

H.264 (Advanced Video Coding, AVC)

  • Despite being an older codec, H.264 remains widely supported due to its balance of compression efficiency and quality as well as compatibility with a vast range of devices.
  • However, newer codecs offer better performance.

H.265 (High Efficiency Video Coding, HEVC)

  • H.265 provides significantly improved compression compared to H.264, allowing for smaller file sizes or higher quality at the same bitrate.
  • It has become increasingly common, particularly for 4K content, and is now standard on many newer mobile devices.

H.266 (Versatile Video Coding, VVC)

  • The successor to H.265, H.266 achieves even greater compression efficiency, roughly 30-50% better than H.265 for the same perceived quality.
  • It is designed for high-resolution video (4K, 8K, and beyond) but requires more processing power.
  • Adoption is growing, though licensing complexities remain a factor.

VP9 (Video Processing 9)

  • Developed by Google, VP9 is a royalty-free codec known for its efficiency and is heavily used for online streaming, particularly on YouTube.
  • It offers comparable performance to H.265 and is a direct competitor.

AV1 (AOMedia Video 1)

  • A high-performance, royalty-free and open-source codec developed by the Alliance for Open Media (AOM), a group of industry giants like Google, Netflix, Amazon, and Apple.
  • Often offering the best compression efficiency among widely used codecs.

NOTE: As hardware support [e.g. in graphic processing units (GPUs) or system-on-a-chip (SoCs)] for codecs like H.265 and AV1 becomes increasingly common, the reduced processing burden on CPUs will facilitate wider adoption by content providers, streaming services, and device manufacturers.



Comparisons

The development of new codecs is driven by the increasing demand for higher resolutions (4K, 8K, and beyond), better quality, lower latency (crucial for real-time applications), and more efficient transmission, especially for streaming.

A key consideration is the trade-off between compression efficiency and processing power.

  • More efficient codecs (like H.266 and AV1) generally require significantly more processing power for encoding and decoding than older codecs like H.264.
  • This means that older or less powerful devices might not be able to handle them smoothly.

Codecs with lower compression ratios are often preferred for video editing because they preserve more of the original video data, making it easier to manipulate and avoid generational quality loss.

NOTE: A higher bitrate typically results in better quality (less compression artifacts) but requires more bandwidth and produces larger output files.



Summary

Video codecs work in conjunction with container formats.

  • A container format is a file format that can hold various data streams, including video (encoded with a specific codec), audio, and metadata (data about the video, like timestamps and titles).
  • Common container formats include MP4, MKV, and AVI.
It is crucial to understand that the container is not the codec.

  • An MP4 file, for example, can contain video encoded with H.264, H.265, AV1, or other codecs.
  • The container simply provides the structure to hold these different data streams together.



External Links

Comments