encoding.info
You are hereSourcePredictionTransformEntropy codingFiltersFramesDecisionsRate controlPerceptionQualityBitstreamSettingsEncoder map
Page 2 of 4 in Rate control

The video buffering verifier

Rate control · concept · added 2026-11-15

In Brief:
The video buffering verifier checks a stream against a model of arriving bits, buffer capacity and frame removal times. A frame may be larger than one interval's incoming data if earlier data has filled the buffer. Playback also depends on delivery and decoding, which the model does not cover.

A decoder receives bits at the speed of its connection and uses them a frame at a time. Between the two sits a buffer. The video buffering verifier (VBV) is the encoder's model of that buffer: bits flow in at a fixed maximum rate, each frame takes its own size out at once, and the level must never go below zero. An encoder that respects it has kept enough data in the model for every frame's removal. Whether a player has each frame in time also depends on how the data is delivered and how fast it is decoded. This page's version is idealized: a buffer filled at a configured rate and capped at its size.

Two numbers

The model has a fill rate and a size. A stream may use more than the fill rate for a while, by drawing the buffer down, and must then use less while it refills. A large frame, such as an intra frame, is paid for out of the buffer. Over any stretch of T seconds the stream can use at most what arrives in that time plus what the buffer held at the start:

bits in T seconds ≤ rate × T + size

So its average over that stretch is at most the rate plus size ÷ T, an allowance that shrinks as the stretch grows. There is no fixed length past which the average must be at or under the rate.

Constrain a stream

The sequence of the previous page is coded at a constant rate factor of 26, which on its own averages 638 kbit/s and peaks at 901 kbit in its busiest second. Set the buffer's fill rate and its size in seconds of that rate: at 600 kbit/s a one-second buffer holds 600 kilobits. In the upper plot the dashed line is the quantization parameter (QP) without the limit and the solid line with it. The lower plot is the buffer level once each frame is taken out and before the next refill, where it is lowest. The buffer starts 90% full, as x264's does by default.

600
← 400 kbit/s1,200 kbit/s →
1.0
← half a second of bitsthree seconds →
without the limitwith the limit
Average, kbit/s
Busiest second, kbit
Frames with QP raised
Lowest buffer level
Simplified demo: complexities and frame sizes are the previous page's model. The rule that raises QP is adapted from x264's lookahead rule: raise the quantizer scale 1% at a time until the buffer, as planned over the next 40 frames, ends at least half full or as full as the fill rate allows. The demo knows the size of every coming frame exactly and tries one quantizer scale for all of them; x264 predicts sizes by frame type and also corrects within a frame. That the buffer never runs dry here checks this model, not x264 on other inputs. The first two tiles give the value with the limit, then without. No frame types are modeled.

For this sequence:

The settings in x264

--vbv-maxrate is the fill rate, in kbit/s, and --vbv-bufsize the size, in kilobits. Neither is set by default, so no buffer is modeled. --vbv-init is the starting level, 0.9 of the size by default.

Minimum rate, filler and the rule with no lookahead
  • The two buffer options work with --crf or --bitrate.
  • In one-pass average bitrate with the maximum rate no higher than --bitrate, x264 also keeps the buffer from overfilling, by lowering QP. Filler is separate: x264 adds it only under --filler or --nal-hrd cbr, and otherwise drops the credit a full buffer cannot hold. A maximum rate below the average bitrate target lowers the target to match.
  • With --rc-lookahead at 0, x264 falls back to a rule that uses the current buffer level and a prediction of the current frame's size, without planning ahead. The demo does not model it.

Trade-offs

Sources

Read 2026-11-15, at the commit linked.