How video compression works and how to shrink a video
Why video files are so large, what bitrate, resolution and CRF control, and practical ways to make a video smaller while keeping it watchable.
Published . 3 min read.
Uncompressed video is enormous. One second of 1080p video at 30 frames per second, stored as raw pixels, is roughly 180 megabytes. A 10-minute clip would fill more than 100 gigabytes. Every video you watch is compressed to a tiny fraction of that, and understanding how makes it much easier to shrink your own files sensibly.
The two big ideas
Video codecs such as H.264 save space in two ways.
Within a frame, they throw away detail your eyes are bad at noticing, such as tiny differences in colour, and describe areas of similar colour efficiently.
Between frames, they avoid storing things that didn't change. If a person talks in front of a still wall, the wall is stored once and later frames only describe the movement. This is why screen recordings and interviews compress far better than handheld footage of a crowd or falling snow, where nearly every pixel changes every frame.
What controls the file size
Three settings decide most of a video's size:
- Duration. Size grows with length. Trimming unused footage is the most effective compression there is.
- Bitrate. The amount of data used per second of video. File size is roughly bitrate multiplied by duration.
- Resolution. More pixels need more data to look sharp. Going from 1080p to 720p cuts the pixel count by more than half.
Frame rate matters too, though less than you might expect, because neighbouring frames are so similar.
Constant quality instead of fixed bitrate
You can tell an encoder to use a fixed bitrate, but that wastes data on simple scenes and starves complex ones. A better approach is constant quality, which H.264 offers as CRF (Constant Rate Factor). Instead of a bitrate, you set a quality target and the encoder spends whatever data each scene needs to meet it.
For H.264, CRF runs from 0 (lossless) to 51 (very poor). Useful values:
| CRF | What to expect |
|---|---|
| 18–20 | Very close to the source; large files |
| 23 | The default; looks the same as the source to most people |
| 26–28 | Small quality loss, clearly smaller files |
| 30–32 | Visible softening in detailed scenes; much smaller files |
A handy rule of thumb: raising CRF by 6 roughly halves the bitrate, and lowering it by 6 roughly doubles it.
What our compressor does
The video compressor uses constant quality with H.264:
- Light: CRF 26, resolution kept up to 1080p, AAC audio at 128 kbps.
- Balanced: CRF 30, resolution kept up to 1080p, AAC audio at 112 kbps.
- Strong: CRF 32, scaled down to 720p, AAC audio at 96 kbps.
Because quality is constant, the final size depends on the content. A static screen recording might shrink by 90 percent, while a video that was already compressed for the web might barely change. The tool shows the exact saving, and tells you when the original was already smaller.
Practical tips
- Always start from the original. Each round of compression throws away more detail, and the losses add up.
- Trim first. Removing 30 seconds you don't need beats any encoder setting.
- Match resolution to the screen. A video watched on phones rarely needs more than 720p or 1080p.
- Expect less from already-compressed files. Downloads from social apps have usually been compressed hard already.
- Check the result. Watch the busiest scene of the compressed video before you delete anything.
Codecs that compress better
Newer codecs such as H.265 (HEVC) and AV1 reach the same quality as H.264 with noticeably less data. They're excellent when you control the playback device, but older phones, browsers and editing tools may not support them. For files you'll share widely, H.264 remains the safest choice, which is why our tools use it. Read more in MP4 vs WebM vs MOV.