What Does Capped CRF (maxrate + bufsize) Cost in Quality? File Size and 5th-Percentile VMAF at 2, 4 and 8 Mbps Caps (x264, x265)
We added vbv-maxrate caps of 2, 4 and 8 Mbps to three CRF levels in x264 and x265 and compared against uncapped CRF. In 47 of 72 cells the file got more than 2% smaller, while the 24 cells whose average bitrate was at or below 80% of the cap were essentially unchanged. In one cell the mean VMAF fell only 2.6 points while the minimum VMAF fell 22.3 points, and on riverbed the mean VMAF dropped to between 30 and 83 depending on the cap.
The test PC, FFmpeg and VMAF settings shared by every lab article are collected on the methodology page. Methodology (common to all tests)
If the cap is well above the average bitrate, it is free. Once it reaches or falls below the average, the 5th-percentile and minimum VMAF collapse before the mean does. In the 24 cells where the average bitrate was at or below 80% of the cap, file size changed by within ±2% (at most +1.8%) and VMAF was nearly the same. In the other direction, 47 of 72 cells got more than 2% smaller (of 24 cells per cap: 9 at 8 Mbps, 16 at 4 Mbps, 22 at 2 Mbps). With the 2 Mbps cap on blue_sky in x265, mean VMAF fell by only 2.4 to 2.6 points (CRF 20 and 25), but the 5th percentile fell by 12.4 to 15.5 points and the minimum by 14.3 to 22.3 points. The biggest losses were concentrated in riverbed: at x264 CRF 18, adding 8, 4 and 2 Mbps caps took the mean VMAF from 99.97 to 78.7, 51.0 and 30.7. In the 9 cases where all three CRF levels were capped, the mean VMAF differed by 0.3 points or less across CRFs, so the cap, not the CRF, set the quality. These results are in VMAF and do not mean the same thing as quality to the human eye.
Why this matters
Streaming and upload specs often come with a limit such as "maximum bitrate X Mbps." But CRF holds quality fixed and lets file size follow, so on hard scenes the bitrate can spike. That is why CRF is often combined with maxrate (vbv-maxrate in x264 and x265) and bufsize to get "a quality target plus a ceiling." The 2-pass vs CRF test at the same size found them tied on mean VMAF, but that article did not use maxrate and listed it as out of scope. This article measures that gap.
We ask three questions. (1) When does the cap actually kick in (compared with the average bitrate of uncapped CRF)? (2) Once it does, how far do the mean, 5th-percentile and minimum VMAF fall? (3) Is that loss concentrated in footage with a lot of motion and texture? We also look at which is better at the same file size: a lower CRF with a cap, or a higher CRF without one.
Test method
VMAF is a quality metric developed by Netflix. It compares the original and the encoded result frame by frame and scores each from 0 to 100. The closer to 100, the harder it is to tell from the original. The 5th percentile (p5) is the score at the 5% mark when frames are sorted from worst to best, and the minimum (min) is the score of the single worst frame. When you apply a cap, the frames in sections that run short of bits get worse first, so these two are more sensitive than the mean (VMAF worst-frame measurements). It still does not reproduce human-perceived quality exactly, so every "higher quality" in this article means "higher VMAF."
Encoder settings
The preset is medium throughout. Caps are absolute values (kbps), and bufsize is fixed at twice the maxrate (about 2 seconds' worth). CRF scales differ between codecs, so we do not compare CRF numbers directly.
# x264 no cap
-c:v libx264 -preset medium -crf Q -threads 4
# x264 cap2m (cap4m is 4000/8000, cap8m is 8000/16000)
-c:v libx264 -preset medium -crf Q -threads 4 -x264-params vbv-maxrate=2000:vbv-bufsize=4000
# x265 no cap
-c:v libx265 -preset medium -crf Q -x265-params pools=4:log-level=error
# x265 cap2m (cap4m is 4000/8000, cap8m is 8000/16000)
-c:v libx265 -preset medium -crf Q -x265-params pools=4:log-level=error:vbv-maxrate=2000:vbv-bufsize=4000Bitrate (kbps) is the output file size divided by 10 seconds, so it includes a little container overhead. This article looks only at the average bitrate over the full 10 seconds. We did not measure how often the instantaneous bitrate exceeded a spec during broadcast or delivery.
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 2026-11-08).
Results by clip
In the curves, the x-axis is bitrate and the y-axis is VMAF. Each encoder setting gets one curve, and names like "+cap2m" are the capped ones. On a capped curve the points bunch up near the cap, and cells where the cap did not engage overlap the uncapped curve. The time column in the table fluctuates because the jobs ran at IDLE priority, so treat it as a reference only.
blue_sky — blue sky and tree branches
| Encoder | Quality | Bitrate | VMAF mean | VMAF 5th pct | PSNR-Y | Encode fps | CPU time (s) |
|---|---|---|---|---|---|---|---|
| x264 (H.264) · preset medium | 18 | 13,774.3 kbps | 99.98 | 100.00 | 41.95 | 17.84 | 39.7 |
| x264 (H.264) · preset medium+cap2m | 18 | 1,873.7 kbps | 97.73 | 90.68 | 36.15 | 37.48 | 20.5 |
| x264 (H.264) · preset medium+cap4m | 18 | 3,743.8 kbps | 99.93 | 100.00 | 38.82 | 28.87 | 25.1 |
| x264 (H.264) · preset medium+cap8m | 18 | 7,508.1 kbps | 99.98 | 100.00 | 40.65 | 21.51 | 33.6 |
| x264 (H.264) · preset medium | 23 | 5,346.3 kbps | 99.97 | 100.00 | 39.79 | 25.73 | 27.1 |
| x264 (H.264) · preset medium+cap2m | 23 | 1,872.6 kbps | 97.66 | 91.23 | 36.15 | 37.8 | 19.7 |
| x264 (H.264) · preset medium+cap4m | 23 | 3,716.8 kbps | 99.92 | 100.00 | 38.81 | 28.86 | 24.6 |
| x264 (H.264) · preset medium+cap8m | 23 | 5,346.3 kbps | 99.97 | 100.00 | 39.79 | 25.85 | 27.8 |
| x264 (H.264) · preset medium | 28 | 2,490.2 kbps | 99.51 | 97.44 | 37.25 | 34.97 | 21.7 |
| x264 (H.264) · preset medium+cap2m | 28 | 1,864 kbps | 97.63 | 90.96 | 36.13 | 38.36 | 19.8 |
| x264 (H.264) · preset medium+cap4m | 28 | 2,488.9 kbps | 99.51 | 97.39 | 37.25 | 33.75 | 21.6 |
| x264 (H.264) · preset medium+cap8m | 28 | 2,488.9 kbps | 99.51 | 97.39 | 37.25 | 33.64 | 21.9 |
| x265 (HEVC) · preset medium | 20 | 8,874.1 kbps | 99.98 | 100.00 | 41.91 | 13.05 | 76.8 |
| x265 (HEVC) · preset medium+cap2m | 20 | 1,878.7 kbps | 97.42 | 87.61 | 37.56 | 26.39 | 37.2 |
| x265 (HEVC) · preset medium+cap4m | 20 | 3,773.8 kbps | 99.64 | 95.83 | 39.77 | 20.58 | 48.6 |
| x265 (HEVC) · preset medium+cap8m | 20 | 7,158.8 kbps | 99.95 | 100.00 | 41.47 | 14.9 | 67.1 |
| x265 (HEVC) · preset medium | 25 | 3,932.2 kbps | 99.96 | 100.00 | 39.87 | 19.94 | 50.3 |
| x265 (HEVC) · preset medium+cap2m | 25 | 1,883 kbps | 97.53 | 84.52 | 37.57 | 26.1 | 37.5 |
| x265 (HEVC) · preset medium+cap4m | 25 | 3,522.1 kbps | 99.72 | 97.96 | 39.66 | 20.76 | 48.0 |
| x265 (HEVC) · preset medium+cap8m | 25 | 4,003.5 kbps | 99.96 | 100.00 | 39.94 | 19.63 | 50.7 |
| x265 (HEVC) · preset medium | 30 | 1,874.4 kbps | 98.08 | 92.61 | 37.42 | 25.99 | 37.5 |
| x265 (HEVC) · preset medium+cap2m | 30 | 1,762.8 kbps | 97.70 | 90.28 | 37.30 | 26.38 | 37.3 |
| x265 (HEVC) · preset medium+cap4m | 30 | 1,900 kbps | 98.32 | 92.70 | 37.49 | 25.68 | 38.5 |
| x265 (HEVC) · preset medium+cap8m | 30 | 1,900 kbps | 98.32 | 92.70 | 37.49 | 25.55 | 38.6 |
pedestrian_area — pedestrian street
| Encoder | Quality | Bitrate | VMAF mean | VMAF 5th pct | PSNR-Y | Encode fps | CPU time (s) |
|---|---|---|---|---|---|---|---|
| x264 (H.264) · preset medium | 18 | 12,757.4 kbps | 99.40 | 97.15 | 42.27 | 15.2 | 51.0 |
| x264 (H.264) · preset medium+cap2m | 18 | 2,158.6 kbps | 85.88 | 82.04 | 38.17 | 31.79 | 28.0 |
| x264 (H.264) · preset medium+cap4m | 18 | 4,313.9 kbps | 95.80 | 93.19 | 40.49 | 23.29 | 34.8 |
| x264 (H.264) · preset medium+cap8m | 18 | 8,626.5 kbps | 98.94 | 96.24 | 41.77 | 16.77 | 44.7 |
| x264 (H.264) · preset medium | 23 | 4,677.9 kbps | 96.57 | 93.44 | 40.70 | 22.29 | 35.3 |
| x264 (H.264) · preset medium+cap2m | 23 | 2,158.4 kbps | 85.90 | 82.02 | 38.17 | 32.54 | 27.7 |
| x264 (H.264) · preset medium+cap4m | 23 | 4,286.5 kbps | 95.79 | 93.23 | 40.48 | 22.94 | 34.9 |
| x264 (H.264) · preset medium+cap8m | 23 | 4,677.9 kbps | 96.57 | 93.44 | 40.70 | 22.39 | 36.8 |
| x264 (H.264) · preset medium | 28 | 2,480 kbps | 88.67 | 85.91 | 38.72 | 31.15 | 27.7 |
| x264 (H.264) · preset medium+cap2m | 28 | 2,158.2 kbps | 85.91 | 82.09 | 38.17 | 32.08 | 27.6 |
| x264 (H.264) · preset medium+cap4m | 28 | 2,480 kbps | 88.67 | 85.91 | 38.72 | 30.36 | 29.4 |
| x264 (H.264) · preset medium+cap8m | 28 | 2,480 kbps | 88.67 | 85.91 | 38.72 | 29.98 | 28.8 |
| x265 (HEVC) · preset medium | 20 | 6,375.6 kbps | 98.79 | 96.23 | 42.06 | 9.75 | 101.4 |
| x265 (HEVC) · preset medium+cap2m | 20 | 2,156.6 kbps | 92.57 | 90.11 | 39.85 | 14.64 | 67.8 |
| x265 (HEVC) · preset medium+cap4m | 20 | 4,305.8 kbps | 97.68 | 95.13 | 41.45 | 11.58 | 85.4 |
| x265 (HEVC) · preset medium+cap8m | 20 | 6,415.5 kbps | 98.82 | 96.22 | 42.07 | 9.78 | 101.1 |
| x265 (HEVC) · preset medium | 25 | 2,760.9 kbps | 95.15 | 92.27 | 40.51 | 13.33 | 74.2 |
| x265 (HEVC) · preset medium+cap2m | 25 | 2,156.7 kbps | 92.60 | 90.03 | 39.85 | 14.67 | 67.1 |
| x265 (HEVC) · preset medium+cap4m | 25 | 2,785.8 kbps | 95.28 | 92.38 | 40.53 | 13.14 | 75.3 |
| x265 (HEVC) · preset medium+cap8m | 25 | 2,785.8 kbps | 95.28 | 92.38 | 40.53 | 13.23 | 74.5 |
| x265 (HEVC) · preset medium | 30 | 1,472.2 kbps | 87.05 | 84.36 | 38.54 | 16.39 | 60.5 |
| x265 (HEVC) · preset medium+cap2m | 30 | 1,482.2 kbps | 87.15 | 84.50 | 38.56 | 16.54 | 59.8 |
| x265 (HEVC) · preset medium+cap4m | 30 | 1,482.2 kbps | 87.15 | 84.50 | 38.56 | 16.33 | 60.7 |
| x265 (HEVC) · preset medium+cap8m | 30 | 1,482.2 kbps | 87.15 | 84.50 | 38.56 | 16.6 | 59.5 |
riverbed — riverbed (fine ripples)
| Encoder | Quality | Bitrate | VMAF mean | VMAF 5th pct | PSNR-Y | Encode fps | CPU time (s) |
|---|---|---|---|---|---|---|---|
| x264 (H.264) · preset medium | 18 | 38,282.7 kbps | 99.97 | 100.00 | 40.87 | 10.87 | 95.3 |
| x264 (H.264) · preset medium+cap2m | 18 | 2,157.4 kbps | 30.66 | 26.25 | 27.52 | 16.95 | 35.5 |
| x264 (H.264) · preset medium+cap4m | 18 | 4,299 kbps | 51.03 | 46.15 | 30.58 | 16.12 | 49.5 |
| x264 (H.264) · preset medium+cap8m | 18 | 8,619.4 kbps | 78.72 | 75.56 | 33.93 | 14.59 | 68.2 |
| x264 (H.264) · preset medium | 23 | 20,782.5 kbps | 99.94 | 100.00 | 38.15 | 12.43 | 84.2 |
| x264 (H.264) · preset medium+cap2m | 23 | 2,155.1 kbps | 30.62 | 26.25 | 27.51 | 17.18 | 35.1 |
| x264 (H.264) · preset medium+cap4m | 23 | 4,321.8 kbps | 51.25 | 46.76 | 30.61 | 16 | 49.4 |
| x264 (H.264) · preset medium+cap8m | 23 | 8,609.8 kbps | 78.68 | 75.39 | 33.92 | 14.62 | 68.1 |
| x264 (H.264) · preset medium | 28 | 11,622.6 kbps | 88.97 | 86.99 | 35.38 | 14.63 | 72.1 |
| x264 (H.264) · preset medium+cap2m | 28 | 2,158.2 kbps | 30.64 | 25.93 | 27.52 | 17.12 | 35.1 |
| x264 (H.264) · preset medium+cap4m | 28 | 4,296.3 kbps | 51.00 | 46.34 | 30.57 | 16.05 | 49.5 |
| x264 (H.264) · preset medium+cap8m | 28 | 8,615.6 kbps | 78.75 | 75.57 | 33.93 | 14.61 | 68.2 |
| x265 (HEVC) · preset medium | 20 | 24,234.5 kbps | 99.96 | 100.00 | 39.68 | 3.31 | 297.4 |
| x265 (HEVC) · preset medium+cap2m | 20 | 2,155.2 kbps | 42.24 | 36.03 | 29.68 | 8.52 | 115.8 |
| x265 (HEVC) · preset medium+cap4m | 20 | 4,304.7 kbps | 61.18 | 54.44 | 32.12 | 6.3 | 156.1 |
| x265 (HEVC) · preset medium+cap8m | 20 | 8,602.9 kbps | 82.90 | 77.49 | 35.07 | 4.69 | 209.0 |
| x265 (HEVC) · preset medium | 25 | 13,551 kbps | 94.81 | 91.17 | 37.17 | 4 | 245.9 |
| x265 (HEVC) · preset medium+cap2m | 25 | 2,154.5 kbps | 42.25 | 36.03 | 29.68 | 8.46 | 116.6 |
| x265 (HEVC) · preset medium+cap4m | 25 | 4,303.6 kbps | 61.19 | 54.84 | 32.12 | 6.38 | 155.1 |
| x265 (HEVC) · preset medium+cap8m | 25 | 8,601.6 kbps | 82.98 | 77.59 | 35.08 | 4.8 | 204.1 |
| x265 (HEVC) · preset medium | 30 | 7,534.2 kbps | 79.56 | 74.65 | 34.54 | 5.05 | 194.3 |
| x265 (HEVC) · preset medium+cap2m | 30 | 2,154.7 kbps | 42.27 | 36.35 | 29.68 | 8.4 | 117.7 |
| x265 (HEVC) · preset medium+cap4m | 30 | 4,304.7 kbps | 61.26 | 54.69 | 32.12 | 6.33 | 154.6 |
| x265 (HEVC) · preset medium+cap8m | 30 | 7,533 kbps | 79.58 | 74.66 | 34.55 | 5.05 | 194.7 |
rush_hour — evening rush-hour traffic
| Encoder | Quality | Bitrate | VMAF mean | VMAF 5th pct | PSNR-Y | Encode fps | CPU time (s) |
|---|---|---|---|---|---|---|---|
| x264 (H.264) · preset medium | 18 | 15,030.2 kbps | 97.17 | 95.82 | 42.64 | 13.98 | 62.7 |
| x264 (H.264) · preset medium+cap2m | 18 | 2,160.2 kbps | 83.72 | 79.79 | 39.65 | 31.04 | 28.5 |
| x264 (H.264) · preset medium+cap4m | 18 | 4,320.9 kbps | 92.10 | 89.54 | 41.25 | 22.6 | 37.7 |
| x264 (H.264) · preset medium+cap8m | 18 | 8,645.1 kbps | 95.75 | 94.06 | 42.07 | 16.19 | 52.1 |
| x264 (H.264) · preset medium | 23 | 4,508.2 kbps | 92.57 | 90.89 | 41.34 | 22.51 | 37.8 |
| x264 (H.264) · preset medium+cap2m | 23 | 2,159.3 kbps | 83.69 | 79.64 | 39.65 | 31.2 | 28.6 |
| x264 (H.264) · preset medium+cap4m | 23 | 4,302.3 kbps | 92.13 | 89.65 | 41.25 | 22.9 | 38.7 |
| x264 (H.264) · preset medium+cap8m | 23 | 4,508.3 kbps | 92.57 | 90.89 | 41.34 | 22.16 | 39.2 |
| x264 (H.264) · preset medium | 28 | 2,275.6 kbps | 84.82 | 82.40 | 39.84 | 31.3 | 29.1 |
| x264 (H.264) · preset medium+cap2m | 28 | 2,129.6 kbps | 83.64 | 79.85 | 39.62 | 31.65 | 28.7 |
| x264 (H.264) · preset medium+cap4m | 28 | 2,274.9 kbps | 84.81 | 82.34 | 39.84 | 30.89 | 29.2 |
| x264 (H.264) · preset medium+cap8m | 28 | 2,274.9 kbps | 84.81 | 82.34 | 39.84 | 30.67 | 29.7 |
| x265 (HEVC) · preset medium | 20 | 5,922.2 kbps | 95.44 | 94.01 | 42.20 | 8.67 | 113.7 |
| x265 (HEVC) · preset medium+cap2m | 20 | 2,155.7 kbps | 88.56 | 85.59 | 40.65 | 13.53 | 73.3 |
| x265 (HEVC) · preset medium+cap4m | 20 | 4,305.9 kbps | 93.91 | 91.86 | 41.81 | 10.07 | 98.2 |
| x265 (HEVC) · preset medium+cap8m | 20 | 5,891.7 kbps | 95.44 | 94.03 | 42.20 | 8.73 | 113.1 |
| x265 (HEVC) · preset medium | 25 | 2,543.4 kbps | 90.39 | 88.41 | 41.02 | 12.43 | 79.5 |
| x265 (HEVC) · preset medium+cap2m | 25 | 2,156.4 kbps | 88.62 | 85.46 | 40.66 | 13.63 | 72.7 |
| x265 (HEVC) · preset medium+cap4m | 25 | 2,543.5 kbps | 90.39 | 88.41 | 41.02 | 12.41 | 80.0 |
| x265 (HEVC) · preset medium+cap8m | 25 | 2,543.5 kbps | 90.39 | 88.41 | 41.02 | 12.57 | 78.8 |
| x265 (HEVC) · preset medium | 30 | 1,233.5 kbps | 81.82 | 78.95 | 39.35 | 17.13 | 57.7 |
| x265 (HEVC) · preset medium+cap2m | 30 | 1,233.6 kbps | 81.82 | 78.95 | 39.35 | 17.13 | 57.4 |
| x265 (HEVC) · preset medium+cap4m | 30 | 1,233.6 kbps | 81.82 | 78.95 | 39.35 | 17.1 | 57.4 |
| x265 (HEVC) · preset medium+cap8m | 30 | 1,233.6 kbps | 81.82 | 78.95 | 39.35 | 17.25 | 57.4 |
How to read it, and what we saw
1. When did the cap engage?
The tables below show the kbps column of the CSV. If the "No cap" value and the capped value on the same row are equal, the cap did not engage.
x264 medium. Unit: kbps.
x265 medium. Unit: kbps.
- In 47 of 72 cells the file got more than 2% smaller. That was 9 of 24 cells at 8 Mbps, 16 at 4 Mbps and 22 at 2 Mbps. The 2 Mbps cap affected almost every cell.
- The cap did not engage when the average was at or below 80% of the cap. In all 24 cells where the uncapped average bitrate was at or below 80% of the cap, the size change was between -0.5% and +1.8%. Where the average was 94% or 98% of the cap, engaged and non-engaged cells were mixed. x265 blue_sky CRF 25 averages 3932.2 kbps, below the 4 Mbps cap, yet shrank to 3522.1 kbps (-10.4%), and the same clip at CRF 30 averages 1874.4 kbps, below 2 Mbps, yet became 1762.8 kbps (-6.0%). This suggests the cap can engage even when the average is below it, if some section briefly goes over, but we did not measure the instantaneous bitrate.
- Where the cap engaged, the actual bitrate was 6.5 to 8% above the cap number. Excluding blue_sky, the engaged cells came out at 2129.6 to 2160.2 kbps for 2 Mbps, 4286.5 to 4321.8 kbps for 4 Mbps and 8609.8 to 8645.1 kbps for 8 Mbps, which is 1.065 to 1.081 times the cap. blue_sky stopped below the cap number (x264 2M 1864.0 to 1873.7, 4M 3716.8 to 3743.8, 8M 7508.1 kbps). Container overhead and the initial VBV buffer may both contribute, but we could not separate them with this data. If you must meet a spec on average bitrate, you may need to set the cap this much lower than the spec.
- x265 grew slightly even in cells where the cap did not engage. In blue_sky CRF 25 and 30 and pedestrian_area CRF 20, 25 and 30 it was +0.6% to +1.8% (for example blue_sky CRF 30, 1874.4 → 1900.0 kbps, mean VMAF 98.083 → 98.32). We did not measure the cause. x264 stayed within -0.1% in such cells.
- In capped cells, CRF did not determine the mean VMAF. In the 9 cases where all three CRF levels were capped (x264 blue_sky, pedestrian_area and rush_hour at 2M; riverbed at 2M, 4M and 8M; x265 blue_sky and riverbed at 2M; riverbed at 4M), the mean VMAF differed by 0.02 to 0.28 points. For example, x264 riverbed 2M at CRF 18, 23 and 28 scored 30.66, 30.62 and 30.64. The cap overrode the quality setting. The 5th percentile and minimum, however, varied more (the 5th percentile for x265 blue_sky 2M was 87.61, 84.52 and 90.28).
2. How much quality was lost when the cap engaged?
These are changes versus no cap at the lowest CRF (x264 18, x265 20). This CRF is where the cap engages most, so it is close to the upper bound of the loss. Each cell is size change / 5th-percentile VMAF change (points).
Change = capped value − uncapped value, same clip and same CRF. The 5th percentile is vmaf_p5 in the CSV.
The mean VMAF changes, in the same order, were as follows. For riverbed, x264 18 went from 99.97 to 78.72, 51.03 and 30.66 (8, 4 and 2M), and x265 20 went from 99.96 to 82.90, 61.18 and 42.25. For pedestrian_area, x264 18 went from 99.40 to 98.94, 95.80 and 85.88, and for rush_hour, x264 18 went from 97.17 to 95.75, 92.10 and 83.73.
- Apart from riverbed, the 8 Mbps cap cost little. For blue_sky, pedestrian_area and rush_hour at the lowest CRF, the 5th-percentile change was 0.0 to -1.8 points. Their size at CRF 18 still shrank by 32.4 to 45.5% (x264), so the cap did engage; it just cost little in score.
- From 4 Mbps, pedestrian_area and rush_hour also lost 4.0 to 6.3 points at the 5th percentile (x264). For x265 it was -1.1 to -2.1 points, so it fell less than x264 at the same cap. However, the CRF scales and file sizes differ, so this is not a like-for-like comparison.
- The biggest losses were concentrated in riverbed. Its uncapped average bitrate was 11.6 to 38.3 Mbps for x264 and 7.5 to 24.2 Mbps for x265, far above the caps. Adding a 2 Mbps cap to x264 CRF 18 cut the size by 94.4%, with a mean VMAF of 30.66 and a 5th percentile of 26.25. The loss tracked the ratio of the uncapped average bitrate to the cap.
- In capped cells, x265 had a higher mean VMAF than x264. At riverbed 2M it was 42.25 for x265 versus 30.66 for x264 (+11.6 points), at pedestrian_area 2M 92.57 versus 85.88 (+6.7 points), and at rush_hour 2M 88.56 versus 83.73 (+4.8 points). blue_sky 2M was nearly the same at 97.43 versus 97.73 (CRF 18 versus 20, same clip). In exchange, x265 took longer in CPU time (see section 5 below).
3. Cells where the mean looked fine but the worst frames collapsed
These are the cells where the mean VMAF fell by no more than 2.6 points but the minimum VMAF fell by more than 6 points.
VMAF change versus no cap (points). For reference, the uncapped x265 blue_sky CRF 20 has a mean of 99.98, a 5th percentile of 100.0 and a minimum of 95.633.
- On easy footage (blue_sky), the mean barely moved but the tail collapsed. The 2M cap on x265 CRF 20 took the mean from 99.98 to 97.43, but the minimum from 95.63 to 73.32. Most frames sit near 100 anyway, so the mean moves less, which suggests that only the few frames short of bits dropped sharply. We did not measure which frames they were.
- The 2M cap on rush_hour x264 CRF 28 shrank the file by only 6.4%, yet the minimum fell 10.8 points. It was 2275.6 kbps uncapped and 2129.6 kbps capped. A cap that saves little size is not necessarily a cap that costs little. The minimum dropped sharply even with an average only about 14% above the cap (2275.6 versus 2000), but we did not measure which section was squeezed.
- Do not pass a cap just because the mean VMAF looks fine. The 6 cells in this table are all within -2.6 points on the mean alone, so they are easy to miss.
4. At the same file size: lower CRF with a cap, or higher CRF without one?
We paired each capped cell with an uncapped cell whose size is close to it (within +18%). In many pairs the uncapped side is larger, so these are not exactly equal-size comparisons, and you should read the "size difference" alongside. Each cell is uncapped − capped (points), so a positive value means the uncapped side is higher.
"20 · 2M" means CRF 20 with a 2 Mbps cap, and "CRF 30" means uncapped CRF 30. The preset is medium throughout. Differences were subtracted from the vmaf columns of the CSV.
- In all 7 pairs, the uncapped higher CRF scored higher on the mean, 5th percentile and minimum. Only one pair, x265 blue_sky (-0.2%), has the same size, and there the minimum was 17.0 points higher.
- Keep in mind that the sizes differ between pairs. In the 6 pairs where the uncapped side is 4 to 18% larger, that is the result of spending more bits. Even so, in the pairs that are only +4 to 5% apart in size (x265 blue_sky 4M, x264 rush_hour 2M and 4M), the minimum was 4.9 to 11.2 points higher and the 5th percentile 1.4 to 4.2 points higher, which is worth noting.
- In cells where the cap engages, lowering the CRF gained nothing. The size just settles at the cap and the mean VMAF does not rise (observation 1). In these 7 pairs, choosing a CRF high enough that the cap does not engage did better than capping and lowering the CRF.
- riverbed could not be paired. The smallest uncapped size is 11622.6 kbps for x264 and 7534.2 kbps for x265, far above the caps, so you would need to raise the CRF further (past x264 28 and x265 30) to compare. Within this article's CRF range there was no equal-size counterpart.
5. Time
When the cap engaged and bits dropped, encoding CPU time (utime) also got shorter. At the lowest CRF, the 2M cap took 37 to 67% of the uncapped time. For example, x264 riverbed CRF 18 went from 95.266 seconds to 35.5 seconds, and x265 riverbed CRF 20 from 297.375 seconds to 115.797 seconds. This is time bought by giving up quality, not free speed. Because of the IDLE priority, rtime fluctuates, so we used utime (multicore utilization measurements), and speed is for reference only.
Limitations
- Only four 10-second clips. They differ in character (landscape, city, ripples), but animation, screen recordings, dark footage and noisy footage are missing. riverbed is an unusually hard clip among the four, so its results (mean VMAF 30 to 83) should not be read as typical of ordinary video.
- With 10-second clips, the initial VBV buffer has a relatively large effect. The bufsize is 2 seconds' worth, which is 20% of the full 10 seconds. In a video of several minutes to hours, the initial buffer is a much smaller share and the results may differ. We also could not separate out why the actual bitrate of capped cells was 6.5 to 8% above the cap.
- We looked only at average bitrate. We did not measure how often the instantaneous bitrate during delivery exceeded a spec, or violations such as buffer underflow and overflow. "The average is under the cap" does not mean the spec was met.
- We used three absolute caps (2, 4 and 8 Mbps), with bufsize fixed at twice the maxrate. We did not test a larger bufsize (for example 3 to 4 times) or a smaller one. If bufsize changes, results can differ at the same cap.
- We measured only three CRF levels, the medium preset, and 8-bit yuv420p 1080p25. Other presets, 10-bit, 4K, higher fps and other codecs such as SVT-AV1 and VP9 are not covered. With only three CRF points, the same-size comparison is an approximation using the closest cells.
- This is VMAF, not quality to the human eye. The same score can hide different kinds of degradation. For important video, check the capped result with your own eyes.
- One run each on one PC, at IDLE priority. Elapsed times fluctuate and we did not estimate error from repeated runs. Speed is for reference only.
Practical recommendations
- Before adding a cap, measure the average bitrate with uncapped CRF first. In this data, the 24 cells with an average at or below 80% of the cap had nearly the same size and VMAF. Conversely, when the average exceeded 90% of the cap, it was likely to engage (2 of 3 cells at 94 to 98%, and every cell whose average exceeded the cap). For a long video, run a short representative section first.
- If the cap sits below the average, lowering CRF is pointless. In cells where the cap engages, changing CRF left size and quality the same (mean VMAF within 0.3 points across CRFs). In that situation it is not the CRF but the cap itself, that is, the ratio between the bitrate the video needs and the cap, that sets the quality. If the cap is low because of a spec, consider other knobs such as resolution and frame rate (720p vs 1080p crossover measurements).
- Do not sign off on a cap by mean VMAF alone. The x265 2M cap on blue_sky cost 2.6 points of mean VMAF but 22.3 points at the minimum. Look at the 5th percentile and minimum too. You can view per-frame scores with the VMAF JSON log viewer.
- For the same file size, pick a CRF where the cap will not engage rather than a lower CRF with a cap. In all 7 pairs, the uncapped higher CRF scored higher on the mean, 5th percentile and minimum. Some pairs are 4 to 18% larger, so these are not exact same-size results. If you need to match size exactly, adjust the CRF with the CRF step-size rule and the bitrate and file size calculator.
- Consider setting the cap number a little below the spec. The actual kbps of the engaged cells was 1.065 to 1.081 times the cap. First check whether the spec is an average or an instantaneous value (this article measured only the 10-second average).
- For hard footage that will hit a low cap, x265 is worth considering. In the 2M cap, lowest-CRF comparison, the mean VMAF of x265 was 4.8 to 11.6 points higher than x264 (pedestrian_area, rush_hour and riverbed). CPU time is longer, though, and playback compatibility needs separate checking (codec support checker, 6 Mbps streaming measurements).
You can download the full raw data as a CSV at the bottom of the page. You can recompute the size change (%) from the kbps column, the VMAF changes from the vmaf_mean, vmaf_p5 and vmaf_min columns, and the time from utime_s. Calculations related to upload size limits are in maximum duration under an upload size limit.
Raw data: capped-crf-vbv-maxrate-cost-v1.csv