Skip to content
PullVid
Download
H.264, VP9, and AV1 Video Codecs: Which to Choose and Why It Matters
Formats & Quality

H.264, VP9, and AV1 Video Codecs: Which to Choose and Why It Matters

Daniel CarterBy Daniel CarterPublished July 12, 20266 min read

A codec decides how the video gets compressed. H.264 is the most compatible: it plays everywhere, though it compresses less efficiently. VP9 and AV1 are more modern and efficient (same quality, less size), but not every device can play them. Quick rule: if you want the video to work anywhere, look for H.264 (usually inside MP4); if you prioritize smaller size and you'll watch it on modern devices, go with VP9 or AV1.

What Is a Video Codec?

Don't confuse codec and format. The format or container (MP4, WebM, MKV) is the box that wraps the video; the codec is the technique used to compress and decompress that video inside the box. The same MP4 file can carry H.264 or AV1 inside. The codec affects two things: how much space the file takes up and which devices can play it without issues. For the difference between containers, see MP4 vs WebM.

Advertisement

H.264, VP9, and AV1 Compared

AspectH.264VP9AV1
CompatibilityMaximum (any device)Good on modern devicesStill limited (recent devices)
Efficiency (size)Compresses the leastBetter than H.264The best: less size at the same quality
Typical containerMP4WebMWebM / MP4
Use on YouTubeYes, widely usedYes, at many resolutionsYes, in 4K and recent content
Ideal forMaximum compatibilityBalance of size/compatibilitySaving space on modern devices

Compatibility Versus Efficiency

The underlying tension is always the same: the newer and more efficient a codec is, the fewer devices can play it. H.264 is over fifteen years old and even the oldest phone or TV understands it, but it compresses less efficiently, so its files take up more space. AV1, at the other extreme, offers the best quality per megabyte, but only recent devices play it smoothly. VP9 sits in between: fairly efficient and already well supported.

Advertisement

Which Codec Does YouTube Use?

YouTube encodes each video in several codecs at once and serves whichever best fits your device and connection. In practice you'll see H.264 at many resolutions (for its compatibility), VP9 across much of the catalog, and AV1 mainly in 4K and recent uploads. That's why, when downloading, the same video can be offered in different codecs depending on the resolution.

Why It Matters When Downloading

  • Compatibility: if the video is going to an older phone, a TV, or an editor, H.264 (in MP4) is the safest bet.
  • Size: to save space at the same quality, VP9 or AV1 perform better, especially at higher resolutions.
  • 4K: a lot of 4K content uses VP9 or AV1, which the MP4 container doesn't always support copying the track as-is; that's why 4K sometimes arrives in WebM or MKV.
  • Editing: editors prefer H.264; if you're going to edit, avoid AV1 unless your software supports it well.

So, Which Do I Choose?

If you don't want to overthink it, download in MP4 with H.264: it works everywhere. If size matters to you and you'll watch the video on a modern device, VP9 or AV1 give you the same quality at a smaller size. And if you download in 4K from YouTube, it's normal to run into VP9 or AV1, because those are the codecs used to distribute high resolution. To decide on the resolution itself, see what resolution to download.

Frequently asked questions

Which codec is better, H.264, VP9, or AV1?

It depends on the priority. H.264 is the best for compatibility (it plays everywhere). AV1 is the best for efficiency (less size at the same quality), with VP9 in between. For general use and maximum compatibility, go with H.264; to save space on modern devices, go with VP9 or AV1.

Is a codec the same thing as a format?

No. The format or container (MP4, WebM, MKV) is the box that wraps the video; the codec (H.264, VP9, AV1) is how the video is compressed inside that box. The same MP4 can carry different codecs.

Which codec does YouTube use?

Several at once: usually H.264 for compatibility, VP9 across much of the catalog, and AV1 mainly in 4K and recent uploads. YouTube picks whichever best fits your device, so the same video can be offered in different codecs depending on the resolution.

Why does 4K sometimes not come in MP4?

Because many 4K videos use VP9 or AV1, and the MP4 container doesn't always support those codecs copying the track as-is. That's why 4K is often distributed in WebM or MKV, which do accept them.

Does AV1 lose quality compared to H.264?

No; on the contrary, AV1 keeps the same quality at a smaller size. AV1's drawback isn't quality, but that fewer devices play it compared with H.264.

Which codec should I choose if I'm going to edit?

H.264 is the most convenient for editing, because almost every program supports it without issues. Avoid AV1 for editing unless your editor handles it well, or convert the video first.

Use our free tool — no sign-up, no limits.

Go to Video Downloader
Advertisement
Daniel Carter

Daniel Carter

Technical writer · PullVid team

Daniel writes about video downloading, formats, and web tools at PullVid.

View profile

Related articles