Tech

H.264

It works like a flipbook where you don't redraw the background on every page. You only add the parts that move.

  • 3 min read
  • 1 figures
  • Verified 2026-10-16

Definition

H.264 is a video compression technology (a video codec) that keeps high-quality video looking sharp while shrinking the file to a small fraction of its original size, often dozens of times smaller. It is used as a near-universal standard in digital video today, from YouTube streaming and broadcasting to smartphone recording.

Why can't we just send video as it is?

The sharp video you watch on your phone is really a stack of still photos, 30 or 60 of them every second. Each photo is fairly large, and dozens of them pour in every second.

If you sent those photos without compressing them, a single one-minute video could take up several gigabytes (GB) in no time. Your data bill would explode, and the internet itself couldn't keep up, so the video would keep freezing.

That's why we need a technology that cuts file size cleverly while hurting quality as little as possible. H.264 drops tiny color details that the human eye barely notices and bundles up repeated data, squeezing the file down to a few dozen times smaller than the original.

How does it shrink video and still look good?

The key trick behind H.264 is simple: don't send the parts that haven't changed. Think of a TV news show. The studio background sits perfectly still, and only the anchor's mouth and hands move.

At regular intervals, H.264 saves one full reference picture (a keyframe). For the frames in between, it records only what changed from the previous frame. If a hand moves slightly to the right, it doesn't resend the whole picture of the hand. It sends a simple coordinate signal (a motion vector), something like 'this hand area moved 5 pixels to the right.' Because a fresh reference picture shows up every few seconds, you can drag the playback bar to the middle of a video and it starts playing right away, with no need to work it out from the very beginning.

It also simplifies big areas of similar color, like a blue sky or a plain wall, by grouping them instead of storing every pixel. It cuts repetition inside each picture and repetition over time, both at once. That's what makes it so smart.

A little more precisely

To be a little more precise, H.264 was finalized in 2003, and technically much better next-generation compression technologies, such as H.265 (HEVC) and AV1, already exist. These newer formats can cut file size by nearly half compared with H.264.

Even so, H.264 is still one of the most widely used video codecs. Big services like YouTube and Netflix use newer codecs such as AV1 for popular videos, but they often keep H.264 versions too, for playback on all kinds of devices. The main reason is its overwhelming device compatibility and light processing load.

That's because almost every electronic device has a hardware engine built into its chip just for handling H.264: older smartphones, budget smart TVs, car dashcams, and more. No matter how good a new technology is, it's hard to beat a format that plays smoothly on nearly every device in the world.

Common misconceptions

Myth

H.264 and MP4 are exactly the same thing.

Fact

MP4 is a 'shipping box' (a container) that holds video and audio together, while H.264 is the 'technology for the contents' (a codec) that compresses the video data inside. A video compressed with H.264 sits inside the MP4 box.

Where you meet it

  1. When a video you got through a messaging app or a website plays right away even on an old device, it is often an H.264 video.

  2. It's used when a car dashcam records sharp video for hours without quickly filling up its memory card.

In one sentence

H.264 is a standard video compression technology. It records only the repeated parts and the changes in motion, so video plays lightly and clearly on almost every device.

Created 2025-10-13 Updated 2026-10-16 Verified 2026-10-16