QP — the Quantization Parameter — is the single number the encoder uses to decide how aggressively to throw away detail in each block of a video. Low QP keeps almost all the original information (high quality, big file); high QP discards more (lower quality, smaller file). In H.264 and HEVC, QP ranges from 0 (lossless) to 51 (catastrophic); a change of 6 roughly doubles or halves the resulting bitrate. It is the closest thing video has to a single quality dial.
Mechanically, QP controls how the encoder rounds the numbers produced by the dct transform. Each DCT coefficient gets divided by a step size derived from QP, then rounded to an integer; the bigger the step size, the more coefficients round down to zero, and zeros compress to almost nothing through entropy coding. That's where the file shrinks — and where quality is lost, since the decoder can't recover what's been rounded away.
Modern encoders rarely use a single fixed QP. Instead, rate-control modes like crf and VBR vary QP block-by-block and frame-by-frame: lower on I-frames so they're sharp anchors for everything else, higher on B-frames where you can hide more, lower on faces where people will look, higher on grass where they won't. Even on a single frame, perceptual quantization tools push QP up on busy textures where the eye won't notice and down on flat skin where banding would be visible. So while QP is the underlying quality knob, almost no one sets it directly anymore — you set CRF, the encoder picks QP per block automatically.
The book · Volume 1 of 7
Video Encoding: A Complete Guide to Video Compression — From Pixels and Color to H.264, HEVC, AV1, Quality Metrics, and AI
QP is the most direct quality knob in an encoder, and fixed QP, CRF and bitrate modes all steer it differently. Volume 1 explains QP in detail: quantization step sizes, QP ranges in H.264, HEVC and AV1, QP offsets between frame types, and how rate control moves QP to hit a target. Written by Nikolay Sapunov, CEO at Fora Soft.
Unsure which QP or CRF value gives the quality you need at the lowest bitrate?
Send us sample content and your quality target: we sweep QP and CRF values and give you settings per resolution with the bitrate each costs. 250+ video products shipped since 2005.