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

2-Pass vs CRF Tested: Is Quality Really Different at the Same File Size, and How Far Off Is the Target Bitrate? (x264, x265)

We encoded x264 and x265 at 5 CRF levels and with 5 two-pass targets (800–12,000 kbps), then compared mean, 5th-percentile and minimum VMAF at the same file size. Mean VMAF differed by only -1.1 to +1.0 points in all 25 comparisons, and the actual two-pass bitrate missed its target by up to 13.2%. Two-pass took 1.01–1.10× the time of same-size CRF for x264 and 1.65–1.88× for x265.

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

The short answer

At the same file size, two-pass and CRF scored almost the same mean VMAF. The value of two-pass was not quality but 'fixing the file size in advance', and even that missed its target by up to 13.2%. Across the 25 points left after excluding the saturated range (13 for x264, 12 for x265), two-pass mean VMAF was -1.1 to +1.0 points relative to CRF, and the average difference was +0.1 points for x264 and +0.3 points for x265. The actual bitrate was -11.6 to +9.9% off target for x264 and -13.2 to -1.9% for x265, and for both codecs the biggest miss was on blue_sky (-9.6 to -13.2%). The 5th-percentile and minimum VMAF were nearly the same for x265 (minimum -1.0 to +1.3 points), but for x264 the lower the bitrate, the lower two-pass's minimum VMAF was compared with CRF (down to -10.3 points). In time, x264 two-pass took 1.01–1.10× as long as same-size CRF, and x265 took 1.65–1.88×. These results are based on VMAF and do not mean the same thing as quality to the human eye.

Why we wanted to know

'ffmpeg two-pass encoding' is passed around as an old standard. You set a target bitrate, the first pass scans the whole video, and the second pass uses that information to distribute bits. CRF, on the other hand, finishes in one pass: quality is fixed and file size follows (how much smaller does the file get per CRF step). The common advice is 'two-pass if you have a size limit, CRF otherwise', but it is hard to see whether that holds up in numbers.

This article asks three questions. (1) When file size is matched, does two-pass beat CRF in mean, 5th-percentile and minimum VMAF? (2) By how many percent does the actual two-pass bitrate miss its target? (3) Do the results change with the type of footage and the codec? We also look at how much extra time it takes.

How we measured

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. Input is the original y4m, output is mkv (no audio)
LengthOnly the first 250 frames (10 seconds) of each clip
Quality metriclibvmaf default model (vmaf_v0.6.1), measured per frame against the original. We use the mean (vmaf_mean), 5th percentile (vmaf_p5) and minimum (vmaf_min)
Measured on2026-11-21 (4 clips × 4 encoder settings × 5 levels = 80 encodes)

VMAF is a quality metric developed by Netflix. It compares the original and the encoded result frame by frame and scores them from 0 to 100. The closer to 100, the harder the encode is to tell apart from the original. The 5th percentile (p5) is the score at the 5% mark when frames are ranked by score from the bottom, and the minimum (min) is the score of the single worst frame. Even when the means are equal, these two show how the bad frames are distributed (worst-frame VMAF tested). The score does not reproduce human perception exactly, so every 'higher quality' in this article means 'higher VMAF'.

Encoder settings

Methodx264 (preset medium)x265 (preset medium)
CRF, 5 levelsCRF 20, 25, 30, 35, 40CRF 22, 27, 32, 37, 42
Two-pass, 5 levelsTarget 800, 1500, 3000, 6000, 12000 kbpsTarget 800, 1500, 3000, 6000, 12000 kbps

CRF numbers are on different scales across codecs, so do not compare them directly. The two-pass target kbps is the same for both codecs.

Encoder commands (key options only, input/output paths omitted. Q is a value from the table above)
# x264 CRF
-c:v libx264 -preset medium -crf Q -threads 4
# x264 2-pass (Q = target kbps)
-c:v libx264 -preset medium -threads 4 -b:v Qk

# x265 CRF
-c:v libx265 -preset medium -crf Q -x265-params pools=4:log-level=error
# x265 2-pass (Q = target kbps)
-c:v libx265 -preset medium -x265-params pools=4:log-level=error -b:v Qk

The two-pass entries ran a first and second pass with the options above (the FFmpeg -pass 1 and -pass 2 flags are omitted), and the times in the table (rtime_s and utime_s) are the sum of both passes. Bitrate (kbps) is the output file size divided by 10 seconds, so it includes a small amount of container overhead.

Test clip sources and license

All four clips are 1080p25 footage 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 2026-11-08).

Results by clip

In the curves, the horizontal axis is bitrate and the vertical axis is VMAF. Each encoder setting gets one curve, and those marked '+2pass' are two-pass. A higher curve at the same horizontal position means higher quality at the same bitrate, so checking whether a codec's CRF curve and two-pass curve overlap answers the first question directly. The time columns in the tables fluctuate because the jobs ran at IDLE priority, so treat them as reference only.

blue_sky — blue sky and tree branches

60708090100500k1M2M5M10MBitrate (bps, log scale)VMAFx264 (H.264) · preset medium q=40: 656.5 kbps, VMAF 68.105x264 (H.264) · preset medium q=35: 1,068.6 kbps, VMAF 86.89x264 (H.264) · preset medium q=30: 1,916.7 kbps, VMAF 98.224x264 (H.264) · preset medium q=25: 3,868.7 kbps, VMAF 99.965x264 (H.264) · preset medium q=20: 9,140.9 kbps, VMAF 99.979x264 (H.264) · preset medium+2pass q=800: 722.9 kbps, VMAF 72.276x264 (H.264) · preset medium+2pass q=1500: 1,333.8 kbps, VMAF 92.235x264 (H.264) · preset medium+2pass q=3000: 2,651 kbps, VMAF 99.646x264 (H.264) · preset medium+2pass q=6000: 5,323.8 kbps, VMAF 99.979x264 (H.264) · preset medium+2pass q=12000: 10,672.9 kbps, VMAF 99.983x265 (HEVC) · preset medium q=42: 369.4 kbps, VMAF 67.54x265 (HEVC) · preset medium q=37: 728.9 kbps, VMAF 84.747x265 (HEVC) · preset medium q=32: 1,420.9 kbps, VMAF 95.756x265 (HEVC) · preset medium q=27: 2,882.1 kbps, VMAF 99.743x265 (HEVC) · preset medium q=22: 6,348.2 kbps, VMAF 99.977x265 (HEVC) · preset medium+2pass q=800: 694.6 kbps, VMAF 83.658x265 (HEVC) · preset medium+2pass q=1500: 1,305.8 kbps, VMAF 94.665x265 (HEVC) · preset medium+2pass q=3000: 2,612 kbps, VMAF 99.444x265 (HEVC) · preset medium+2pass q=6000: 5,262.6 kbps, VMAF 99.974x265 (HEVC) · preset medium+2pass q=12000: 10,567.7 kbps, VMAF 99.98
x264 (H.264) · preset mediumx264 (H.264) · preset medium+2passx265 (HEVC) · preset mediumx265 (HEVC) · preset medium+2pass
blue_sky — blue sky and tree branches — bitrate vs VMAF
EncoderQualityBitrateVMAF meanVMAF 5th pctPSNR-YEncode fpsCPU time (s)
x264 (H.264) · preset medium209,140.9 kbps99.98100.0041.1020.5134.1
x264 (H.264) · preset medium253,868.7 kbps99.97100.0038.8228.924.1
x264 (H.264) · preset medium301,916.7 kbps98.2293.7836.1538.8918.9
x264 (H.264) · preset medium351,068.6 kbps86.8979.3433.1746.4516.6
x264 (H.264) · preset medium40656.5 kbps68.1158.8030.0750.715.0
x264 (H.264) · preset medium+2pass800722.9 kbps72.2860.4730.7737.3615.5
x264 (H.264) · preset medium+2pass15001,333.8 kbps92.2387.3034.4131.1518.9
x264 (H.264) · preset medium+2pass30002,651 kbps99.6597.6337.5024.8423.2
x264 (H.264) · preset medium+2pass60005,323.8 kbps99.98100.0039.7819.9530.0
x264 (H.264) · preset medium+2pass1200010,672.9 kbps99.98100.0041.4015.5740.8
x265 (HEVC) · preset medium226,348.2 kbps99.98100.0041.1416.2162.1
x265 (HEVC) · preset medium272,882.1 kbps99.7497.8838.9323.3942.6
x265 (HEVC) · preset medium321,420.9 kbps95.7688.5636.3629.1833.6
x265 (HEVC) · preset medium37728.9 kbps84.7575.8833.5533.4828.6
x265 (HEVC) · preset medium42369.4 kbps67.5457.3630.5038.3224.7
x265 (HEVC) · preset medium+2pass800694.6 kbps83.6674.6933.3220.646.9
x265 (HEVC) · preset medium+2pass15001,305.8 kbps94.6786.5136.0017.0957.8
x265 (HEVC) · preset medium+2pass30002,612 kbps99.4496.1138.5813.1675.5
x265 (HEVC) · preset medium+2pass60005,262.6 kbps99.97100.0040.659.28107.1
x265 (HEVC) · preset medium+2pass1200010,567.7 kbps99.98100.0042.295.85171.4
blue_sky — blue sky and tree branches — all measurements

pedestrian_area — pedestrian street

405060708090100500k1M2M5M10MBitrate (bps, log scale)VMAFx264 (H.264) · preset medium q=40: 706.5 kbps, VMAF 48.43x264 (H.264) · preset medium q=35: 1,164 kbps, VMAF 68.698x264 (H.264) · preset medium q=30: 1,981.2 kbps, VMAF 84.209x264 (H.264) · preset medium q=25: 3,563.2 kbps, VMAF 94.013x264 (H.264) · preset medium q=20: 7,819.9 kbps, VMAF 98.753x264 (H.264) · preset medium+2pass q=800: 845.5 kbps, VMAF 54.676x264 (H.264) · preset medium+2pass q=1500: 1,541.8 kbps, VMAF 76.812x264 (H.264) · preset medium+2pass q=3000: 3,014.9 kbps, VMAF 91.64x264 (H.264) · preset medium+2pass q=6000: 5,964.9 kbps, VMAF 97.836x264 (H.264) · preset medium+2pass q=12000: 11,889 kbps, VMAF 99.288x265 (HEVC) · preset medium q=42: 341.1 kbps, VMAF 45.205x265 (HEVC) · preset medium q=37: 647.8 kbps, VMAF 66.026x265 (HEVC) · preset medium q=32: 1,164.4 kbps, VMAF 82.22x265 (HEVC) · preset medium q=27: 2,123.4 kbps, VMAF 92.439x265 (HEVC) · preset medium q=22: 4,357.1 kbps, VMAF 97.842x265 (HEVC) · preset medium+2pass q=800: 780.4 kbps, VMAF 71.477x265 (HEVC) · preset medium+2pass q=1500: 1,456.4 kbps, VMAF 86.763x265 (HEVC) · preset medium+2pass q=3000: 2,942.3 kbps, VMAF 95.677x265 (HEVC) · preset medium+2pass q=6000: 5,852 kbps, VMAF 98.651x265 (HEVC) · preset medium+2pass q=12000: 11,663.2 kbps, VMAF 99.456
x264 (H.264) · preset mediumx264 (H.264) · preset medium+2passx265 (HEVC) · preset mediumx265 (HEVC) · preset medium+2pass
pedestrian_area — pedestrian street — bitrate vs VMAF
EncoderQualityBitrateVMAF meanVMAF 5th pctPSNR-YEncode fpsCPU time (s)
x264 (H.264) · preset medium207,819.9 kbps98.7595.9741.6517.4642.8
x264 (H.264) · preset medium253,563.2 kbps94.0191.0839.9625.8332.2
x264 (H.264) · preset medium301,981.2 kbps84.2181.3337.8534.3525.7
x264 (H.264) · preset medium351,164 kbps68.7066.0135.4541.4321.7
x264 (H.264) · preset medium40706.5 kbps48.4345.6032.8546.4218.8
x264 (H.264) · preset medium+2pass800845.5 kbps54.6849.0333.6229.9920.7
x264 (H.264) · preset medium+2pass15001,541.8 kbps76.8173.2636.6525.4225.5
x264 (H.264) · preset medium+2pass30003,014.9 kbps91.6488.5739.3720.4133.3
x264 (H.264) · preset medium+2pass60005,964.9 kbps97.8494.8241.1915.642.7
x264 (H.264) · preset medium+2pass1200011,889 kbps99.2996.8742.1612.654.9
x265 (HEVC) · preset medium224,357.1 kbps97.8495.0641.4811.7584.1
x265 (HEVC) · preset medium272,123.4 kbps92.4489.5539.7715.1165.5
x265 (HEVC) · preset medium321,164.4 kbps82.2279.5337.6318.4453.5
x265 (HEVC) · preset medium37647.8 kbps66.0362.6935.2021.9544.0
x265 (HEVC) · preset medium42341.1 kbps45.2040.8132.4826.4135.9
x265 (HEVC) · preset medium+2pass800780.4 kbps71.4867.9235.9511.7484.0
x265 (HEVC) · preset medium+2pass15001,456.4 kbps86.7683.8638.489.4105.0
x265 (HEVC) · preset medium+2pass30002,942.3 kbps95.6892.8140.667.3135.6
x265 (HEVC) · preset medium+2pass60005,852 kbps98.6596.0741.945.54179.5
x265 (HEVC) · preset medium+2pass1200011,663.2 kbps99.4697.5042.863.93252.2
pedestrian_area — pedestrian street — all measurements

riverbed — riverbed (small ripples)

20304050607080901001M2M5M10M20MBitrate (bps, log scale)VMAFx264 (H.264) · preset medium q=40: 2,576.3 kbps, VMAF 34.707x264 (H.264) · preset medium q=35: 5,042.6 kbps, VMAF 57.622x264 (H.264) · preset medium q=30: 9,188.1 kbps, VMAF 81.34x264 (H.264) · preset medium q=25: 16,448.9 kbps, VMAF 97.933x264 (H.264) · preset medium q=20: 29,769.2 kbps, VMAF 99.957x264 (H.264) · preset medium+2pass q=800: 878.9 kbps, VMAF 21.986x264 (H.264) · preset medium+2pass q=1500: 1,559.7 kbps, VMAF 26.308x264 (H.264) · preset medium+2pass q=3000: 3,081.1 kbps, VMAF 39.708x264 (H.264) · preset medium+2pass q=6000: 6,076.7 kbps, VMAF 64.968x264 (H.264) · preset medium+2pass q=12000: 11,935.5 kbps, VMAF 89.704x265 (HEVC) · preset medium q=42: 1,262.9 kbps, VMAF 31.42x265 (HEVC) · preset medium q=37: 2,944.2 kbps, VMAF 50.572x265 (HEVC) · preset medium q=32: 5,880.9 kbps, VMAF 71.632x265 (HEVC) · preset medium q=27: 10,736.4 kbps, VMAF 89.473x265 (HEVC) · preset medium q=22: 19,060.6 kbps, VMAF 99.592x265 (HEVC) · preset medium+2pass q=800: 771 kbps, VMAF 24.567x265 (HEVC) · preset medium+2pass q=1500: 1,447.1 kbps, VMAF 33.987x265 (HEVC) · preset medium+2pass q=3000: 2,894.3 kbps, VMAF 50.108x265 (HEVC) · preset medium+2pass q=6000: 5,800.5 kbps, VMAF 71.219x265 (HEVC) · preset medium+2pass q=12000: 11,678.1 kbps, VMAF 91.477
x264 (H.264) · preset mediumx264 (H.264) · preset medium+2passx265 (HEVC) · preset mediumx265 (HEVC) · preset medium+2pass
riverbed — riverbed (small ripples) — bitrate vs VMAF
EncoderQualityBitrateVMAF meanVMAF 5th pctPSNR-YEncode fpsCPU time (s)
x264 (H.264) · preset medium2029,769.2 kbps99.96100.0039.7711.4390.1
x264 (H.264) · preset medium2516,448.9 kbps97.9396.2437.0512.9679.3
x264 (H.264) · preset medium309,188.1 kbps81.3479.2834.2615.6266.5
x264 (H.264) · preset medium355,042.6 kbps57.6254.5231.3920.0451.5
x264 (H.264) · preset medium402,576.3 kbps34.7131.5928.2921.6935.6
x264 (H.264) · preset medium+2pass800878.9 kbps21.9918.4724.6419.8823.9
x264 (H.264) · preset medium+2pass15001,559.7 kbps26.3122.4626.1818.0329.2
x264 (H.264) · preset medium+2pass30003,081.1 kbps39.7135.3429.0014.8641.4
x264 (H.264) · preset medium+2pass60006,076.7 kbps64.9761.5932.2511.9558.2
x264 (H.264) · preset medium+2pass1200011,935.5 kbps89.7087.5635.519.7975.6
x265 (HEVC) · preset medium2219,060.6 kbps99.5998.1138.693.62272.1
x265 (HEVC) · preset medium2710,736.4 kbps89.4785.2836.124.43221.6
x265 (HEVC) · preset medium325,880.9 kbps71.6366.2433.455.72170.8
x265 (HEVC) · preset medium372,944.2 kbps50.5745.1530.737.42132.3
x265 (HEVC) · preset medium421,262.9 kbps31.4226.5428.1411.387.5
x265 (HEVC) · preset medium+2pass800771 kbps24.5721.2526.868.37118.3
x265 (HEVC) · preset medium+2pass15001,447.1 kbps33.9928.1328.525.58176.6
x265 (HEVC) · preset medium+2pass30002,894.3 kbps50.1143.7230.684.37224.9
x265 (HEVC) · preset medium+2pass60005,800.5 kbps71.2265.3733.403.28297.9
x265 (HEVC) · preset medium+2pass1200011,678.1 kbps91.4887.2536.502.49392.4
riverbed — riverbed (small ripples) — all measurements

rush_hour — rush-hour traffic

405060708090100200k500k1M2M5M10MBitrate (bps, log scale)VMAFx264 (H.264) · preset medium q=40: 534.7 kbps, VMAF 49.19x264 (H.264) · preset medium q=35: 981.2 kbps, VMAF 66.752x264 (H.264) · preset medium q=30: 1,778.7 kbps, VMAF 80.568x264 (H.264) · preset medium q=25: 3,381.4 kbps, VMAF 89.933x264 (H.264) · preset medium q=20: 8,033 kbps, VMAF 95.617x264 (H.264) · preset medium+2pass q=800: 858.1 kbps, VMAF 62.502x264 (H.264) · preset medium+2pass q=1500: 1,564.7 kbps, VMAF 77.679x264 (H.264) · preset medium+2pass q=3000: 3,044.8 kbps, VMAF 88.537x264 (H.264) · preset medium+2pass q=6000: 6,018.9 kbps, VMAF 94.312x264 (H.264) · preset medium+2pass q=12000: 11,999.7 kbps, VMAF 96.598x265 (HEVC) · preset medium q=42: 202 kbps, VMAF 43.394x265 (HEVC) · preset medium q=37: 432.8 kbps, VMAF 61.86x265 (HEVC) · preset medium q=32: 917.1 kbps, VMAF 76.914x265 (HEVC) · preset medium q=27: 1,899.3 kbps, VMAF 87.409x265 (HEVC) · preset medium q=22: 4,009.4 kbps, VMAF 93.759x265 (HEVC) · preset medium+2pass q=800: 777.6 kbps, VMAF 73.862x265 (HEVC) · preset medium+2pass q=1500: 1,463 kbps, VMAF 84.155x265 (HEVC) · preset medium+2pass q=3000: 2,922.3 kbps, VMAF 91.561x265 (HEVC) · preset medium+2pass q=6000: 5,886.6 kbps, VMAF 95.415x265 (HEVC) · preset medium+2pass q=12000: 11,745.3 kbps, VMAF 97.205
x264 (H.264) · preset mediumx264 (H.264) · preset medium+2passx265 (HEVC) · preset mediumx265 (HEVC) · preset medium+2pass
rush_hour — rush-hour traffic — bitrate vs VMAF
EncoderQualityBitrateVMAF meanVMAF 5th pctPSNR-YEncode fpsCPU time (s)
x264 (H.264) · preset medium208,033 kbps95.6294.0942.0417.0150.2
x264 (H.264) · preset medium253,381.4 kbps89.9387.9440.7926.5433.6
x264 (H.264) · preset medium301,778.7 kbps80.5777.9439.103625.9
x264 (H.264) · preset medium35981.2 kbps66.7563.4336.9444.5420.2
x264 (H.264) · preset medium40534.7 kbps49.1945.0334.2946.9415.9
x264 (H.264) · preset medium+2pass800858.1 kbps62.5057.1836.3029.520.8
x264 (H.264) · preset medium+2pass15001,564.7 kbps77.6874.0338.6324.8626.3
x264 (H.264) · preset medium+2pass30003,044.8 kbps88.5486.2040.5119.8935.5
x264 (H.264) · preset medium+2pass60006,018.9 kbps94.3192.6041.7215.2846.6
x264 (H.264) · preset medium+2pass1200011,999.7 kbps96.6094.9142.3812.0862.9
x265 (HEVC) · preset medium224,009.4 kbps93.7692.0641.7711.6984.3
x265 (HEVC) · preset medium271,899.3 kbps87.4185.1340.4116.0461.5
x265 (HEVC) · preset medium32917.1 kbps76.9173.6838.5421.8145.1
x265 (HEVC) · preset medium37432.8 kbps61.8658.2136.2127.6333.8
x265 (HEVC) · preset medium42202 kbps43.3939.1333.4731.926.9
x265 (HEVC) · preset medium+2pass800777.6 kbps73.8670.6238.051374.9
x265 (HEVC) · preset medium+2pass15001,463 kbps84.1681.5339.789.67102.0
x265 (HEVC) · preset medium+2pass30002,922.3 kbps91.5689.7741.277.02140.1
x265 (HEVC) · preset medium+2pass60005,886.6 kbps95.4294.0742.205.22189.0
x265 (HEVC) · preset medium+2pass1200011,745.3 kbps97.2095.9842.913.79260.8
rush_hour — rush-hour traffic — all measurements

How to read it, and what we observed

1. How far did the actual two-pass bitrate miss its target?

Each cell is actual kbps (% vs target). Actual kbps is the kbps column of the CSV, and the error is (actual − target) ÷ target rounded to one decimal place. A negative value means the result came in below the target.

x264 clip80015003000600012000
blue_sky722.9 (-9.6%)1333.8 (-11.1%)2651.0 (-11.6%)5323.8 (-11.3%)10672.9 (-11.1%)
pedestrian_area845.5 (+5.7%)1541.8 (+2.8%)3014.9 (+0.5%)5964.9 (-0.6%)11889.0 (-0.9%)
riverbed878.9 (+9.9%)1559.7 (+4.0%)3081.1 (+2.7%)6076.7 (+1.3%)11935.5 (-0.5%)
rush_hour858.1 (+7.3%)1564.7 (+4.3%)3044.8 (+1.5%)6018.9 (+0.3%)11999.7 (0.0%)

Column headers are target kbps. x264 medium, two-pass.

x265 clip80015003000600012000
blue_sky694.6 (-13.2%)1305.8 (-12.9%)2612.0 (-12.9%)5262.6 (-12.3%)10567.7 (-11.9%)
pedestrian_area780.4 (-2.5%)1456.4 (-2.9%)2942.3 (-1.9%)5852.0 (-2.5%)11663.2 (-2.8%)
riverbed771.0 (-3.6%)1447.1 (-3.5%)2894.3 (-3.5%)5800.5 (-3.3%)11678.1 (-2.7%)
rush_hour777.6 (-2.8%)1463.0 (-2.5%)2922.3 (-2.6%)5886.6 (-1.9%)11745.3 (-2.1%)

Column headers are target kbps. x265 medium, two-pass.

  • blue_sky always came in under the target for both codecs. All 10 points were -9.6 to -13.2%. Even at a 12000 kbps target, x264 reached only 10672.9 kbps and x265 only 10567.7 kbps. This data cannot tell us why. We can only note that this clip was an easy one whose CRF VMAF sat close to 100 even at high bitrates.
  • x264 overshot at low targets, and the error shrank as the target grew. On the three clips other than blue_sky, an 800 kbps target gave +5.7 to +9.9%, 1500 gave +2.8 to +4.3%, 3000 gave +0.5 to +2.7%, 6000 gave -0.6 to +1.3%, and 12000 gave -0.9 to 0.0%.
  • x265 on the three clips other than blue_sky was off by a small but one-sided -1.9 to -3.6%. All 15 cells came in a little below target. The range was similar regardless of clip or target, so if you want to use the full size budget you may need to compensate by setting the target a few percent higher. There is no guarantee that this correction holds for other footage.
  • Of the 40 two-pass measurements, the largest absolute error was -13.2% (x265 blue_sky, 800 kbps target). If you must keep the file size under a fixed limit, you need at least this much headroom.

2. Do mean, 5th-percentile and minimum VMAF differ at the same file size?

No CRF measurement has exactly the same bitrate as a two-pass measurement. So using the actual kbps of each two-pass point as the reference, we read the value at the same file size off the curve connecting the 5 CRF points of the same codec and clip (linear interpolation between the two neighboring CRF points, with the log of the bitrate on the horizontal axis). Each cell is two-pass − interpolated CRF (points), so a positive value means two-pass is higher. Points outside the CRF curve's range, and points in the saturated range where the interpolated CRF value exceeds 98, were excluded (7 for x264 and 8 for x265 were dropped, leaving 25 comparisons). The values are hand-calculated approximations, so treat differences of around 0.5 points as meaningless.

x264 clip · targetActual kbpsMean5th pctMinTime multiple
blue_sky · 800722.9+0.5-2.4-4.21.01×
blue_sky · 15001333.8+1.0+2.5-2.11.08×
pedestrian_area · 800845.5-1.0-3.9-10.31.04×
pedestrian_area · 15001541.8-0.1-0.8-8.01.07×
pedestrian_area · 30003014.9+0.4+0.3+3.21.10×
pedestrian_area · 60005964.9+0.7+0.5+2.71.09×
riverbed · 30003081.1-1.1-2.4-7.01.04×
riverbed · 60006076.70.0-0.6+2.41.04×
riverbed · 1200011935.5+0.9+0.7+10.41.05×
rush_hour · 800858.1-0.4-2.2-9.51.08×
rush_hour · 15001564.7+0.1-0.8-8.21.06×
rush_hour · 30003044.8+0.1-0.1-2.61.10×
rush_hour · 60006018.9+0.6+0.6+1.61.04×

x264 medium. Mean, 5th percentile and minimum are the VMAF difference (points) of two-pass versus the interpolated CRF value at the same file size. Time multiple is two-pass CPU time (utime, both passes summed) ÷ interpolated CPU time of CRF at the same file size. Log-interpolated values.

x265 clip · targetActual kbpsMean5th pctMinTime multiple
blue_sky · 800694.6+0.1+0.1+0.11.65×
blue_sky · 15001305.8+0.3-0.4-0.61.75×
pedestrian_area · 800780.4+0.3-0.1+0.11.79×
pedestrian_area · 15001456.4+0.7+0.6+1.31.81×
pedestrian_area · 30002942.3+0.8+0.8+0.31.83×
riverbed · 15001447.1-0.5-1.4-1.01.87×
riverbed · 30002894.3-0.1-1.1-0.51.71×
riverbed · 60005800.50.0-0.5+0.71.75×
riverbed · 1200011678.1+0.5+0.10.01.71×
rush_hour · 800777.6+0.3+0.3+0.91.76×
rush_hour · 15001463.0+0.5+0.5+0.61.83×
rush_hour · 30002922.3+0.5+0.6+0.51.88×

x265 medium. Read it the same way as the table above.

  • Mean VMAF was effectively a tie for both codecs. The differences in the 25 comparisons range from -1.1 to +1.0 points, with an average of +0.1 points over the 13 x264 points and +0.3 points over the 12 x265 points. Two-pass was higher in slightly more places (8 of 13 for x264, 9 of 12 for x265), but the margin is about the size of the interpolation error, so it is not enough to say 'two-pass is better'.
  • For x265, the 5th percentile and minimum were also nearly the same. The 5th percentile ranged from -1.4 to +0.8 points and the minimum from -1.0 to +1.3 points. In this data, x265 two-pass matched same-size CRF even in the per-frame quality distribution.
  • For x264 at low bitrates, two-pass minimum VMAF was lower than CRF. In 8 of the 9 points where the actual two-pass bitrate was about 3100 kbps or less, the minimum was lower (-2.1 to -10.3 points), while all 4 points at about 5900 kbps or more were higher (+1.6 to +10.4 points). The 5th percentile pointed the same way but with a smaller spread (-3.9 to +2.5 points). With nearly equal means and only the worst frames differing, it looks as if two-pass distributes bits across frames differently from CRF, but this data could not confirm the reason.
  • For x264, there were 4 cells where the means were the same but the minimum was -8 to -10 points (pedestrian_area 800 and 1500, rush_hour 800 and 1500). Frames at scene changes or where motion suddenly grows may have been vulnerable, but we did not measure which frames. A low-target two-pass x264 video should not be judged by its mean score alone.
  • The differences by type of footage were small for x265, while for x264 the minimum flipped at the higher-bitrate end. riverbed at the x264 12000 target had a minimum 10.4 points higher, but the same footage in x265 was at 0.0 points at 12000. This data cannot support any codec-independent rule that two-pass is better for a certain type of footage.

3. How much more time does it take?

The time multiple in the tables above is the two-pass CPU time (utime, both passes summed) divided by the interpolated CPU time of CRF at the same file size. Because rtime fluctuates under IDLE priority, we used utime (multicore utilization tested).

  • x264 two-pass took 1.01–1.10× the time of same-size CRF. That differs from the claim that 'two-pass takes twice as long'. For example, pedestrian_area at a 3000 kbps target took 33.297 seconds (utime), while same-size CRF took about 30.4 seconds. This is the result on this PC and these settings (medium), and how fast the first pass runs may differ with other settings.
  • x265 two-pass took 1.65–1.88×. Compared with CRF finishing in a single pass at the same file size, two-pass took nearly twice as long. The biggest example is riverbed at a 12000 kbps target: two-pass took 392.391 seconds (utime), while same-size CRF took about 229 seconds.
  • Two-pass time also grew as the target was raised. x265 pedestrian_area took 84.047 seconds at an 800 target and 252.235 seconds (utime) at 12000. Time followed bitrate and footage complexity, not quality (time differences by complexity).

4. The same target bitrate cannot guarantee quality

Two-pass fixes the file size, but the footage decides the quality. With x264 two-pass at the same 3000 kbps target, the four clips' mean VMAF was blue_sky 99.646, rush_hour 88.537, pedestrian_area 91.64 and riverbed 39.708, a spread of about 60 points. Conversely, x264 CRF 25 gave similar quality but different file sizes. The kbps was rush_hour 3381.4, pedestrian_area 3563.2, blue_sky 3868.7 and riverbed 16448.9, so the largest was about 4.9× the smallest (mean VMAF 89.933 to 99.965). Which is right depends on what you need to hold fixed (CRF differences by content type).

Limitations

  • Only 4 clips of 10 seconds each. Landscape, city and ripple footage differ in character, but animation, screen recordings, dark footage and noisy footage are missing. Two-pass distributes bits after looking at the entire video, and 10 seconds may be too short for that advantage to show, so results may differ for videos that run minutes to hours.
  • We measured only 8-bit yuv420p 1080p25. 10-bit, 4K and high fps are not covered.
  • One preset (medium) and only two encoders, x264 and x265. We did not measure two-pass for other codecs such as SVT-AV1 and VP9. The accuracy of the target bitrate may differ by codec and setting.
  • Because no measurement point had exactly the same file size, the values are approximations read off by log interpolation. With only 5 CRF points the gaps between points are wide, and 15 of the 40 two-pass points were dropped because they fell outside the CRF curve's range or were saturated. The differences are hand-calculated approximations, so around 0.5 points is meaningless.
  • We did not use bitrate limits (-maxrate and -bufsize). Results when you cap the instantaneous bitrate for streaming are outside the scope of this article.
  • This is VMAF, not human-eye quality. Even at the same score, the way detail gets smeared can differ. For important videos, compare the two results with your own eyes.
  • Each point was measured once on a single PC at IDLE priority. Elapsed times fluctuate, and we did not run repeated measurements to estimate the error. Treat speed as a reference only.

Practical recommendations

  • If you choose on quality alone, we found no reason in this data to spend extra time on two-pass. At the same file size, mean VMAF was a tie at -1.1 to +1.0 points. For x265 in particular, the same result took 1.65–1.88× the time.
  • If you have a fixed size limit, two-pass makes sense, but do not cut the target too fine. The actual bitrate missed the target by up to 13.2%, and x265 almost always came out a little below target. If you want to use as much of the limit as possible, first run a short section and check the actual size. For the limit math, see maximum duration for an upload size limit, tested and the bitrate and file size calculator.
  • When running x264 two-pass at a low target bitrate, check the minimum and 5th percentile, not just the mean score. In this data, at low bitrates the minimum was often 2 to 10 points lower than same-size CRF.
  • With no size limit, a single CRF pass is simpler. It tunes the same quality level per video, and in this data the time difference for x264 was small, so two-pass cost little but gained nothing either. You can find a starting point with the CRF recommender.
  • If you need better quality at the same file size, look at the preset rather than rate control. For results from changing the preset at the same file size, see raise the preset or lower the CRF?.

The full raw data can be downloaded from the CSV at the bottom of the page. You can recompute the errors in the tables from the kbps column of the CSV, and the differences and multiples from vmaf_mean, vmaf_p5, vmaf_min and utime_s.

Raw data: two-pass-vs-crf-same-size-vmaf-v1.csv