Back

Blog details

CBR vs VBR vs CRF and When to Use Each Rate Control Mode

AIOZ Network
7 min readNovember 27, 2026
aioz-stream
AIOZ Stream knowledge hub cover with the headline CBR vs VBR vs CRF Rate Control Modes Explained

CBR vs VBR is a choice of what your encoder holds fixed. CBR keeps the bitrate steady, while VBR moves bits from easy scenes to hard ones around an average. CRF fixes quality and lets bitrate float. Use CBR for live ingest and capped VBR or CRF for VOD.

TL;DR:

  • CBR holds the bitrate near one number, which keeps a live uplink predictable but wastes bits on easy scenes and starves hard ones.
  • VBR spends the same average where the picture needs it; for VOD, Apple's HLS spec lets peaks reach 200% of the average.
  • CRF targets a quality level, so file size depends on the content. Add maxrate and bufsize and it becomes capped CRF.
  • In our 20-second x264 test at a 2,500 kbps target, two-pass VBR gave the hard scene 4,795 kbps against 2,554 for CBR, and 2.3 dB more PSNR.
  • AIOZ Stream takes a target bitrate per rendition, capped by resolution, and its OBS guide sets CBR for live ingest.

What is the difference between CBR and VBR?

Rate control is the part of an encoder that decides how many bits each frame gets. Bitrate is your budget and rate control is the spending policy, which is why our guide to how video encoding, codecs and bitrate fit together treats them as one step. The common modes differ in which value you set and which one the encoder may change.

  • CBR (constant bitrate) sets the target, minimum and maximum rate to the same number. The encoder lowers quality in hard scenes to stay on budget and spends the full rate on easy ones, even when you couldn't see the difference.
  • VBR (variable bitrate) sets an average and lets each scene take more or less. Wowza and Castr describe three flavors: quality VBR (one pass, quality target), unconstrained VBR (an average with no ceiling) and constrained VBR, which adds a maximum rate and a buffer. A setting with the maximum at twice the target is called 200% constrained VBR.
  • CRF (constant rate factor) is an x264 and x265 mode with no bitrate target at all. You pick a quality level and the encoder spends whatever each scene needs.
  • Capped CRF is CRF plus a maximum rate, so easy content stays small and hard content can't spike past the cap.

On the x264 CRF scale, 0 is lossless, 23 is the default and 51 is the worst. The FFmpeg wiki calls 17 to 28 the sane range, and adding 6 roughly halves the bitrate. The x265 default is 28, which the wiki says looks like x264 at 23 at about half the size. Our video streaming glossary keeps one-line definitions of CBR, CRF and the other encoding terms.

How maxrate and bufsize cap each mode

In FFmpeg, three switches control bitrate for x264 and x265: -b:v sets the average, -maxrate the ceiling and -bufsize the size of the video buffering verifier (VBV). The VBV models a decoder buffer that fills at maxrate. So the encoder can burst above maxrate for a moment while the modelled buffer has room, and a single second can land well over the cap.

These are the four commands we ran for the test below. We fed them a PNG frame sequence, so swap in your own input file:

# CBR: target, minimum and maximum all equal
ffmpeg -i input.mp4 -c:v libx264 -b:v 2500k -minrate 2500k -maxrate 2500k \
  -bufsize 2500k -x264-params nal-hrd=cbr cbr.ts

# Two-pass constrained VBR (200%): pass 1 measures, pass 2 encodes
ffmpeg -i input.mp4 -c:v libx264 -b:v 2500k -maxrate 5000k -bufsize 5000k -pass 1 -f mp4 /dev/null
ffmpeg -i input.mp4 -c:v libx264 -b:v 2500k -maxrate 5000k -bufsize 5000k -pass 2 vbr.mp4

# CRF: quality target, no bitrate target
ffmpeg -i input.mp4 -c:v libx264 -crf 23 crf23.mp4

# Capped CRF: quality target with a 2,500 kbps ceiling
ffmpeg -i input.mp4 -c:v libx264 -crf 23 -maxrate 2500k -bufsize 5000k capped.mp4

All four used the medium preset and a keyframe every 60 frames (-g 60). The FFmpeg wiki warns that libx264 doesn't strictly hold a maximum rate, and you'll see that in the numbers.

One test clip encoded four ways

We built a 20-second, 1280x720, 30 fps test clip: 10 seconds of a static gradient with a slow box, then 10 seconds of panning fine detail with fresh grain on every frame. We encoded it with libx264 in FFmpeg n7.1 on 2026-10-29, read packet sizes with ffprobe and computed luma PSNR against the source frames.

Bar chart of bitrate per 2 second window for one 20 second clip encoded four ways with x264. CBR stays near 2,500 kbps in both the easy and hard halves. Two-pass VBR uses about 80 to 110 kbps on the easy half and 4,283 to 5,389 kbps on the hard half. CRF 23 uses about 73 kbps easy and 2,412 to 3,486 kbps hard. Capped CRF uses about 73 kbps easy and 2,064 to 2,918 kbps hard against a 2,500 kbps cap.
Bitrate per 2-second window (one GOP) for the same clip in four rate control modes. Run here on 2026-10-29.
ModeAverage kbpsEasy halfHard halfPeak 1 s windowHard-half PSNR
CBR 2,500k2,5152,4762,5544,13832.4 dB
Two-pass VBR 2,500k, 200%2,440864,7957,69034.7 dB
CRF 231,427732,7815,69334.0 dB
Capped CRF 23, 2,500k cap1,212732,3514,79933.3 dB

CBR and VBR both landed near 2,500 kbps, but VBR moved almost everything into the hard half and bought 2.3 dB of PSNR there. Meanwhile CBR spent 2,476 kbps on a gradient that CRF encoded at 73 kbps, and both scored above 55 dB there. The FFmpeg wiki makes the same point: CBR encodes are usually inefficient when the video is easy to encode.

The caps also leaked. VBR hit 7,690 kbps in one second against a 5,000k maxrate, and capped CRF averaged 2,918 kbps over one 2-second window against its 2,500k cap. That's the loose cap the FFmpeg wiki warns about, so plan your viewers' headroom around the measured peak.

CRF used 43% fewer bits than CBR and still scored higher on the hard half, but you couldn't know its bitrate until the encode finished. These numbers come from one synthetic clip and one run, scored with PSNR, so treat them as directional. This FFmpeg build has no libvmaf, so we couldn't add VMAF, the perceptual quality score. Jan Ozer's OTTVerse tests on real footage point the same way: on a football clip, CBR's lowest-frame VMAF was 79.76 against 85.39 for 200% constrained VBR.

When should you use CBR, VBR or CRF?

Pick the mode by the one thing you can't let vary.

  • Live ingest: CBR. A live encoder can't look ahead, and your upload link has a fixed ceiling. Apple's HLS authoring spec also requires the measured peak of live content to stay under 125% of the declared BANDWIDTH. Our OBS encoder settings guide for 1080p and 720p covers the live-specific values, and the livestream health guide shows how to watch the incoming bitrate.
  • VOD delivery: constrained VBR or capped CRF. Apple says VOD peaks should be no more than 200% of the average bitrate. Capped CRF goes further and saves bits on easy titles, which works like a cheap form of the per-title encoding in our bitrate ladder guide.
  • Masters and uploads: CRF. When a platform will transcode your file anyway, you want even quality; the FFmpeg wiki treats CRF 17 or 18 as visually lossless or nearly so.
  • A fixed file size: two-pass average bitrate. The FFmpeg wiki recommends it when the size target matters more than frame-to-frame quality.

Rate control matters for adaptive bitrate streaming too, because the player picks renditions from the BANDWIDTH value in the playlist. Apple requires a VOD rendition's measured peak to sit within 10% of that value, so write the measured peak there.

How AIOZ Stream handles it

For video on demand, you set rate per rendition in the qualities array of a create-video request. Each video_config carries a codec (h264 or h265) and a bitrate that the docs define as the target video bitrate in bits per second. Each resolution has a documented ceiling: 4,000,000 bps at 720p, 6,000,000 at 1080p and 30,000,000 at 2160p. This example is quoted from the docs and not run here:

POST https://api.aiozstream.network/api/media/create
{
  "title": "My Video",
  "type": "video",
  "qualities": [
    {
      "resolution": "1080p",
      "type": "hls",
      "container_type": "mpegts",
      "video_config": { "codec": "h264", "bitrate": 5000000, "index": 0 }
    },
    {
      "resolution": "720p",
      "type": "hls",
      "container_type": "mpegts",
      "video_config": { "codec": "h264", "bitrate": 3000000, "index": 0 }
    }
  ]
}

Our docs don't name the rate control mode the transcoder applies to that target, so if peak behavior matters to you, run ffprobe on a finished rendition. The codec limits (H.264 up to 4K, H.265 up to 8K) are in our 4K and 8K encoding walkthrough, and segment containers are compared in MPEG-TS vs fMP4 for HLS segments.

For live, our OBS guide sets Rate Control to CBR at 4,500 to 6,000 Kbps with a 1 second keyframe interval for 1080p30, on both NVENC and x264. The livestream statistic endpoint then reports bitrate_in and bitrate_out in Kbps, updated every 5 to 30 seconds (quoted from the docs, not run here):

curl --location 'https://api.aiozstream.network/api/live_streams/statistic/stream_media_id' \
  --header 'Authorization: Bearer your_access_token_here'

Next step: set video_config.bitrate per quality in the AIOZ Stream Video API reference.

FAQ

Is VBR better than CBR?
For on-demand video, yes: at the same average bitrate it gives hard scenes more bits, which raised hard-scene PSNR by 2.3 dB in our test. For live ingest, CBR is safer because your uplink can't absorb spikes.

Is CRF the same as VBR?
CRF is a quality-targeted form of variable bitrate, but it has no bitrate target, so you only learn the file size after encoding.

What CRF value should I use?
Start at the x264 default of 23 and move within 17 to 28; for x265 the default is 28.

Should I use CBR or VBR in OBS?
Use CBR, which is what the AIOZ Stream OBS guide specifies and what Wowza recommends for live streaming.

Why is my CBR stream not perfectly flat?
The VBV buffer lets the encoder borrow and repay bits, so short windows swing around the target; our CBR encode ranged from 2,336 to 2,766 kbps per 2-second window.

References

We only send updates when meaningful changes ship, and you can unsubscribe anytime

Related Content

blog thumbnail

What Is MPEG-DASH? How the MPD Manifest File Works

MPEG-DASH streams adaptive video over HTTP from an XML MPD file. See a real MPD: Periods, AdaptationSets, Representations, segment addressing and live MPDs.

aioz-stream
8 min readDecember 04, 2026
blog thumbnail

What Is CMAF? The Common Media Application Format Explained

What is CMAF? The ISO format that packages video as fragmented MP4 so one set of files serves HLS and DASH, with its chunks, brands and low-latency role.

aioz-stream
8 min readDecember 01, 2026
blog thumbnail

CBR vs VBR vs CRF and When to Use Each Rate Control Mode

CBR vs VBR vs CRF explained: what each video rate control mode holds fixed, how maxrate and bufsize cap it, our x264 test results, and which mode to use where.

aioz-stream
7 min readNovember 27, 2026
blog thumbnail

Live Streaming API Tutorial for Sessions and Real-Time Stats

A live streaming API tutorial for AIOZ Stream: create a session, push RTMP, poll real-time stats every 5 to 30 seconds, then list the saved recordings.

aioz-stream
7 min readNovember 24, 2026
blog thumbnail

Restream to Multiple Platforms With AIOZ Stream Multicast

Restream to multiple platforms by sending one feed to a relay. Learn the bandwidth math, platform rules and how AIOZ Stream multicast forwards your RTMP stream.

aioz-stream
6 min readNovember 20, 2026
blog thumbnail

MPEG-TS vs fMP4 for HLS Segments and When to Use Each

MPEG-TS vs fMP4 for HLS: how 188-byte TS packets and fMP4 init segments differ, what each costs in overhead, which codecs need fMP4, and when TS still fits.

aioz-stream
7 min readNovember 17, 2026