How Video Compression Works: Interframe Magic, and Why Re-Encoding Degrades
In a hurry? Skip straight to the numbers.
Open the Video Compression Ratio Calculator →The companion calculator quantifies how much a codec shrank a file. Behind that ratio is a genuinely clever technology: video compresses far more dramatically than still images because most of a video barely changes from one frame to the next, and codecs exploit that ruthlessly. Understanding how interframe compression and motion estimation achieve enormous savings, why re-encoding an already-compressed video degrades it, and what compression artifacts to watch for, turns a compression ratio into a real understanding of how video is squeezed.
Two Kinds of Redundancy
Video compression removes redundancy, and there are two kinds. Spatial redundancy, within a single frame, is what image compression exploits: smooth areas and patterns can be described compactly. But video's huge gains come from temporal redundancy, between frames: in most footage, consecutive frames are nearly identical, only small parts change from moment to moment. A codec that stores only the changes between frames, rather than every full frame, achieves compression far beyond what still-image methods could. This is why a video compresses much more than the same number of individual photos would, the frames are mostly repeating each other, and the codec refuses to store that repetition.
Interframe Compression: I, P, and B Frames
The mechanism is a structure of frame types that reference each other.
| Frame | What it stores |
|---|---|
| I-frame (keyframe) | A complete image, independent of others |
| P-frame | Only the changes from a previous frame |
| B-frame | Changes referenced from both past and future frames |
A full keyframe appears periodically, and between keyframes, the codec stores only what changed. Crucially, it uses motion estimation: instead of re-describing a moving object, it records that a block of pixels simply shifted to a new position, describing motion with a compact vector rather than new image data. This is how a panning shot or a walking figure compresses so efficiently, the codec tracks how pixels moved rather than storing them anew. Motion estimation is the heart of video's extraordinary compression, and it is why video codecs achieve ratios far beyond image codecs.
Why Re-Encoding Degrades: Generation Loss
Most video compression is lossy: it permanently discards information the eye is unlikely to miss to achieve its size savings. This has a serious consequence when a video is encoded more than once. Each lossy encode throws away some detail, and re-encoding an already-compressed video throws away more on top of what was already lost, compounding the damage. This is generation loss: like photocopying a photocopy, quality degrades with each successive lossy encode, even at the same bitrate. Editing that involves repeated re-exports, or transcoding a file multiple times, accumulates artifacts. This is why professionals keep a high-quality master and avoid unnecessary re-encoding, and why you should never repeatedly re-compress a video, each generation is a little worse than the last, irreversibly.
The Artifacts to Watch For
When compression is pushed too hard, or generation loss accumulates, characteristic artifacts appear. Blocking (macroblocking) shows the underlying blocks the codec works in, especially during fast motion when there are not enough bits to describe the change. Banding turns smooth gradients into visible steps. Mosquito noise and smearing appear around edges and detail. These artifacts are the visible signature of a codec running out of bits, either from too low a bitrate or from repeated re-encoding degrading the source. Recognizing them helps diagnose whether a quality problem comes from insufficient bitrate or from too many compression generations. The compression ratio tells you how much was saved; the artifacts tell you when the saving went too far.
Compressing Video Wisely
Use the calculator to measure compression ratio and space saved, and understand the technology behind it: video compresses far more than images because interframe compression and motion estimation store only what changes between frames, but the compression is lossy, so re-encoding causes cumulative generation loss and artifacts like blocking and banding. Keep a master and minimize re-encodes. The calculation quantifies the savings; understanding how video compression works is what lets you achieve them without needlessly destroying quality.
Ready to Put This Into Practice?
Now that you understand how it works, plug in your own numbers and get an instant, accurate result.
Use the Video Compression Ratio Calculator Now →