Skip to content

Codecs

What Is H.264, and Why Is It Still Everywhere?

The codec that made online video practical, how it works in outline, and why newer and better codecs have not displaced it.

2 min read · Published 15 August 2026

H.264, also called AVC, was finalised in 2003 and is still the most widely supported video codec in existence. Newer codecs beat it comfortably on efficiency. It remains the default anyway, and the reason is worth understanding because it explains a lot about how video technology actually spreads.

What a codec does

Raw video is impossibly large. A single uncompressed 1080p frame is around six megabytes; thirty of those a second is roughly 180MB per second. Nothing streams that. A codec's job is to throw away almost all of it while keeping what a viewer notices.

H.264 does this with a handful of ideas working together. It stores a complete frame occasionally and describes everything after it as changes. It splits frames into blocks and looks for where each block moved to, so a panning shot is described as motion rather than redrawn. It converts blocks into frequency information and discards the fine detail humans see poorly, especially in colour. And it packs the result with entropy coding, which is lossless.

Why it stayed

  1. Hardware decoding is everywhere. Phones, televisions, browsers and laptops all have dedicated silicon for H.264, which means playback is fast and uses almost no battery. Software decoding a newer codec on an old device drains a battery visibly.
  2. It is genuinely good enough. The efficiency gap to newer codecs is real but not dramatic at the bitrates most people use.
  3. Compatibility compounds. Every device that plays H.264 makes it a safer choice for the next producer, which makes it more universal still.
  4. Licensing on newer codecs has been contentious and slow to settle, which delayed adoption independently of the technology.

Profiles and levels

H.264 is not one thing. Profiles define which features an encoder may use: Baseline is the most compatible and least efficient, Main sits in the middle, High is the usual choice for anything modern. Levels cap resolution and bitrate.

This is where mysterious playback failures come from. A file encoded with High profile at a level beyond what an old device supports will not play on it, even though the device supports H.264. Encoding at High profile level 4.0 covers 1080p on essentially anything from the last decade.

Getting good results

  • Use a quality target rather than a bitrate unless you have a size limit.
  • Use a slower encoder preset. It costs time and produces a smaller file at the same quality, with nothing lost.
  • Two-pass encoding helps when targeting a specific bitrate, because the first pass tells the second where the bits are needed.
  • Stick with High profile unless you know a specific old device has to play it.

When to use something else

If you control playback and want smaller files, H.265 or AV1 will do noticeably better. For 4K in particular, the newer codecs earn their place. For a file you are handing to someone whose device you do not know, H.264 in an MP4 remains the answer that works.

Common questions

Is H.264 the same as MP4?

No. H.264 is a codec, MP4 is a container. An MP4 usually holds H.264 but can hold other codecs, and H.264 can live in containers other than MP4.

Is H.264 obsolete?

Not in practice. It is less efficient than newer codecs and still the most universally playable one, which keeps it the default for anything that has to work everywhere.

What is AVC?

Another name for the same thing. H.264 is the ITU designation and AVC, for Advanced Video Coding, is the MPEG one.

Related reading