Codecs and Compression

H.264 Explained

H.264 (AVC) became the default video codec thanks to broad device support and solid efficiency. Learn how it works, why it lasted and where it falls short.

On this page
  1. One standard, two names
  2. How it saves bits
  3. Profiles and levels
  4. Why it became the default
  5. Where it falls short
  6. When H.264 is still the right choice
  7. A realistic outlook

One standard, two names

H.264 is a video compression standard that was published in 2003 as a joint effort of two standards groups, ITU-T’s Video Coding Experts Group and ISO/IEC’s Moving Picture Experts Group. That is why it has two official names. ITU calls it H.264, and ISO/IEC calls it MPEG-4 Part 10. In everyday use it is also called AVC, short for Advanced Video Coding. All of these refer to the same codec.

It was designed to deliver clearly better compression than its predecessors, such as MPEG-2 and MPEG-4 Part 2, which were common in DVDs, digital TV and early internet video. The aim was to produce similar quality at a substantially lower bitrate, and in broad terms it did.

How it saves bits

H.264 follows the general approach used by most modern codecs, which relies on spatial and temporal prediction. The picture is divided into blocks, each predicted from nearby areas in the same frame or from other frames, with only the difference stored. Several features made it more efficient than earlier designs:

  • Flexible block sizes. Blocks can be divided into smaller pieces where there is detail and kept large where the image is smooth.
  • Multiple reference frames. A block can be predicted from several earlier frames, not just the immediately previous one.
  • Better motion handling. Movement can be tracked with fine precision, which helps preserve detail in moving objects.
  • An in-loop deblocking filter. This smooths the visible block edges that compression tends to create.
  • Efficient entropy coding. Two schemes, a simpler one (CAVLC) and a more efficient one (CABAC), pack the final data compactly.

Frames are stored in groups, with some coded in full and others coded as changes relative to their neighbours.

Profiles and levels

H.264 is not a single fixed recipe. Profiles define which tools a stream may use, and levels set limits on things like resolution, frame rate and bitrate. Common profiles include Baseline, Main and High. Simpler profiles suit low-power devices, while High allows the more efficient tools.

This matters in practice. A file can be valid H.264 and still fail on an older device that supports only a lower profile or level. When playback problems occur, a mismatch of profile or level is a common cause, along with an unsupported container.

Why it became the default

H.264 was not the only good codec, so its dominance needs some explanation. A mix of factors seems to have mattered.

  1. Strong efficiency for its time. It cut bitrates enough to make high-definition video practical on discs, broadcast and the internet.
  2. Broad adoption in standards. It was adopted for Blu-ray, digital broadcasting and many streaming and video-calling systems.
  3. Hardware everywhere. Chip makers built H.264 decoding, and later encoding, into phones, computers, set-top boxes and cameras. Hardware support meant smooth playback and low battery use, and it made H.264 a safe choice for anyone publishing video.
  4. Mature software. Open-source encoders such as x264 gave excellent quality and became widely used, and almost every editor and platform handled the format.
  5. A predictable licensing path. Patent licences were available through an established pool, which allowed manufacturers and services to ship it with known terms.

The result is a feedback loop. Because every device plays H.264, creators and platforms use it, and because they use it, devices keep supporting it.

Where it falls short

Despite its reach, H.264 shows its age in several areas.

  • Efficiency at high resolutions. Its block structure was designed in an era of lower resolutions. For 4K and above, newer codecs such as HEVC, VP9 and AV1 typically need noticeably fewer bits for similar quality.
  • High dynamic range and wide colour. H.264 can carry higher bit depths in some profiles, but support is patchy, and newer codecs are more commonly paired with high dynamic range delivery.
  • Licensing. Although terms are known, H.264 is not royalty-free in the way open codecs aim to be. How fees apply depends on the product and circumstances, and that is a matter for the licensing bodies and legal advice, not something to assume.
  • Bandwidth cost at scale. For a service delivering vast amounts of video, even modest efficiency gains from a newer codec can add up, which is part of the economics behind streaming costs.

When H.264 is still the right choice

Compatibility is the strongest argument. If you want a file to play on an old laptop, a TV, a phone and a web browser without fuss, H.264 inside an MP4 container is the most reliable option. It is also easy to encode quickly on modern hardware, so it works well for rapid exports, drafts, screen recordings and live streaming to platforms. The trade-off is that the file will usually be larger than an equivalent made with a newer codec.

For longer-term storage or for delivery at very high resolution, a newer codec may save considerable space, but it is worth checking that your intended audience can actually play it.

A realistic outlook

Codecs rarely vanish. Older formats persist because so many devices and workflows depend on them. H.264 is likely to remain in use for a long time even as newer codecs take a growing share of high-resolution and bandwidth-sensitive delivery. How quickly that balance shifts is uncertain and depends mostly on device support and licensing choices.

The complete guide to codecs and compression

What Is a Video Codec
Read the guide

Keep exploring

Guides from other topics

All topics →