How Video Compression Actually Works
A single minute of raw 1080p video can weigh several gigabytes, yet the clips you stream every day are a tiny fraction of that. Compression is the magic in between. Here's how modern codecs shrink video dramatically while keeping it looking sharp.

Key takeaways
- Codecs remove spatial and temporal redundancy the eye barely notices.
- Keyframes store full images; other frames store only what changed.
- Bitrate is the main dial trading file size against visual quality.
- Newer codecs like AV1 and HEVC beat H.264 at the same quality.
Redundancy is the enemy of file size

Video is full of repetition. Within a single frame, large areas of similar colour repeat — that's spatial redundancy. Across frames, most of the picture stays the same from one moment to the next — that's temporal redundancy. Compression is fundamentally about detecting and removing this repetition.
On top of that, codecs exploit the limits of human vision: we notice changes in brightness far more than subtle shifts in colour, so encoders spend fewer bits on colour detail without you ever noticing.
Keyframes, predicted frames and motion

Rather than storing every frame as a full image, codecs use keyframes (I-frames) that hold a complete picture, followed by predicted frames (P- and B-frames) that only describe what changed. If a person walks across a static background, the encoder stores the moving pixels and reuses the rest.
This is why a talking-head video compresses far better than fast-action footage: less motion means less new information to store per frame.
Bitrate, codecs and the quality trade-off

Bitrate — how many bits per second the video uses — is your primary quality control. Too low and you get blocky artefacts and smearing; too high and files balloon with no visible benefit. Variable bitrate (VBR) spends more bits on complex scenes and fewer on simple ones for the best balance.
The codec matters just as much. H.264 is universally compatible, HEVC (H.265) and VP9 cut size significantly, and AV1 pushes efficiency further still. Newer codecs deliver the same quality at a lower bitrate — at the cost of more processing power to encode and decode.
Gowtham
Solo developer and creator, writing clear guides and building tools so you always have current, trustworthy content.


