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

How Many Test Encodes to Find the CRF for a Target VMAF of 95? CRF Search Trials and Interpolation Error per Clip, Measured (x264, x265, SVT-AV1)

We took a grid of 8 CRF steps for each of four 10-second 1080p25 clips, encoded with x264 (medium), x265 (medium) and SVT-AV1 (8), as the ground-truth curve, and simulated finding the CRF for a target mean VMAF (95 and 93) with 2 or 3 test encodes. Of the 22 cases where the target lies inside the grid, binary search with 3 trials closed in on the correct interval in 21 (the remaining one needs a 4th trial), and with 2 trials the CRF error was 0.05 to 2.09 (the 20 cases whose estimate stayed inside the grid). On blue_sky with SVT-AV1 the curve is flat, so the 2-point estimate fell outside the grid. This is an interpolation simulation on the grid, not a re-encode-and-verify test.

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

Two test encodes usually got us to a "roughly right CRF", and three got us to the adjacent interval that contains the true one. In the 22 cases where the target lies inside the grid (10 at VMAF 95, 12 at VMAF 93), binary search with 2 trials had a CRF error of 0.05 to 2.09 in the 20 cases that stayed inside the grid, with a size error of 0.6 to 24.7%. Two trials at fixed points (the fixed-2-point method) scattered more widely: a CRF error of 0.02 to 4.00 and a size error of 0.2 to 50.3%. Binary search with 3 trials found the adjacent interval containing the true CRF in 21 cases, but that is a property of a simulation whose ground-truth curve is built from the same grid, so it does not tell you how accurate a real tool is. The hardest case was SVT-AV1 on blue_sky, whose curve is flat.

Why we ran this

Tools like ab-av1 and Av1an find "the CRF that hits a target VMAF of 95" by running several test encodes. It is convenient, but every test encode costs encoding time, so the number of trials is the time. That raises the question: how many trials does it take to land on a usable CRF, and does the accuracy depend on the content and the codec? In this article we treat a grid of 8 CRF steps as the ground truth and count how far off a search with few trials ends up. That the same CRF gives different quality on different clips is covered in CRF by clip, and how much one CRF step changes file size is covered in how much one CRF step changes file size, so here we look only at the number of trials and the accuracy.

We did not re-encode to verify

The "search" in this article is a calculation simulation on the 8-point grid we had already measured. We did not re-encode at the estimated CRF and measure the real VMAF; we read values off a curve that joins the grid points with straight lines. We do not know the true shape of the curve between grid points, so the "true" answer is also an interpolated value. Please read the errors below as deviations measured against this interpolated curve.

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 was IDLE
Input formatyuv420p 8-bit, 1920x1080, 25 fps
LengthOnly the first 250 frames (10 seconds) of each clip
Quality metriclibvmaf default model (vmaf_v0.6.1), measured frame by frame against the original → average (vmaf_mean)
Scale4 clips × 3 encoders × 8 CRF steps = 96 runs
Measured on2026-11-18

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 it is to tell the encode from the original, but it does not fully replace human judgment. The VMAF in this article is the average of the 250 per-frame scores. The problem of an average hiding low-scoring frames is covered separately in Does an average VMAF of 95 mean you're safe?

EncoderPreset8 CRF stepsCommand (key options)
x264medium20, 24, 28, 32, 36, 40, 44, 48-c:v libx264 -preset medium -crf Q -threads 4
x265medium22, 26, 30, 34, 38, 42, 46, 50-c:v libx265 -preset medium -crf Q -x265-params pools=4:log-level=error
SVT-AV1826, 32, 38, 43, 48, 53, 58, 62-c:v libsvtav1 -preset 8 -crf Q -svtav1-params lp=4

Input is the original y4m, output is mkv, no audio. We substituted the values above for Q one at a time. CRF numbers are on a different scale for each codec, so do not compare them across codecs. The SVT-AV1 grid has wider spacing (4 to 6) than x264 and x265 (4).

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 says "Restrictions of use: No restrictions" and "Copyright: No Copyright" (checked 2026-11-08).

How we simulated the search

  • True answer: Among the 8 grid points, we took the two adjacent points that bracket the target mean VMAF, and interpolated VMAF linearly against CRF and size (kbps) linearly against CRF on a log scale. There are two targets: VMAF 95 and 93.
  • Out-of-range cases excluded: If the target is outside the grid's VMAF range, that cell has no true answer, so we dropped it. At VMAF 95 this applies to rush_hour with x265 (grid maximum 93.759) and SVT-AV1 (94.453). That leaves 10 cells for VMAF 95 and 12 for VMAF 93.
  • Binary search: We first test the middle of the 8 points ordered by CRF (x264 CRF 32, x265 34, SVT-AV1 43). If that result is at or above the target, the next test is in the upper-CRF half; otherwise it is in the lower-CRF half. We did this for 2 trials and for 3 trials, then estimated the CRF by joining the two test points that bracket the target with a straight line. If no test points bracket the target (all test points are above or all below it), we extended the line through the two nearest points.
  • Fixed 2 points: Regardless of the search result, we tested only the 3rd and 6th grid points (x264 CRF 28 and 40, x265 30 and 42, SVT-AV1 38 and 53) and estimated in the same way. This is a comparison that assumes you only look at two CRFs chosen in advance.
  • Definition of error: CRF error = estimated CRF − true CRF (positive means the estimate is a higher CRF, i.e. lower quality than the target). Size error = the size read from the same grid curve at the estimated CRF ÷ the true size − 1. If the estimated CRF falls outside the grid's CRF range, it cannot be read from the curve, so we marked it "outside grid". We did not round the decimal part of the CRF.

Results by clip

In the curves, the horizontal axis is size (bitrate) and the vertical axis is mean VMAF. The tables also include encoding time (rtime_s is elapsed wall-clock time, utime_s is CPU time used). The time columns are reference values measured at IDLE priority.

blue_sky — blue sky and tree branches

30405060708090100100k200k500k1M2M5M10MBitrate (bps, log scale)VMAFx264 (H.264) q=48: 359.8 kbps, VMAF 32.241x264 (H.264) q=44: 477.2 kbps, VMAF 50.644x264 (H.264) q=40: 656.5 kbps, VMAF 68.105x264 (H.264) q=36: 961.5 kbps, VMAF 83.576x264 (H.264) q=32: 1,507.1 kbps, VMAF 94.911x264 (H.264) q=28: 2,490.2 kbps, VMAF 99.51x264 (H.264) q=24: 4,535.6 kbps, VMAF 99.971x264 (H.264) q=20: 9,140.9 kbps, VMAF 99.979x265 (HEVC) q=50: 109.6 kbps, VMAF 31.365x265 (HEVC) q=46: 201.6 kbps, VMAF 49.679x265 (HEVC) q=42: 369.4 kbps, VMAF 67.54x265 (HEVC) q=38: 638.4 kbps, VMAF 81.807x265 (HEVC) q=34: 1,077.3 kbps, VMAF 92.235x265 (HEVC) q=30: 1,874.4 kbps, VMAF 98.083x265 (HEVC) q=26: 3,362 kbps, VMAF 99.903x265 (HEVC) q=22: 6,348.2 kbps, VMAF 99.977SVT-AV1 (AV1) q=62: 488.1 kbps, VMAF 85.277SVT-AV1 (AV1) q=58: 870.1 kbps, VMAF 94.105SVT-AV1 (AV1) q=53: 1,228.8 kbps, VMAF 98.014SVT-AV1 (AV1) q=48: 1,568 kbps, VMAF 99.402SVT-AV1 (AV1) q=43: 2,011.5 kbps, VMAF 99.893SVT-AV1 (AV1) q=38: 2,763.9 kbps, VMAF 99.969SVT-AV1 (AV1) q=32: 4,248.7 kbps, VMAF 99.976SVT-AV1 (AV1) q=26: 7,180 kbps, VMAF 99.981
x264 (H.264)x265 (HEVC)SVT-AV1 (AV1)
blue_sky — blue sky and tree branches — size vs. VMAF
EncoderQualityBitrateVMAF meanVMAF 5th pctPSNR-YEncode fpsCPU time (s)
SVT-AV1 (AV1)267,180 kbps99.98100.0041.5073.9224.7
SVT-AV1 (AV1)324,248.7 kbps99.98100.0040.2855.4928.5
SVT-AV1 (AV1)382,763.9 kbps99.97100.0039.0969.6227.2
SVT-AV1 (AV1)432,011.5 kbps99.8999.3138.2177.2124.3
SVT-AV1 (AV1)481,568 kbps99.4096.6937.4460.5627.3
SVT-AV1 (AV1)531,228.8 kbps98.0193.5736.6470.2428.4
SVT-AV1 (AV1)58870.1 kbps94.1188.6435.3870.9426.2
SVT-AV1 (AV1)62488.1 kbps85.2878.6533.2368.3627.7
x264 (H.264)209,140.9 kbps99.98100.0041.1020.1134.1
x264 (H.264)244,535.6 kbps99.97100.0039.3126.925.9
x264 (H.264)282,490.2 kbps99.5197.4437.2534.6421.3
x264 (H.264)321,507.1 kbps94.9189.3334.9841.0518.2
x264 (H.264)36961.5 kbps83.5875.2632.5546.7616.2
x264 (H.264)40656.5 kbps68.1158.8030.0750.8114.9
x264 (H.264)44477.2 kbps50.6441.1027.5552.2614.0
x264 (H.264)48359.8 kbps32.2426.1524.9552.913.6
x265 (HEVC)226,348.2 kbps99.98100.0041.1417.7256.6
x265 (HEVC)263,362 kbps99.9099.3639.4123.6942.1
x265 (HEVC)301,874.4 kbps98.0892.6137.4228.7134.3
x265 (HEVC)341,077.3 kbps92.2383.5135.2532.3929.4
x265 (HEVC)38638.4 kbps81.8172.8032.9536.4126.3
x265 (HEVC)42369.4 kbps67.5457.3630.5039.8823.4
x265 (HEVC)46201.6 kbps49.6840.2827.9039.1123.2
x265 (HEVC)50109.6 kbps31.3623.6225.3141.8621.3
blue_sky — blue sky and tree branches — all measurements

pedestrian_area — pedestrian street

102030405060708090100200k500k1M2M5MBitrate (bps, log scale)VMAFx264 (H.264) q=48: 327.9 kbps, VMAF 18.817x264 (H.264) q=44: 482.4 kbps, VMAF 31.523x264 (H.264) q=40: 706.5 kbps, VMAF 48.43x264 (H.264) q=36: 1,054.6 kbps, VMAF 65.045x264 (H.264) q=32: 1,595.6 kbps, VMAF 78.588x264 (H.264) q=28: 2,480 kbps, VMAF 88.665x264 (H.264) q=24: 4,063.8 kbps, VMAF 95.405x264 (H.264) q=20: 7,819.9 kbps, VMAF 98.753x265 (HEVC) q=50: 161.9 kbps, VMAF 15.487x265 (HEVC) q=46: 213.5 kbps, VMAF 27.706x265 (HEVC) q=42: 341.1 kbps, VMAF 45.205x265 (HEVC) q=38: 570.8 kbps, VMAF 62.096x265 (HEVC) q=34: 924.9 kbps, VMAF 76.503x265 (HEVC) q=30: 1,472.2 kbps, VMAF 87.05x265 (HEVC) q=26: 2,415.2 kbps, VMAF 93.891x265 (HEVC) q=22: 4,357.1 kbps, VMAF 97.842SVT-AV1 (AV1) q=62: 272.4 kbps, VMAF 56.185SVT-AV1 (AV1) q=58: 495.2 kbps, VMAF 70.493SVT-AV1 (AV1) q=53: 751.9 kbps, VMAF 79.672SVT-AV1 (AV1) q=48: 1,060.8 kbps, VMAF 85.514SVT-AV1 (AV1) q=43: 1,462.9 kbps, VMAF 90.152SVT-AV1 (AV1) q=38: 2,061.5 kbps, VMAF 93.847SVT-AV1 (AV1) q=32: 3,124.9 kbps, VMAF 96.966SVT-AV1 (AV1) q=26: 4,800.1 kbps, VMAF 98.608
x264 (H.264)x265 (HEVC)SVT-AV1 (AV1)
pedestrian_area — pedestrian street — size vs. VMAF
EncoderQualityBitrateVMAF meanVMAF 5th pctPSNR-YEncode fpsCPU time (s)
SVT-AV1 (AV1)264,800.1 kbps98.6195.9141.7068.0628.0
SVT-AV1 (AV1)323,124.9 kbps96.9793.8741.0173.5325.8
SVT-AV1 (AV1)382,061.5 kbps93.8590.8240.1175.2826.1
SVT-AV1 (AV1)431,462.9 kbps90.1587.0139.2674.4726.1
SVT-AV1 (AV1)481,060.8 kbps85.5180.5438.3376.2926.8
SVT-AV1 (AV1)53751.9 kbps79.6773.3837.2871.2927.7
SVT-AV1 (AV1)58495.2 kbps70.4962.0135.7867.0826.3
SVT-AV1 (AV1)62272.4 kbps56.1945.2933.5276.0325.0
x264 (H.264)207,819.9 kbps98.7595.9741.6516.9943.5
x264 (H.264)244,063.8 kbps95.4192.4040.3423.6334.4
x264 (H.264)282,480 kbps88.6785.9138.7230.3728.4
x264 (H.264)321,595.6 kbps78.5975.9636.9137.0624.4
x264 (H.264)361,054.6 kbps65.0562.3034.9542.0421.4
x264 (H.264)40706.5 kbps48.4345.6032.8545.4318.3
x264 (H.264)44482.4 kbps31.5228.5730.5246.5216.6
x264 (H.264)48327.9 kbps18.8215.2928.1147.4715.8
x265 (HEVC)224,357.1 kbps97.8495.0641.4812.9376.1
x265 (HEVC)262,415.2 kbps93.8991.0840.1515.8561.9
x265 (HEVC)301,472.2 kbps87.0584.3638.5418.7752.4
x265 (HEVC)34924.9 kbps76.5073.5136.6921.3346.2
x265 (HEVC)38570.8 kbps62.1058.7634.6724.639.6
x265 (HEVC)42341.1 kbps45.2040.8132.4827.9534.0
x265 (HEVC)46213.5 kbps27.7123.3330.2731.6529.5
x265 (HEVC)50161.9 kbps15.4911.1328.2834.9625.5
pedestrian_area — pedestrian street — all measurements

riverbed — riverbed (fine ripples)

2030405060708090100500k1M2M5M10M20MBitrate (bps, log scale)VMAFx264 (H.264) q=48: 802.4 kbps, VMAF 21.166x264 (H.264) q=44: 1,365.6 kbps, VMAF 24.48x264 (H.264) q=40: 2,576.3 kbps, VMAF 34.707x264 (H.264) q=36: 4,446.8 kbps, VMAF 52.612x264 (H.264) q=32: 7,254.3 kbps, VMAF 72.382x264 (H.264) q=28: 11,622.6 kbps, VMAF 88.974x264 (H.264) q=24: 18,482 kbps, VMAF 99.738x264 (H.264) q=20: 29,769.2 kbps, VMAF 99.957x265 (HEVC) q=50: 503 kbps, VMAF 21.735x265 (HEVC) q=46: 677.3 kbps, VMAF 23.448x265 (HEVC) q=42: 1,262.9 kbps, VMAF 31.42x265 (HEVC) q=38: 2,512.6 kbps, VMAF 46.324x265 (HEVC) q=34: 4,533.4 kbps, VMAF 63.208x265 (HEVC) q=30: 7,534.2 kbps, VMAF 79.562x265 (HEVC) q=26: 12,067 kbps, VMAF 92.254x265 (HEVC) q=22: 19,060.6 kbps, VMAF 99.592SVT-AV1 (AV1) q=62: 890.7 kbps, VMAF 27.278SVT-AV1 (AV1) q=58: 1,952.4 kbps, VMAF 46.679SVT-AV1 (AV1) q=53: 3,294.3 kbps, VMAF 62.828SVT-AV1 (AV1) q=48: 4,898.8 kbps, VMAF 75.847SVT-AV1 (AV1) q=43: 7,006.5 kbps, VMAF 86.861SVT-AV1 (AV1) q=38: 9,929.6 kbps, VMAF 95.155SVT-AV1 (AV1) q=32: 14,848.9 kbps, VMAF 99.663SVT-AV1 (AV1) q=26: 22,627.5 kbps, VMAF 99.971
x264 (H.264)x265 (HEVC)SVT-AV1 (AV1)
riverbed — riverbed (fine ripples) — size vs. VMAF
EncoderQualityBitrateVMAF meanVMAF 5th pctPSNR-YEncode fpsCPU time (s)
SVT-AV1 (AV1)2622,627.5 kbps99.97100.0039.7152.1538.7
SVT-AV1 (AV1)3214,848.9 kbps99.6698.0838.3654.4936.3
SVT-AV1 (AV1)389,929.6 kbps95.1690.0336.7655.136.4
SVT-AV1 (AV1)437,006.5 kbps86.8680.0735.3057.6434.7
SVT-AV1 (AV1)484,898.8 kbps75.8567.4733.8356.8237.1
SVT-AV1 (AV1)533,294.3 kbps62.8353.4632.2354.3137.2
SVT-AV1 (AV1)581,952.4 kbps46.6836.7530.3258.4834.7
SVT-AV1 (AV1)62890.7 kbps27.2816.3327.9162.9232.6
x264 (H.264)2029,769.2 kbps99.96100.0039.7712.2583.8
x264 (H.264)2418,482 kbps99.7498.7437.6013.8275.1
x264 (H.264)2811,622.6 kbps88.9786.9935.3815.6766.7
x264 (H.264)327,254.3 kbps72.3869.8633.1318.6656.3
x264 (H.264)364,446.8 kbps52.6149.6130.7920.645.1
x264 (H.264)402,576.3 kbps34.7131.5928.2922.3933.3
x264 (H.264)441,365.6 kbps24.4821.8125.9123.624.8
x264 (H.264)48802.4 kbps21.1718.4024.7524.2521.9
x265 (HEVC)2219,060.6 kbps99.5998.1138.694.08239.4
x265 (HEVC)2612,067 kbps92.2588.3136.644.88200.6
x265 (HEVC)307,534.2 kbps79.5674.6534.545.89166.0
x265 (HEVC)344,533.4 kbps63.2157.7932.367.2136.0
x265 (HEVC)382,512.6 kbps46.3241.0830.219.15107.0
x265 (HEVC)421,262.9 kbps31.4226.5428.1412.6178.0
x265 (HEVC)46677.3 kbps23.4520.5726.4918.8452.1
x265 (HEVC)50503 kbps21.7317.7724.9827.3534.3
riverbed — riverbed (fine ripples) — all measurements

rush_hour — evening rush-hour traffic

102030405060708090100100k200k500k1M2M5MBitrate (bps, log scale)VMAFx264 (H.264) q=48: 193.7 kbps, VMAF 24.161x264 (H.264) q=44: 319 kbps, VMAF 35.322x264 (H.264) q=40: 534.7 kbps, VMAF 49.19x264 (H.264) q=36: 875.7 kbps, VMAF 63.431x264 (H.264) q=32: 1,397.4 kbps, VMAF 75.593x264 (H.264) q=28: 2,275.6 kbps, VMAF 84.821x264 (H.264) q=24: 3,883 kbps, VMAF 91.335x264 (H.264) q=20: 8,033 kbps, VMAF 95.617x265 (HEVC) q=50: 83.5 kbps, VMAF 18.764x265 (HEVC) q=46: 123.4 kbps, VMAF 29.577x265 (HEVC) q=42: 202 kbps, VMAF 43.394x265 (HEVC) q=38: 370.5 kbps, VMAF 58.295x265 (HEVC) q=34: 684.4 kbps, VMAF 71.433x265 (HEVC) q=30: 1,233.5 kbps, VMAF 81.816x265 (HEVC) q=26: 2,198.4 kbps, VMAF 88.967x265 (HEVC) q=22: 4,009.4 kbps, VMAF 93.759SVT-AV1 (AV1) q=62: 204.5 kbps, VMAF 53.406SVT-AV1 (AV1) q=58: 376.8 kbps, VMAF 63.708SVT-AV1 (AV1) q=53: 581.1 kbps, VMAF 70.58SVT-AV1 (AV1) q=48: 856.5 kbps, VMAF 76.452SVT-AV1 (AV1) q=43: 1,228.6 kbps, VMAF 81.817SVT-AV1 (AV1) q=38: 1,814.3 kbps, VMAF 86.535SVT-AV1 (AV1) q=32: 2,889.4 kbps, VMAF 91.353SVT-AV1 (AV1) q=26: 4,432.4 kbps, VMAF 94.453
x264 (H.264)x265 (HEVC)SVT-AV1 (AV1)
rush_hour — evening rush-hour traffic — size vs. VMAF
EncoderQualityBitrateVMAF meanVMAF 5th pctPSNR-YEncode fpsCPU time (s)
SVT-AV1 (AV1)264,432.4 kbps94.4591.7542.1368.3828.0
SVT-AV1 (AV1)322,889.4 kbps91.3588.6941.4874.4925.1
SVT-AV1 (AV1)381,814.3 kbps86.5382.9840.5481.8922.7
SVT-AV1 (AV1)431,228.6 kbps81.8276.8039.7477.4525.0
SVT-AV1 (AV1)48856.5 kbps76.4570.5138.8880.3624.8
SVT-AV1 (AV1)53581.1 kbps70.5864.9637.9478.6925.2
SVT-AV1 (AV1)58376.8 kbps63.7157.1736.8384.0623.4
SVT-AV1 (AV1)62204.5 kbps53.4146.0435.1186.0622.9
x264 (H.264)208,033 kbps95.6294.0942.0416.949.3
x264 (H.264)243,883 kbps91.3389.4541.0724.1835.5
x264 (H.264)282,275.6 kbps84.8282.4039.8431.4928.6
x264 (H.264)321,397.4 kbps75.5972.8638.3039.0623.6
x264 (H.264)36875.7 kbps63.4359.9436.4544.2219.5
x264 (H.264)40534.7 kbps49.1945.0334.2945.816.6
x264 (H.264)44319 kbps35.3231.1231.8446.7614.4
x264 (H.264)48193.7 kbps24.1620.1929.2047.5313.5
x265 (HEVC)224,009.4 kbps93.7692.0641.7711.8482.8
x265 (HEVC)262,198.4 kbps88.9786.8240.7315.0365.0
x265 (HEVC)301,233.5 kbps81.8278.9539.3519.5450.6
x265 (HEVC)34684.4 kbps71.4367.9137.6824.239.7
x265 (HEVC)38370.5 kbps58.3054.3435.6928.7331.5
x265 (HEVC)42202 kbps43.3939.1333.4730.9226.5
x265 (HEVC)46123.4 kbps29.5825.8231.2333.8223.9
x265 (HEVC)5083.5 kbps18.7615.4129.2732.9422.6
rush_hour — evening rush-hour traffic — all measurements

How to read it, and what we see

1. Target VMAF 95: true CRF and how far off each method was

Each cell is "CRF error / size error". For example, +1.87 / −20.6% means the estimated CRF is 1.87 higher than the true one, so the size read at that CRF is 20.6% smaller than the true size (and the quality is lower than the target by that much).

Clip · encoderTrue CRFTrue kbpsFixed 2 points (CRF error / size error)Binary search, 2 trials (CRF error / size error)
blue_sky · x26431.921522−2.20 / +31.8%−0.06 / +0.8%
blue_sky · x26532.111400−0.90 / +13.2%−0.99 / +14.7%
blue_sky · SVT-AV156.86942+19.27 / outside grid+12.19 / outside grid
pedestrian_area · x26424.243945+1.87 / −20.6%−0.05 / +0.6%
pedestrian_area · x26524.882850+2.84 / −31.5%+0.61 / −8.6%
pedestrian_area · SVT-AV135.782404+1.00 / −6.7%−0.61 / +4.3%
riverbed · x26425.7615069+0.91 / −10.0%−0.38 / +4.4%
riverbed · x26524.5014318+1.65 / −17.2%+0.74 / −8.1%
riverbed · SVT-AV138.099865−0.02 / +0.2%−2.09 / +15.1%
rush_hour · x26420.587234+4.00 / −50.3%+1.56 / −24.7%

VMAF 95. The true values are interpolated from the 8-point grid. rush_hour with x265 and SVT-AV1 is excluded because the grid's maximum VMAF falls short of 95. Test CRFs for binary search with 2 trials: x264 32 and 24, x265 34 and 26; SVT-AV1 43 and 53 for blue_sky only, and 43 and 32 for the rest.

2. Target VMAF 93: the same comparison

Clip · encoderTrue CRFTrue kbpsFixed 2 points (CRF error / size error)Binary search, 2 trials (CRF error / size error)
blue_sky · x26432.671397−2.19 / +30.4%−0.10 / +1.2%
blue_sky · x26533.481158−1.48 / +22.7%−0.27 / +3.9%
blue_sky · SVT-AV158.50809+32.97 / outside grid+21.18 / outside grid
pedestrian_area · x26425.433407+1.28 / −14.6%−0.28 / +3.6%
pedestrian_area · x26526.522264+1.77 / −19.7%−0.11 / +1.4%
pedestrian_area · SVT-AV139.151906−0.25 / +1.7%−0.74 / +5.2%
riverbed · x26426.5013824+0.61 / −6.8%−0.53 / +6.4%
riverbed · x26525.5912641+1.06 / −11.6%+0.20 / −2.3%
riverbed · SVT-AV139.309070−0.30 / +2.1%−1.57 / +11.5%
rush_hour · x26422.445151+2.80 / −36.2%+0.71 / −12.1%
rush_hour · x26522.633645+3.87 / −44.0%+1.53 / −20.5%
rush_hour · SVT-AV128.813627+3.11 / −19.9%+1.29 / −8.8%

VMAF 93. The test CRFs for binary search with 2 trials are the same as in the table above, except for x264 on blue_sky, which is 32 and 40. The true values are interpolated.

3. What we see

  • Binary search with 2 trials got us to a "roughly right CRF" and not much closer. In the 20 cases where the estimate stayed inside the grid (9 at VMAF 95, 11 at VMAF 93), the CRF error was 0.05 to 2.09 and the size error was 0.6 to 24.7%. The size error was 5% or less in 9 of those 20 cases (4 at VMAF 95, 5 at VMAF 93).
  • Letting the search pick the points beat fixed 2 points. Fixed 2 points had a CRF error of 0.02 to 4.00 and a size error of 0.2 to 50.3% in the 20 cases that stayed inside the grid. Among the 20 cases where both methods could be computed, binary search with 2 trials had the smaller CRF error in 16 cases, and the reverse held in 4 (blue_sky x265 at VMAF 95, riverbed SVT-AV1 at both 95 and 93, and pedestrian_area SVT-AV1 at 93). In those, the fixed points happened to pass close to the true answer.
  • The adjacent interval closed on the 3rd trial. Halving 8 points narrows them to two adjacent points in at most 3 steps. In 21 of the 22 cases, the 3rd trial found the adjacent interval bracketing the true answer, and in this simulation the error for those cases is zero by definition (the ground-truth curve is the same grid). In the remaining case (blue_sky SVT-AV1, VMAF 93), the test points CRF 43, 53 and 58 were all at or above 93, so the interval did not close, and the error was CRF +0.91 and size −12.4%. In that case the procedure's next test would be CRF 62, so the interval should close on the 4th trial, but we did not calculate that value.
  • Adding more fixed points did not always help. Fixed 3 points, which use the 2nd, 5th and 7th grid points (x264 CRF 24, 36 and 44), had a larger CRF error than fixed 2 points in 4 of the 9 comparable cases at VMAF 95 (for example −4.28 vs. −2.20 for blue_sky x264). Whether the test points are near the target mattered more than the number of trials.
  • When the target lay outside the test points, the estimate fell short (rush_hour). On rush_hour, there are 4 cases where both test points of binary search with 2 trials were below the target, so the line had to be extended (x264 at VMAF 95 and 93, x265 and SVT-AV1 at VMAF 93). In all 4, the estimated CRF was 0.71 to 1.56 higher than the true one, the VMAF at that CRF was 0.67 to 1.83 below the target, and the size was 8.8 to 24.7% smaller. In other words, the extended line fell less steeply than the real curve. Cases that needed extension also occurred in other clips (for example pedestrian_area x265 at VMAF 95, +0.61) with smaller errors, so we do not say this is unique to rush_hour.
  • On blue_sky with SVT-AV1, whose curve is flat, the 2-point estimate fell outside the grid. The VMAF at CRF 43 and 53 was 99.893 and 98.014, almost flat, so a line through those two points would have to reach a CRF near 69, which is 12.19 above the true value (56.86), to touch the target of 95 (fixed points 38 and 53: +19.27). The same happened at VMAF 93 (+21.18). Two points in a flat region cannot tell you where the curve starts to bend. For blue_sky with x264 and x265, the estimates stayed inside the grid in the same way, and the binary search errors with 2 trials were 0.06 and 0.99 (VMAF 95).
  • The cost of one test differs from clip to clip. Even with the same three trials, x265 on riverbed (CRF 34, 26 and 22) took a utime of 135.984 + 200.594 + 239.422 = 576.0 seconds, while SVT-AV1 on rush_hour (CRF 43, 32 and 26) took 24.984 + 25.125 + 27.984 = 78.1 seconds. These are CPU times summed over threads, measured at IDLE priority, so treat them as reference values.
  • It is hard to say that one codec is more accurate to search. The CRF error ranges for binary search with 2 trials were 0.05 to 1.56 for x264, 0.11 to 1.53 for x265 and 0.61 to 2.09 for SVT-AV1 (in-range cases only). But the SVT-AV1 grid has wider spacing (4 to 6) than x264 and x265 (4), so the same size error shows up as a larger CRF error. This data does not let us say which codec is easier to search.

Limitations

  • It is a simulation on the grid. We did not re-encode to verify, and both the true answer and the estimate come from curves interpolated from the same 8 points. So the zero error after 3 binary-search trials is a structural result, not real accuracy. A real tool can test arbitrary CRFs between grid points, so its results may differ.
  • The search rule is one simple choice. We only tested the rule that starts in the middle and halves the range, plus the fixed-point method. We did not reproduce the first guess or interpolation scheme of a real tool such as ab-av1.
  • There are only four 10-second clips. The same numbers will not necessarily appear on other videos. With only 22 cells, the proportions come from a small sample.
  • We targeted only mean VMAF. Low per-frame scores and perceived quality are not part of this article's target.
  • 8-bit yuv420p, one PC, one preset per codec (x264 medium, x265 medium, SVT-AV1 8). Curve shapes may differ with other presets, resolutions, frame rates or 10-bit. Times are measured at IDLE priority, so treat them as reference values.
  • There are only two target VMAF values (95 and 93). We did not cover targets of 90 or below, or 98 or above.

Practical recommendations

  • If you use a tool that finds the target VMAF automatically, the first guess and the second test matter. In this data, 2 trials gave a "roughly right" value, but the error differed a lot between pairs that passed near the target and pairs that did not. Check the tool's log for the tested CRFs and VMAF scores and see whether they bracket the target from above and below.
  • If both test points are on the same side of the target, one more trial is better. Cases that needed extension, like rush_hour, fell short. Measuring the real VMAF of the final result once is the surest check.
  • For easy content (where the curve is flat), spread the test points out to higher CRFs. On blue_sky with SVT-AV1, CRF 43 and 53 were both above 98, so two points could not tell us where the curve bends.
  • For long videos, testing on a part of the video is faster, but this article did not measure that effect. Just note that the cost of a test differed by more than 7x depending on clip and encoder (576.0 seconds vs. 78.1 seconds above). For a sense of encoding time, see CRF vs. encoding time, and for how much size grows as you lower CRF in the high-quality range, see the high-quality range measurements.

You can download the full raw data as a CSV at the very bottom of the page. The true values and errors in the tables can be reproduced from the q, vmaf_mean and kbps columns of the CSV alone.

Raw data: target-vmaf-crf-search-trials-v1.csv