How video compression actually works
Video files are large because raw video is enormous. A single second of uncompressed 1080p footage can run to hundreds of megabytes. Compression is the set of tricks that gets that down to something you can actually send, post, or store, and understanding a few of those tricks makes it much easier to shrink a file without wrecking it.
A codec is a method, a container is a box
Two words get mixed up constantly, so it helps to separate them first.
A codec is the method used to encode and decode the picture and sound. H.264 (also called AVC), H.265 (HEVC), VP9, and AV1 are video codecs. AAC, MP3, and Opus are audio codecs.
A container is the file wrapper that holds the encoded streams together. MP4, MOV, WebM, and MKV are containers. This is why an .mp4 and a .mov can hold the exact same H.264 video: the box is different, the contents can be identical. It also explains why renaming a file extension never converts anything. You have to re-encode the streams, not relabel the box.
Why most of a video is redundant
Compression works because video repeats itself, both across the frame and across time.
- Within a frame, large areas are similar. A clear sky is thousands of almost-identical blue pixels. The codec stores the pattern once instead of every pixel.
- Between frames, most of the picture does not change from one moment to the next. Rather than store a full image 30 times a second, the codec stores occasional complete frames (keyframes) and, in between, only the differences: what moved and where.
The more predictable your footage, the smaller it compresses. A locked-off talking-head shot squeezes down beautifully. Confetti, rain, fire, and fast camera motion are the hard cases, because almost everything changes every frame.
Bitrate is the real size dial
Resolution gets the attention, but bitrate is what mostly determines file size. Bitrate is how many bits per second the encoder is allowed to spend. Give it more bits and it preserves more detail. Give it fewer and it starts discarding the details you are least likely to notice.
This is why dropping the resolution is a blunt tool. A 1080p clip at a sensible bitrate can look better and weigh less than the same clip at 720p with the bitrate set too high. If your goal is a smaller file, lowering the bitrate (or raising the CRF, below) usually does more than shrinking the frame.
CRF: quality-first compression
Most modern encoders offer a mode called CRF, or Constant Rate Factor. Instead of promising a fixed bitrate, you tell the encoder how much quality to hold onto and let it spend whatever bits each moment needs. Simple scenes use few bits, busy scenes use more, and the perceived quality stays roughly constant.
For H.264, CRF runs from 0 to 51, where lower means higher quality and a bigger file:
- Around 18 is visually very close to the source.
- Around 23 is a common default that looks clean for everyday use.
- Around 28 to 30 is noticeably smaller with some softening, fine for quick sharing.
When DivXpress shows a “quality vs. size” slider, it is moving the CRF value behind the scenes. Sliding toward “smaller file” raises the CRF; sliding toward “higher quality” lowers it. That is the whole trick, presented without the jargon.
Don’t forget the audio
Audio is a smaller share of the file, but it is easy money. Dropping an oversized audio track from, say, 320 kbps to 160 kbps AAC is usually inaudible for spoken or background audio and trims real weight. And if you do not need the picture at all, extracting the audio to an MP3 is the ultimate compression: you throw the video away entirely.
Practical takeaways
- Renaming an extension does nothing. Converting means re-encoding.
- To make a file smaller, reach for bitrate or CRF before resolution.
- CRF around 26 to 30 is the sweet spot for “smaller but still fine.”
- Trim first. The cheapest way to shrink a video is to cut the parts you do not need.
You can try all of this without installing anything. The compress-video tool runs the same H.264 encoder described here, entirely in your browser, so the file never leaves your device.
Keep reading
MP4 vs WebM vs MOV, and when to use each
What MP4, WebM, and MOV really are, where each one shines, and the simple default that avoids playback headaches.
Read →5 min readGIF vs video, and when each one wins
Why GIFs are large and limited, when they still beat video, and how to make a good one when you need it.
Read →