Lab · 2026-11-26한국어日本語

Best Codec at Low Bitrate (300 kbps to 2.4 Mbps): x264 vs x265 vs VP9 vs AV1, 2-Pass Fixed-Bitrate VMAF Test

We fixed the target bitrate at 300, 600, 1,200 and 2,400 kbps (2-pass), downscaled to 540p, encoded, scaled back up to 1080p and measured VMAF. In 15 of 16 conditions (4 clips × 4 targets), libaom AV1 (cpu-used 6) had the highest mean VMAF, ahead of x264 by +1.0 to +27.0 points. It cost about 5.2 to 7.6 times the CPU time of x264, and VP9 overshot the bitrate by 59.6% on the complex clip at the 300 kbps target.

The test PC, FFmpeg and VMAF settings shared by every lab article are collected on the methodology page. Methodology (common to all tests)

Bottom line

In 15 of 16 conditions (downscaled to 540p, 2-pass), libaom AV1 (cpu-used 6) had the highest mean VMAF. It beat x264 by +1.0 to +27.0 points (62.1 vs 35.1 on pedestrian_area at 300 kbps), and on blue_sky, pedestrian_area and rush_hour the gap shrank as the target went up (for example, pedestrian_area +27.0 → +4.2). The one exception, riverbed at 300 kbps, went to VP9 with 20.7, but it actually used 478.8 kbps, 59.6% over the target. Among the other three codecs the order was mostly VP9 > x265 > x264, though x265 was ahead in many rush_hour conditions. libaom took about 5.2 to 7.6 times the CPU time of x264.

Why this matters

"This video has to come in at around 700 kbps" is a common requirement: an upload size limit, a slow connection, a small archive copy. In that case you are not encoding to a quality target like CRF. You are setting a target bitrate and getting the best quality you can within it. Newer codecs are known to gain more at low bitrates, but how many points apart x264, x265, VP9 and AV1 really are when you ask for the same kbps with 2-pass, and whether the ranking changes with the type of video, is something you have to measure.

This article is a "540p delivery" test. At low bitrates, reducing the resolution often helps (for the resolution question, see the bitrate ladder test), so we downscaled every codec to the same 540p, encoded, scaled back up to 1080p and compared with the original. That means these are not results for low-bitrate 1080p encoding. They show the differences between codecs when you downscale to 540p for delivery, and the choice of resolution itself is not covered here. The difference between 2-pass and CRF was covered for x264 and x265 in 2-pass vs CRF at the same size. This time we added VP9 and libaom.

Test method

ItemDetails
FFmpeg9.0.2 (gyan.dev full_build)
PCOne machine: AMD Ryzen 5 PRO 4650G (6 cores, 12 threads), 16 GB RAM
Threads per job4. Process priority set to IDLE
Input formatyuv420p 8-bit, 1920x1080, 25 fps, original y4m
LengthOnly the first 250 frames (10 seconds) of each clip. Output is mkv, no audio
Codecs and presetsx264 medium, x265 medium, VP9 (libvpx-vp9) cpu-used 4, AV1 (libaom) cpu-used 6
Target bitrate300, 600, 1,200 and 2,400 kbps, 2-pass (encoded in two passes). No separate maximum or minimum bitrate limits
ResolutionEvery codec is downscaled to 540p with lanczos, encoded, then scaled back up to the original 1920x1080 and compared with the original. The effect of that upscaling is included in the score
Quality metriclibvmaf default model (vmaf_v0.6.1), measured frame by frame against the original → mean (vmaf_mean), 5th percentile (vmaf_p5), minimum (vmaf_min)
Time metricWall-clock time (rtime) fluctuates because of the IDLE priority, so we compare CPU time (utime). For 2-pass it is the sum of both passes
Actual bitrateFile size ÷ 10 seconds. How far it landed from the target is listed in a separate table
Number of jobs4 clips × 4 codecs × 4 targets = 64
Measured on2026-11-25

VMAF is a quality metric developed by Netflix. It compares the encoded result with the original frame by frame and gives a score from 0 to 100. The closer to 100, the harder it is to tell from the original, but the score does not replace human judgment. "Mean" is the average of the 250 frame scores, and "5th percentile" is the cutoff for the worst 5% of frames.

Only the common parts are shown (input/output paths omitted, Q = target kbps). 2-pass runs this command in two passes
# x264
ffmpeg -i clip.y4m -vf scale=-2:540:flags=lanczos -c:v libx264 -preset medium -threads 4 -b:v Qk -an out.mkv
# x265
ffmpeg -i clip.y4m -vf scale=-2:540:flags=lanczos -c:v libx265 -preset medium -x265-params pools=4:log-level=error -b:v Qk -an out.mkv
# VP9
ffmpeg -i clip.y4m -vf scale=-2:540:flags=lanczos -c:v libvpx-vp9 -cpu-used 4 -row-mt 1 -threads 4 -b:v Qk -an out.mkv
# AV1 (libaom)
ffmpeg -i clip.y4m -vf scale=-2:540:flags=lanczos -c:v libaom-av1 -cpu-used 6 -row-mt 1 -threads 4 -b:v Qk -an out.mkv

Test clip sources and licenses

All four clips are 1080p25 videos made by TUM / Taurus Media Technik (2001), downloaded from the Xiph.org derf collection (media.xiph.org/video/derf/y4m/). The accompanying ReadMe_1080p.txt states "Restrictions of use: No restrictions" and "Copyright: No Copyright" (checked on 2026-11-08).

Results by clip

On each curve, the horizontal axis is the actual bitrate (log scale) and the vertical axis is VMAF. Each codec has its own color, and the four points correspond to the targets of 300, 600, 1,200 and 2,400 kbps. Because the actual values differ from the targets, the points of different codecs sit at slightly different horizontal positions. The tables contain all the measured values.

blue_sky — blue sky and tree branches

5060708090100500k1M2MBitrate (bps, log scale)VMAFx264 (H.264) q=300: 272.3 kbps, VMAF 56.573x264 (H.264) q=600: 533.1 kbps, VMAF 77.399x264 (H.264) q=1200: 1,059.9 kbps, VMAF 90.395x264 (H.264) q=2400: 2,105.8 kbps, VMAF 97.508x265 (HEVC) q=300: 264.2 kbps, VMAF 60.65x265 (HEVC) q=600: 525.1 kbps, VMAF 77.647x265 (HEVC) q=1200: 1,047.8 kbps, VMAF 90.214x265 (HEVC) q=2400: 2,086.1 kbps, VMAF 97.659VP9 (libvpx) q=300: 275.8 kbps, VMAF 65.828VP9 (libvpx) q=600: 515.5 kbps, VMAF 79.179VP9 (libvpx) q=1200: 1,025.9 kbps, VMAF 90.451VP9 (libvpx) q=2400: 2,049.4 kbps, VMAF 98.052AV1 (libaom) q=300: 235.7 kbps, VMAF 72.1AV1 (libaom) q=600: 476.2 kbps, VMAF 84.441AV1 (libaom) q=1200: 946.4 kbps, VMAF 94.44AV1 (libaom) q=2400: 1,979.5 kbps, VMAF 99.673
x264 (H.264)x265 (HEVC)VP9 (libvpx)AV1 (libaom)
blue_sky — blue sky and tree branches — bitrate vs VMAF (4 codecs)
EncoderQualityBitrateVMAF meanVMAF 5th pctPSNR-YEncode fpsCPU time (s)
AV1 (libaom)300235.7 kbps72.1063.7131.0923.2529.9
AV1 (libaom)600476.2 kbps84.4472.2333.1419.3836.2
AV1 (libaom)1200946.4 kbps94.4486.7334.8415.1545.5
AV1 (libaom)24001,979.5 kbps99.6797.7936.2011.958.4
VP9 (libvpx)300275.8 kbps65.8357.9029.9325.0128.5
VP9 (libvpx)600515.5 kbps79.1869.0832.0623.2629.9
VP9 (libvpx)12001,025.9 kbps90.4583.3734.0419.6337.4
VP9 (libvpx)24002,049.4 kbps98.0593.1535.5914.552.9
x264 (H.264)300272.3 kbps56.5742.2628.45120.835.2
x264 (H.264)600533.1 kbps77.4069.0331.40107.716.8
x264 (H.264)12001,059.9 kbps90.3983.4433.6693.916.2
x264 (H.264)24002,105.8 kbps97.5192.7835.2880.77.7
x265 (HEVC)300264.2 kbps60.6548.5729.4566.8614.1
x265 (HEVC)600525.1 kbps77.6565.3131.9553.9617.0
x265 (HEVC)12001,047.8 kbps90.2181.4834.0541.4521.7
x265 (HEVC)24002,086.1 kbps97.6693.0135.6025.6133.1
blue_sky — blue sky and tree branches — all measurements

pedestrian_area — pedestrian street

30405060708090100500k1M2MBitrate (bps, log scale)VMAFx264 (H.264) q=300: 308.7 kbps, VMAF 35.08x264 (H.264) q=600: 603.8 kbps, VMAF 59.425x264 (H.264) q=1200: 1,196.6 kbps, VMAF 78.381x264 (H.264) q=2400: 2,392.1 kbps, VMAF 89.207x265 (HEVC) q=300: 294.6 kbps, VMAF 45.302x265 (HEVC) q=600: 589.3 kbps, VMAF 66.56x265 (HEVC) q=1200: 1,177.5 kbps, VMAF 81.721x265 (HEVC) q=2400: 2,339.8 kbps, VMAF 90.147VP9 (libvpx) q=300: 283.7 kbps, VMAF 50.901VP9 (libvpx) q=600: 546.7 kbps, VMAF 67.676VP9 (libvpx) q=1200: 1,146.6 kbps, VMAF 82.826VP9 (libvpx) q=2400: 2,412.6 kbps, VMAF 91.36AV1 (libaom) q=300: 299.5 kbps, VMAF 62.054AV1 (libaom) q=600: 582.5 kbps, VMAF 76.542AV1 (libaom) q=1200: 1,147.2 kbps, VMAF 87.439AV1 (libaom) q=2400: 2,298.2 kbps, VMAF 93.417
x264 (H.264)x265 (HEVC)VP9 (libvpx)AV1 (libaom)
pedestrian_area — pedestrian street — bitrate vs VMAF (4 codecs)
EncoderQualityBitrateVMAF meanVMAF 5th pctPSNR-YEncode fpsCPU time (s)
AV1 (libaom)300299.5 kbps62.0552.1434.7322.5732.3
AV1 (libaom)600582.5 kbps76.5469.3236.7617.641.4
AV1 (libaom)12001,147.2 kbps87.4483.2238.3513.0255.7
AV1 (libaom)24002,298.2 kbps93.4290.0839.3911.0366.3
VP9 (libvpx)300283.7 kbps50.9040.4732.7724.2928.3
VP9 (libvpx)600546.7 kbps67.6860.0235.3121.7732.1
VP9 (libvpx)12001,146.6 kbps82.8376.7537.5118.3639.8
VP9 (libvpx)24002,412.6 kbps91.3687.7338.9314.7552.1
x264 (H.264)300308.7 kbps35.0831.0731.51107.996.1
x264 (H.264)600603.8 kbps59.4256.1134.3895.98.0
x264 (H.264)12001,196.6 kbps78.3875.5136.7980.218.9
x264 (H.264)24002,392.1 kbps89.2185.6838.5066.0910.3
x265 (HEVC)300294.6 kbps45.3040.7932.8043.7221.9
x265 (HEVC)600589.3 kbps66.5662.9235.4133.9327.4
x265 (HEVC)12001,177.5 kbps81.7278.8037.4925.3236.5
x265 (HEVC)24002,339.8 kbps90.1586.8138.8918.5149.9
pedestrian_area — pedestrian street — all measurements

riverbed — riverbed (fine ripples)

102030405060708090100500k1M2MBitrate (bps, log scale)VMAFx264 (H.264) q=300: 313 kbps, VMAF 15.841x264 (H.264) q=600: 613.9 kbps, VMAF 19.435x264 (H.264) q=1200: 1,213.7 kbps, VMAF 28.115x264 (H.264) q=2400: 2,398.2 kbps, VMAF 44.558x265 (HEVC) q=300: 295.4 kbps, VMAF 14.754x265 (HEVC) q=600: 586.3 kbps, VMAF 20.312x265 (HEVC) q=1200: 1,166.3 kbps, VMAF 29.325x265 (HEVC) q=2400: 2,341.9 kbps, VMAF 45.417VP9 (libvpx) q=300: 478.8 kbps, VMAF 20.723VP9 (libvpx) q=600: 606.6 kbps, VMAF 22.923VP9 (libvpx) q=1200: 1,183.3 kbps, VMAF 32.21VP9 (libvpx) q=2400: 2,350.5 kbps, VMAF 47.294AV1 (libaom) q=300: 294.4 kbps, VMAF 16.856AV1 (libaom) q=600: 583.7 kbps, VMAF 24.257AV1 (libaom) q=1200: 1,162.7 kbps, VMAF 35.723AV1 (libaom) q=2400: 2,319.5 kbps, VMAF 53.989
x264 (H.264)x265 (HEVC)VP9 (libvpx)AV1 (libaom)
riverbed — riverbed (fine ripples) — bitrate vs VMAF (4 codecs)
EncoderQualityBitrateVMAF meanVMAF 5th pctPSNR-YEncode fpsCPU time (s)
AV1 (libaom)300294.4 kbps16.8612.6625.5618.8239.9
AV1 (libaom)600583.7 kbps24.2618.8127.221454.7
AV1 (libaom)12001,162.7 kbps35.7229.8329.1410.0375.6
AV1 (libaom)24002,319.5 kbps53.9945.0231.347.45103.4
VP9 (libvpx)300478.8 kbps20.7213.5225.8414.7452.9
VP9 (libvpx)600606.6 kbps22.9214.5926.3914.5853.2
VP9 (libvpx)12001,183.3 kbps32.2117.3728.2013.0559.3
VP9 (libvpx)24002,350.5 kbps47.2924.9630.3611.3968.0
x264 (H.264)300313 kbps15.8413.4823.6685.247.5
x264 (H.264)600613.9 kbps19.4316.1225.3976.99.2
x264 (H.264)12001,213.7 kbps28.1123.3327.4962.3311.9
x264 (H.264)24002,398.2 kbps44.5638.3329.8851.8614.8
x265 (HEVC)300295.4 kbps14.7512.3925.1228.9133.4
x265 (HEVC)600586.3 kbps20.3117.1226.5219.649.4
x265 (HEVC)12001,166.3 kbps29.3224.9528.2514.6766.4
x265 (HEVC)24002,341.9 kbps45.4240.1230.5010.989.0
riverbed — riverbed (fine ripples) — all measurements

rush_hour — evening rush-hour traffic

405060708090100500k1M2MBitrate (bps, log scale)VMAFx264 (H.264) q=300: 313.6 kbps, VMAF 49.755x264 (H.264) q=600: 609.8 kbps, VMAF 67.079x264 (H.264) q=1200: 1,204.2 kbps, VMAF 80.286x264 (H.264) q=2400: 2,400.2 kbps, VMAF 89.101x265 (HEVC) q=300: 298.2 kbps, VMAF 57.353x265 (HEVC) q=600: 587.3 kbps, VMAF 70.773x265 (HEVC) q=1200: 1,178.9 kbps, VMAF 81.652x265 (HEVC) q=2400: 2,333.9 kbps, VMAF 89.422VP9 (libvpx) q=300: 287.9 kbps, VMAF 55.975VP9 (libvpx) q=600: 530.9 kbps, VMAF 68.637VP9 (libvpx) q=1200: 1,115.1 kbps, VMAF 81.326VP9 (libvpx) q=2400: 2,329.7 kbps, VMAF 90.182AV1 (libaom) q=300: 284.9 kbps, VMAF 63.7AV1 (libaom) q=600: 564.9 kbps, VMAF 75.196AV1 (libaom) q=1200: 1,141.8 kbps, VMAF 85.111AV1 (libaom) q=2400: 2,336.3 kbps, VMAF 92.248
x264 (H.264)x265 (HEVC)VP9 (libvpx)AV1 (libaom)
rush_hour — evening rush-hour traffic — bitrate vs VMAF (4 codecs)
EncoderQualityBitrateVMAF meanVMAF 5th pctPSNR-YEncode fpsCPU time (s)
AV1 (libaom)300284.9 kbps63.7058.6436.8921.3233.7
AV1 (libaom)600564.9 kbps75.2070.4738.6616.9842.8
AV1 (libaom)12001,141.8 kbps85.1181.3440.2412.6958.3
AV1 (libaom)24002,336.3 kbps92.2589.6841.5311.6165.9
VP9 (libvpx)300287.9 kbps55.9845.7235.5322.9730.3
VP9 (libvpx)600530.9 kbps68.6461.3037.4319.3835.5
VP9 (libvpx)12001,115.1 kbps81.3375.4739.5016.2643.9
VP9 (libvpx)24002,329.7 kbps90.1886.5841.0412.9956.5
x264 (H.264)300313.6 kbps49.7644.8134.60103.186.4
x264 (H.264)600609.8 kbps67.0863.4537.1290.167.6
x264 (H.264)12001,204.2 kbps80.2976.9639.1975.0510.3
x264 (H.264)24002,400.2 kbps89.1086.3340.7261.912.2
x265 (HEVC)300298.2 kbps57.3552.7435.7548.120.0
x265 (HEVC)600587.3 kbps70.7767.0037.7835.0528.2
x265 (HEVC)12001,178.9 kbps81.6578.5239.5823.7640.5
x265 (HEVC)24002,333.9 kbps89.4287.0341.0116.6659.0
rush_hour — evening rush-hour traffic — all measurements

How to read it, and what we saw

Mean VMAF at a glance

The table below collects the mean VMAF of all 16 conditions, rounded to one decimal place (the raw data is in the tables above). The last column is the difference between libaom and x264. VP9 on riverbed 300 actually used 478.8 kbps (+59.6% over the target), so it is marked with an asterisk.

Clip · target (kbps)x264x265VP9libaomlibaom − x264
blue_sky · 30056.660.765.872.1+15.5
blue_sky · 60077.477.679.284.4+7.0
blue_sky · 1,20090.490.290.594.4+4.0
blue_sky · 2,40097.597.798.199.7+2.2
pedestrian_area · 30035.145.350.962.1+27.0
pedestrian_area · 60059.466.667.776.5+17.1
pedestrian_area · 1,20078.481.782.887.4+9.1
pedestrian_area · 2,40089.290.191.493.4+4.2
riverbed · 30015.814.820.7\*16.9+1.0
riverbed · 60019.420.322.924.3+4.8
riverbed · 1,20028.129.332.235.7+7.6
riverbed · 2,40044.645.447.354.0+9.4
rush_hour · 30049.857.456.063.7+13.9
rush_hour · 60067.170.868.675.2+8.1
rush_hour · 1,20080.381.781.385.1+4.8
rush_hour · 2,40089.189.490.292.2+3.1

Bold marks the winner of each row. * is a value from a run that used 478.8 kbps against a 300 kbps target, so it is not a like-for-like comparison. Differences were calculated from the unrounded values.

  • libaom had the highest mean VMAF in 15 of 16 conditions. It was also first in 15 conditions by the 5th percentile. The exception is riverbed 300, where all four codecs collapsed to similar levels: VP9 13.5, x264 13.5, libaom 12.7, x265 12.4.
  • libaom's advantage was large at low bitrates and shrank as the bitrate went up (except on riverbed). The gap to x264 shrank with every step up in target: +15.5 → +7.0 → +4.0 → +2.2 on blue_sky, +27.0 → +17.1 → +9.1 → +4.2 on pedestrian_area, and +13.9 → +8.1 → +4.8 → +3.1 on rush_hour. At 2,400 kbps, the gap between first and fourth place on these three clips is within 2.2 to 4.2 points.
  • On riverbed the gap went the other way and grew at higher bitrates. libaom − x264 was +1.0 → +4.8 → +7.6 → +9.4. Even at 2,400 kbps, though, this clip only reaches a VMAF of 44.6 to 54.0, which is hard to call usable quality with any codec.
  • Among the other three codecs the order was mostly VP9 > x265 > x264. VP9 had a higher mean VMAF than x265 in 13 conditions, and x265 beat x264 in 14. Exceptions: on rush_hour at 300, 600 and 1,200, x265 beat VP9 by 1.4, 2.1 and 0.3 points, and on blue_sky 1,200, x264 (90.4) beat x265 (90.2) by 0.2 points. On riverbed 300, x264 also beat x265 by 1.1 points. Differences within 0.5 points should be treated as effectively equal.
  • The easy clip, blue_sky, came close to saturation at 2,400 kbps. All four codecs landed between 97.5 and 99.7 (2.2 points between first and fourth), and they actually used only 82 to 88% of the target. Rather than "the codecs are similar" here, it is better to read this as the score hitting the ceiling and hiding the differences.

Does libaom match x264 at half the bitrate?

Being ahead did not mean libaom reached the same score at half the size. The table below compares libaom at target N directly with x264 at target 2N. The actual bitrate ratio is calculated from the kbps in the tables. With only four measurement points, we did not interpolate to get a "size ratio at the same VMAF".

Cliplibaom 600 vs x264 1,200libaom 1,200 vs x264 2,400
blue_sky84.4 (476.2 kbps) vs 90.4 (1,059.9) → −6.0 points, 45% of the bitrate94.4 (946.4) vs 97.5 (2,105.8) → −3.1 points, 45% of the bitrate
pedestrian_area76.5 (582.5) vs 78.4 (1,196.6) → −1.8 points, 49% of the bitrate87.4 (1,147.2) vs 89.2 (2,392.1) → −1.8 points, 48% of the bitrate
riverbed24.3 (583.7) vs 28.1 (1,213.7) → −3.9 points, 48% of the bitrate35.7 (1,162.7) vs 44.6 (2,398.2) → −8.8 points, 48% of the bitrate
rush_hour75.2 (564.9) vs 80.3 (1,204.2) → −5.1 points, 47% of the bitrate85.1 (1,141.8) vs 89.1 (2,400.2) → −4.0 points, 48% of the bitrate

Numbers in parentheses are actual kbps. In all 8 pairs, libaom used about half the bitrate and scored 1.8 to 8.8 points lower. We cannot say that, under these conditions, libaom delivers the same quality at half the size of x264.

Conversely, on pedestrian_area libaom scored 87.4 at 1,147.2 kbps for the 1,200 target, while x265 scored 81.7 at the same target (1,177.5 kbps) and VP9 scored 82.8 (1,146.6 kbps). At similar bitrates, the gaps are 5.7 and 4.6 points.

How close was the actual bitrate to the target?

Clip · target (kbps)x264x265VP9libaom
blue_sky · 300272.3264.2275.8235.7
blue_sky · 600533.1525.1515.5476.2
blue_sky · 1,2001,059.91,047.81,025.9946.4
blue_sky · 2,4002,105.82,086.12,049.41,979.5
pedestrian_area · 300308.7294.6283.7299.5
pedestrian_area · 600603.8589.3546.7582.5
pedestrian_area · 1,2001,196.61,177.51,146.61,147.2
pedestrian_area · 2,4002,392.12,339.82,412.62,298.2
riverbed · 300313.0295.4478.8294.4
riverbed · 600613.9586.3606.6583.7
riverbed · 1,2001,213.71,166.31,183.31,162.7
riverbed · 2,4002,398.22,341.92,350.52,319.5
rush_hour · 300313.6298.2287.9284.9
rush_hour · 600609.8587.3530.9564.9
rush_hour · 1,2001,204.21,178.91,115.11,141.8
rush_hour · 2,4002,400.22,333.92,329.72,336.3

File size ÷ 10 seconds (kbps). The closer to the target, the closer to a like-for-like comparison.

  • Overall error ran from −21.4% (libaom, blue_sky 300, 235.7 kbps) to +59.6% (VP9, riverbed 300, 478.8 kbps). Excluding those two values, the largest overshoot was +4.5% (x264, rush_hour 300, 313.6 kbps).
  • All four codecs used less than the target on blue_sky. x264 −9.2 to −12.3%, x265 −11.9 to −13.1%, VP9 −8.1 to −14.6%, libaom −17.5 to −21.4%. This looks like an easy video that had no reason to spend as many bits as the target allowed. Since libaom used the least and still came first, its advantage on this clip was not bought with extra bitrate.
  • In the 12 conditions other than blue_sky, x264 (−0.3% to +4.5%) and x265 (−2.8% to −0.6%) stayed closest to the target. Excluding the +59.6% on riverbed 300, VP9 ranged from −11.5% (rush_hour 600) to +1.1%, and libaom from about −6% to −0.2%. Because the comparison between codecs includes conditions with quite different bitrates, you should not read score differences as purely codec differences.
  • VP9 on riverbed 300 was an exceptionally large miss. On a clip with complex texture at a low target, it failed to hold the bitrate. At the 600 target on the same clip (606.6 kbps), it came back to +1.1%. If your size cap is strict, check the actual file size after encoding.

On complex video, the mean alone can mislead: riverbed's 5th percentile

On riverbed, VP9 beat x264 and x265 on the mean but fell behind on the 5th percentile. The table below shows mean / 5th percentile.

riverbed · target (kbps)x264x265VP9libaom
30015.8 / 13.514.8 / 12.420.7 / 13.5 *16.9 / 12.7
60019.4 / 16.120.3 / 17.122.9 / 14.624.3 / 18.8
1,20028.1 / 23.329.3 / 24.932.2 / 17.435.7 / 29.8
2,40044.6 / 38.345.4 / 40.147.3 / 25.054.0 / 45.0

Each cell is "mean / 5th percentile". * is an actual 478.8 kbps.

For VP9, (mean − 5th percentile) widened as the target went up: 7.2 → 8.3 → 14.8 → 22.3 points. At 2,400, x264 was at 6.2, x265 at 5.3 and libaom at 9.0. At 2,400, VP9's minimum frame VMAF was 19.8, lower than x264's 36.6. This data alone cannot tell us why. Still, a result can have the same mean score and a larger spread between frames, so on complex video it is safer to look at the mean and the 5th percentile together. See also the VMAF worst-frame test, which looks at per-frame minimum scores.

How long did encoding take?

Clip · target 1,200 kbpsx264x265VP9libaom
blue_sky6.2 s21.7 s37.4 s45.5 s
pedestrian_area8.9 s36.5 s39.8 s55.7 s
riverbed11.9 s66.4 s59.3 s75.6 s
rush_hour10.3 s40.5 s43.9 s58.3 s

Encoding CPU time (utime, sum of both 2-pass passes, 4 threads), for a 10-second clip. For reference only because of the IDLE priority.

  • libaom's CPU time was 5.2 to 7.6 times that of x264 in the same condition (across all 16). The lowest ratio was pedestrian_area 600 (41.4 s vs 8.0 s) and the highest was blue_sky 2,400 (58.4 s vs 7.7 s).
  • x265 took 2.5 to 6.0 times as long as x264, and on the complex riverbed clip its time grew the most as the target went up (33.4 s at the 300 target → 89.0 s at the 2,400 target). On riverbed 1,200 and 2,400, x265 took longer than VP9 (66.4 s vs 59.3 s, 89.0 s vs 68.0 s).
  • Time grew with the target bitrate for every codec. The slowest condition was libaom riverbed 2,400 (103.4 s of CPU time, 7.45 fps converted from wall-clock time). By wall-clock time, libaom was below 25 fps in all 16 conditions (7.45 to 23.25 fps). Because this was measured on one PC at IDLE priority, though, it should not be used as evidence for whether real-time encoding is feasible.
  • Decode CPU time (dec_utime) was small and noisy at 0.1 to 1.2 seconds, so we did not compare it.

Limitations

  • This is a "540p delivery" test. Every codec was downscaled to 540p and scaled back up to 1080p before measuring. If you encode directly at 1080p or downscale to a different resolution, the ranking and the gaps could change, and this article did not check that. Because the upscaling filter is part of the score, it may also differ from the scaler in a real player or TV.
  • There are only four 10-second clips. They differ in character (landscape, city, ripples), but animation, screen recordings and dark video are missing. The gap between codecs varied a lot from clip to clip, so it is hard to carry over to other video as is.
  • We measured 8-bit yuv420p only. 10-bit and HDR are not covered.
  • The actual bitrate differs from codec to codec. The error ran from −21.4% to +59.6%, so the score differences include bitrate differences. VP9 on riverbed 300 in particular is not a like-for-like comparison. Comparing size at the same VMAF is outside the scope of this experiment.
  • We picked only one preset per codec. x264 and x265 medium, VP9 cpu-used 4, libaom cpu-used 6. Other presets change both efficiency and time (see the libaom cpu-used test and the VP9 cpu-used test). With 2-pass, x264 is fast and libaom is slow, so this is not a same-time comparison either.
  • We measured with a single VMAF model (the default). The mean score can underestimate sharpness loss, and the same score can look different in texture.
  • There are only four target points per codec, one PC and one run. We did not measure error with repeated runs, and because of the IDLE priority the wall-clock time fluctuates, so speed and CPU time are for reference only. Hardware encoders and real-time CBR are out of scope.

Practical recommendations

  • If the target kbps is fixed and encoding time is not a problem, libaom AV1 is worth trying first. In this data it came first in 15 of 16 conditions, and the lower the target, the bigger the gain (+27.0 points over x264 on pedestrian_area at 300 kbps). In exchange, its CPU time was 5.2 to 7.6 times that of x264, so work out the time first for long videos (see the encode time estimator).
  • If you have to use x264 for playback compatibility or time, avoid low targets. At the same 540p, x264 collapsed badly at 300 kbps: 35.1 on pedestrian_area and 49.8 on rush_hour. Raising the target to 600 to 1,200 kbps narrowed the gap.
  • x265 and VP9 are the middle options. In this data VP9 beat x265 in 13 conditions, but x265 was ahead on rush_hour, and VP9's 5th percentile was low on riverbed. If you don't know what kind of video you have, don't choose on the mean alone. Check with a sample.
  • Complex video (like riverbed) stayed at a VMAF of 44.6 to 54.0 even at 2,400 kbps. Before switching codecs, consider raising the target further or rethinking resolution and frame rate separately.
  • Even with 2-pass, check the actual size. Easy video came out 8 to 21% under the target, and VP9 on complex video at a low target came out almost 60% over. If your size cap is strict, work out the target with the bitrate and file size calculator and then check the resulting file size yourself. You can build the commands with the FFmpeg command builder.
  • For important videos, encode a sample segment with two codecs and measure VMAF yourself. The results here are only the trend for 4 clips at 540p. For size savings between codecs by quality tier, see the codec gain by quality tier test; for VP9 vs x265, the VP9 vs HEVC test; and for the extremely low range, the extreme low-bitrate quality collapse test.

You can download the full raw data from the CSV at the bottom of the page.

Raw data: low-bitrate-2pass-540p-codec-vmaf-v1.csv