0017: Video is VBR peaking at the negotiated bitrate, not CBR
- Status: Accepted (owner, 2026-11-24). Proposed (my call, after the owner saw ES-DE's text stay blocky on the handheld after an N64 game, 2026-11-15)
- Date: 2026-11-15
Context
ADR 0015's encoder ran VAAPI in CBR with a one-frame VBV. Measured on the host (HEVC, 15.3 Mbps, the handheld's session): Gamescope's own picture of ES-DE after the game was byte-identical to before it, but the encoded picture stayed at 40 dB (54 dB before the game) for as long as we watched, with the stream padded to the full bitrate by filler. With the same source replayed offline: VBR with the same caps refines to 54 dB and sends a fifth of the bytes; a one-second VBV also refines but adds latency; a QP cap does not help; 78.9 Mbps reaches 61 dB. During the game, VBR scored the same or better than CBR in every second and the largest frame was the same size.
Decision
rc_mode=VBR with b = maxrate = the negotiated bitrate and bufsize one frame of it, unchanged otherwise. Audio stays CBR (its FEC needs equal packets).
Consequences
- A still screen after a busy scene sharpens again within a second, and a still screen costs a few hundred kbit/s instead of the full bitrate (good for Wi-Fi devices).
- The peak per frame is unchanged, so latency and the client's buffer are unchanged.
- Supersedes the "CBR" in ADR 0015's encoder; the rest of 0015 stands. Measurement scripts: outside the repo (see
AGENTS.local.md).