Compare video codecs

View Markdown

Four codecs cover nearly every video delivery scenario. Here is how they compare on the metrics that matter.

Benchmark comparison

All numbers are relative to h264 at the same visual quality (VMAF ~95).

CodecContainerBrowser supportRelative file sizeEncode speedDecode complexityLicensing
h264mp4Universal1.0x (baseline)1.0x (baseline)LowLicensed
h265mp4Safari, Edge, Chrome (partial)~0.7x~0.5xMediumLicensed (royalties)
vp9webmChrome, Firefox, Edge~0.7x~0.4xMediumRoyalty-free
av1mp4, webmChrome, Firefox, Edge, Safari 17+~0.6x~0.15x*HighRoyalty-free

*Sequential encode speed. Ittybit parallelizes AV1 encoding across chunks, bringing wall-clock time much closer to h264.

Encode the same clip with each codec

Take a 1080p 60-second source and encode it four ways:

# h264 -- universal baseline
ittybit video \
  -i source.mov \
  -o output-h264.mp4 \
  --codec h264 \
  --quality high

# h265 -- smaller, Apple/Android native
ittybit video \
  -i source.mov \
  -o output-h265.mp4 \
  --codec h265 \
  --quality high

# vp9 -- royalty-free, Chrome/Firefox
ittybit video \
  -i source.mov \
  -o output-vp9.webm \
  --codec vp9 \
  --quality high

# av1 -- smallest files, modern browsers
ittybit video \
  -i source.mov \
  -o output-av1.mp4 \
  --codec av1 \
  --quality high

Typical results (1080p, 60s, high quality)

CodecOutput fileApprox. sizeEncode time (local)
h264output-h264.mp4~25 MB~8s
h265output-h265.mp4~18 MB~16s
vp9output-vp9.webm~17 MB~20s
av1output-av1.mp4~15 MB~55s

Results vary by content. High-motion footage benefits more from newer codecs. Talking-head video shows smaller differences.

Browser support matrix

Browserh264h265VP9AV1
Chrome 70+YesPartialYesYes
Firefox 67+YesNoYesYes
Safari 17+YesYesNoYes
Safari < 17YesYesNoNo
Edge 79+YesYesYesYes
iOS SafariYesYesNo17+
Android ChromeYesYesYesYes

When to pick what

ScenarioBest codecWhy
Maximum compatibilityh264Plays everywhere, no exceptions
Bandwidth-sensitive webAV1Smallest files, modern browser coverage
Native iOS/Android apph265Hardware decode, no browser involved
Open-source projectVP9Royalty-free, good browser support
Archive / cold storageAV1Best compression, decode speed irrelevant
High-volume / fast turnaroundh264Cheapest to encode at scale