Tool
"What should maxrate be, and how many times that for bufsize?" Old mailing lists and forums are full of rules of thumb, but few come with numbers. Pick a use case (live streaming, HLS, an upload limit, or device compatibility) and the tool builds the values and an ffmpeg command. Next to them it shows our own data on CRF with a cap: whether that cap will bind, and if it does, how far VMAF dropped. All processing happens inside this browser.
Use case
Codec
Preset
We only measured medium. The preset is just a value in the command; it is not reflected in the measured tables below.
bufsize (seconds' worth of maxrate)
Keyframe interval (seconds)
If your streaming platform or streaming spec requires a particular interval, use that value. This tool has no built-in value.
Generated settings
maxrate 6,000kbufsize 12,000k
Sets maxrate and minrate equal to the 6,000k target to get close to CBR. bufsize = 2 s worth.
ffmpeg -i input.mp4 -c:v libx264 -preset veryfast -pix_fmt yuv420p -b:v 6000k -minrate 6000k -maxrate 6000k -bufsize 12000k -g 60 -keyint_min 60 -c:a aac -b:a 160k -f flv "RTMP_URL"
The bitrate numbers are for video only. Add the audio bitrate separately and check that the total fits within your upload speed. This site has not measured the quality of CBR-style encoding.
Inside the encoder there is a virtual decoder buffer called the VBV (Video Buffering Verifier). It is assumed to fill at the maxrate rate and to drain by the size of each frame as that frame is played. bufsize is the size of this buffer. So bufsize ÷ maxrate is how many seconds' worth of bits can be saved up and spent above the cap. The tool's “bufsize as seconds of maxrate” option is exactly that value. It is a limit on a different layer from -b:v and -crf, which set the average bitrate, and it only comes into play in difficult scenes.
| Use case | Settings it builds | Source of the numbers |
|---|---|---|
| Live streaming | -b:v = -minrate = -maxrate, bufsize is the number of seconds you choose | The target you enter. No data |
| HLS / DASH | -b:v target, -maxrate = target × the multiple you choose, keyframe = segment length | Values you enter or choose. No data |
| Upload limit (average) | -crf + vbv-maxrate = limit ÷ the measured ratio | Measured: the largest value of actual average ÷ cap when the cap bound |
| Device compatibility (instantaneous) | -crf + vbv-maxrate = the device limit, bufsize at or below the device buffer limit | The device limit you enter. No data |
The rows marked “No data” just translate the values you enter into the command format. What this site measured itself is the row marked “Measured” in the last column and the measured tables in the middle of the tool.
The tool reads the raw data from What Does Capped CRF (maxrate + bufsize) Cost in Quality? as is: four 10-second 1080p25 clips, x264 and x265 at medium, three CRF steps, caps of 2, 4 and 8 Mbps (bufsize is 2× maxrate), on one Ryzen 5 PRO 4650G PC. The tool computes three things.