Here is an objective example to explain why many people in this forum recommend CRF instead of CBR for offline encoding.
Let’s use two reference videos for comparison. All encoding commands are provided in the attached script for verification.
Methodology
For each reference video:
-
Transcode the reference video using Shotcut’s default export settings of libx264, CRF 25, preset Fast.
-
Calculate the NEG VMAF score of the video from Step 1. This tells us how much loss (distortion) happened due to encoding.
-
Transcode the reference video again at multiple CBR bitrates until one is found with the same VMAF score as Step 2.
By matching the VMAF scores of the CRF and CBR encodings, we help ensure that bitrate comparisons are made between videos of equal image quality.
For those unfamiliar with VMAF similarity measurements, a score of 100 means a transcoded video is identical to its source. A drop of six points is a noticeable level of degradation to the average person.
Water video
| Method | Rate | VMAF | Size (MB) |
|---|---|---|---|
| Original | 111.8 | ||
| CRF | 25 | 89.763550 | 68.2 |
| CBR | 46 Mbps | 89.386095 | 66.8 |
Fire video
| Method | Rate | VMAF | Size (MB) |
|---|---|---|---|
| Original | 56.5 | ||
| CRF | 25 | 98.853343 | 35.4 |
| CBR | 10 Mbps | 98.854866 | 35.9 |
Observations so far
The bitrate can change drastically depending on the complexity of the scene. Water required 46Mbps to achieve modest quality, whereas fire needed a mere 10Mbps to achieve near-perfect quality. That’s a difference of 5x bitrate. What would happen if both scenes appeared back-to-back in the same movie?
Combined water and fire video
| Method | Rate | VMAF | Size (MB) |
|---|---|---|---|
| CRF | 25 | 96.526387 | 65.6 |
| CBR | 46 Mbps | 98.596695 | 132.2 |
Analysis
Compare the file sizes, and notice that CBR is twice the size of CRF. Immediately, we see the problem with CBR encoding. We learned from the first water test that 46Mbps is necessary to match the quality of CRF 25. If we want to retain this quality for the water scene in the combined video, then the entire CBR stream must be encoded at 46Mbps minimum. But 46Mbps is 5x more bitrate than needed to encode the fire scene, which results in lots of space being wasted on imperceptible quality gains. We could try encoding the whole video at 10Mbps, which would be sufficient for the fire scene. But then the water scene would get only 20% of the bitrate it needed, and one can imagine how terrible that would look. CBR requires compromising on file size or quality.
Meanwhile, CRF encoding adapts the bitrate to the complexity of each frame, using only the number of bits it needs to hit a quality target. This allows both the water and fire scenes to reach their quality targets without wasting bits.
“But the CBR file is two VMAF points higher than CRF.”
-
A difference of two VMAF points is hardly noticeable. It takes six points to be reliably noticed.
-
We used the same quality-matched settings from the stand-alone water test, which means CRF and CBR should encode at the same quality (and same VMAF score) during the water portion of the video.
-
This means the VMAF score went up during CBR’s fire scene due to its 5x bitrate.
However, the CRF fire scene already had a near-perfect score of 98. Going from 98 to 100 with CBR is a difference that no human will notice, and certainly does not justify doubling the file size (at these quality levels).
Conclusion
A big advantage of CRF encoding is the “known quantity” nature of it. If someone wants a visually lossless encoding, they key in CRF 18 and that’s it. If someone wants a balance between quality and file size, they key in CRF 25 and that’s it. (Granted, those numbers can shift slightly for very low or high resolutions, but that’s a known offset.)
Meanwhile, encoding CBR at the ideal bitrate requires lots of test samples. If someone makes a blanket statement like “50Mbps for everything” in the hopes of consistent high quality, then they risk wasting space if their video doesn’t need 50Mbps to look good (like the fire scene or a PowerPoint presentation). CRF takes the guesswork out of choosing a bitrate.
Today, physical media from DVD-Video to 4K Blu-ray discs use constrained VBR rather than CBR. A lot of on-demand Internet streaming is also constrained VBR. The main uses for CBR are live streaming and digital broadcast, which probably doesn’t describe the average Shotcut use case.
Remember, when needing predictable file sizes, constrained quality-based encoding (VBR with a bitrate cap) is probably a better option than CBR.
I hope this test has successfully demonstrated that there is virtually no case for using CBR encoding in an offline general-purpose scenario.
And here are the FFmpeg commands for anyone that wants to verify the results:
CRFvsCBR.txt (3.3 KB)


