mediacodec.dev

AV1 vs H.264

In this test, AV1 at 500 kbps (VMAF 88.93) beats H.264 at double the bitrate (VMAF 81.26). That is what fifteen years of codec research buys: the same quality for half the bill.

Bitrate target

Both codecs get the identical budget; the slider shows what each does with it. 500 kbps for 720p is deliberately starved.

H.264AV1

H.264

x264 · 2003

81.26VMAF

1,174 KB encoded

+11.96 VMAFsame budget

AV1

SVT-AV1 · 2018

93.22VMAF

1,088 KB encoded · 86 KB smaller

VMAF scores perceived quality 0–100 against the pristine source; above about 93 is generally indistinguishable from the original.

Quality per kilobit

VMAF against each encode's actual achieved bitrate, for all four codecs in the corpus, so the pair above can be read against the other two.

6070809010001,0002,000Actual bitrate (kbps)VMAF (higher is better)H.264 (x264)H.265 (x265)VP9 (libvpx)AV1 (SVT-AV1)
View as table
EncodeActual kbpsVMAF
H.264 (x264) @ 500k45164.54
H.264 (x264) @ 1000k93981.26
H.264 (x264) @ 2500k2,38291.15
H.265 (x265) @ 500k49876.72
H.265 (x265) @ 1000k98486.61
H.265 (x265) @ 2500k2,44993.16
VP9 (libvpx) @ 500k51780.73
VP9 (libvpx) @ 1000k1,03387.21
VP9 (libvpx) @ 2500k2,53590.95
AV1 (SVT-AV1) @ 500k46488.93
AV1 (SVT-AV1) @ 1000k87093.22
AV1 (SVT-AV1) @ 2500k2,07296.16

What you are looking at

The widest gap on the site. At 500 kbps, a bitrate that leaves H.264 blocking in every shadow, AV1 produces a picture most viewers would accept; at 2.5 Mbps AV1 is still 5.0 VMAF ahead, and to match H.264's quality there it needs about 72% fewer bits. The two codecs between them, H.265 and VP9, each have their own page and sit on the chart below so the whole generation can be read at once.

The price of the saving is encoding effort: SVT-AV1 at preset 6 is a sensible production setting and took about twice as long as x264 at medium on these clips (timings in the methodology), slower presets cost far more, and hardware AV1 encoders only exist on the newest GPUs. AV1 playback is widespread in current browsers, but Safari on Apple devices requires supported hardware such as A17 Pro or M3. Keep a fallback for devices without AV1 support.

Methodology

The source is a 10-second, 1080p30 excerpt of Big Buck Bunny (© Blender Foundation, CC-BY 3.0), scaled once to a near-lossless 720p reference. Each codec then encodes that reference at 500, 1000 and 2500 kbps, all 4:2:0, using FFmpeg 8.1: x264 and x265 at preset medium with a 1.5× rate cap, libvpx-vp9 in two passes at the "good" deadline with the same cap, SVT-AV1 at preset 6 in plain ABR (it refuses a cap alongside a target). VP9 gets two passes because one pass overshoots its target by a third on this clip, which would hand it more bytes than the others; with two it lands within 3%. VMAF is computed against the same reference, and the chart plots each encode's actual achieved bitrate rather than the nominal target.

Encoding time, since every page above mentions it: on the machine that produced these clips, the 1 Mbps encode of the 10-second 720p reference took x264 3.5 s, x265 5.4 s, SVT-AV1 6.6 s, and libvpx-vp9 32 s for its two passes. One run each, one clip, one CPU; the ratios are the point, not the seconds.

Fair-fight caveats: one short animated clip is not a corpus; animation compresses differently than camera footage (and tends to flatter modern codecs). Encoder presets matter enormously, and the source itself is a high-bitrate H.264 master, not a pristine original. Treat this page as an honest demonstration of the shape of the gap, not a benchmark to cite in a codec war. The pipeline is in the site repo; one command regenerates every number here.

If a side will not play

The player asks your browser whether it can decode each codec before it loads anything, and says so above the frame when the answer is no. HEVC is the usual culprit: Chrome, Edge and Firefox only decode it through a licensed decoder in the operating system or GPU, so the same page works on one laptop and not the next. The scores and the chart do not depend on playback, so they are right either way. The browser report lists what yours can do.