Vidlora guide
How video compression works
Uncompressed video is enormous: one minute of 1080p at 30 fps is about 5.6 GB even with efficient colour sampling. Codecs make it practical by exploiting two facts: neighbouring pixels look alike, and consecutive frames look alike. This guide explains the main ideas behind modern compression, including prediction, keyframes, quantisation and bitrate control, so you can see why some videos shrink easily, why others do not, and why repeated re-encoding damages quality.
7 minute read
Why raw video is so large
A 1080p frame has 1920 x 1080 = 2,073,600 pixels. Stored as 8-bit colour with the common 4:2:0 layout, that is about 3.1 MB per frame. At 30 frames per second, one second is 93 MB and one minute about 5.6 GB; with full RGB it would be nearly 11 GB. Streaming that would require around 750 Mbps, far beyond home internet. A typical streamed 1080p video runs at 5 Mbps, roughly 150 times smaller. Compression achieves this by throwing away information that people are least likely to notice and by describing what remains in an efficient way. Understanding where the savings come from explains most of the practical advice about video settings.
Spatial compression inside a frame
Within a single frame, codecs divide the picture into blocks (macroblocks in H.264, coding tree units up to 64x64 in H.265 and AV1). For each block they predict the content from neighbouring pixels that have already been decoded, then store only the difference. A clear blue sky is predicted almost perfectly from its edge, so it costs very little. The remaining differences go through a transform, similar to the one used in JPEG, which converts pixel patterns into frequency components. Fine detail sits in high frequencies, which the encoder can reduce or drop. This is why flat areas compress well and why detailed textures such as foliage, water and confetti are expensive.
Temporal compression between frames
Most of a video is repeated from one frame to the next, so codecs store changes rather than whole pictures. For each block, the encoder searches the previous frame for the best match and records a motion vector, saying move this block by three pixels left, plus a small correction. Static backgrounds cost almost nothing; a camera on a tripod pointing at a talking person compresses very well. Handheld footage, panning shots, explosions, rain and film grain break this prediction because the changes are large and unpredictable. That is why two videos with the same resolution and duration can differ several times in size, and why a static slideshow recording is tiny compared with a football match.
I-frames, P-frames and B-frames
Frames are organised into groups. An I-frame (keyframe) is encoded on its own, like a still image, and is the largest. A P-frame predicts from earlier frames. A B-frame can predict from both earlier and later frames, which makes it the smallest. A typical group of pictures might contain one keyframe every 2 to 10 seconds with P and B frames in between. Keyframes allow seeking and error recovery, since decoding can start at any of them. Longer intervals save space but make jumping around slower and recovery from errors worse. Streaming services often use 2-second intervals for fast switching, while archival files use longer ones. This structure is also why lossless trimming snaps to keyframes.
Quantisation: where quality is actually lost
After the transform, the encoder divides the coefficients by a quantisation step and rounds them. Larger steps push more small coefficients to zero, shrinking the data but removing detail. The quantiser, often expressed as QP, is the main source of loss. At low QP the video is near-transparent; at high QP you see blocking, where square edges appear, ringing around sharp edges, banding in gradients and smeared textures. Good encoders vary quantisation across the frame, spending more on faces and less on busy backgrounds, and across time, spending more on scenes that will be referenced by later frames. Encoder settings like presets influence how well these decisions are made, not whether the process is lossy.
Bitrate, CRF and rate control
Bitrate is the data used per second. Encoders control it in several ways. Constant bitrate (CBR) holds it steady, useful for live streaming with fixed bandwidth. Average bitrate (ABR) targets a total size. Constant rate factor (CRF) targets consistent quality and lets bitrate float, using more bits for complex scenes and fewer for easy ones. CRF is the usual choice for files you keep or share. A two-pass encode first analyses the whole video and then allocates bits more precisely, helpful when you must hit an exact file size. For x264, a CRF difference of about 6 roughly halves or doubles the bitrate. Platforms such as Vidlora expose a quality target rather than a raw bitrate for this reason.
Newer codecs: H.265, VP9 and AV1
Each codec generation adds smarter prediction and larger, more flexible blocks. H.265 (HEVC) typically needs 30 to 50 percent less bitrate than H.264 for similar quality. VP9 is roughly in the same range. AV1 can save another 20 to 30 percent over H.265 but demands much more encoding computation. The costs are encoding time, decoding power and compatibility: older hardware may not decode them smoothly, and licensing differs between codecs. H.264 remains the baseline because nearly every device decodes it in hardware. Newer codecs shine for 4K, HDR and bandwidth-limited streaming, where even a modest percentage saving represents large amounts of data across many viewers.
Generation loss and practical lessons
Because compression discards information, each re-encode starts from an already degraded picture and adds new errors on top. After several generations, you see blockiness, colour shifts and mush that no later setting can undo. Practical rules follow. Keep the original recording and make shared copies from it once. Prefer operations that avoid re-encoding, such as stream-copy trimming and container remuxing. Encode at the final resolution, not several times at different sizes. Use a quality target that matches the destination, because uploading a heavily compressed file to a platform that re-compresses it again compounds the damage. Finally, remember that more bitrate cannot restore detail already lost, but it can stop further loss.
Try the free video downloader