Video Compression Explained: How to Shrink Files Without Losing Quality

Learn how video compression works, the difference between codecs and containers, and practical tips for reducing file size while keeping your videos looking great.

Published February 13, 2026 · Updated February 13, 2026

Here's a number that might surprise you: a single minute of 4K video straight off your iPhone weighs around 350MB in its raw form. That's roughly the same as 50 high-resolution photos or an entire album's worth of MP3s. Record a 10-minute clip of your kid's school play, and you've used 3.5 GB of storage — from one video.

Now here's the magic: that same minute of 4K video, compressed with a modern codec like H.265, drops to about 30MB. That's a 12:1 reduction with quality so close to the original that most people can't tell the difference, even on a large screen. Video compression is quietly one of the most impressive achievements in computer science, and it runs behind the scenes every time you watch Netflix, scroll TikTok, or FaceTime your family.

But when it comes to compressing your own videos — the ones on your phone that are eating up storage, or the screen recording that's too big to email, or the tutorial that needs to be smaller for your website — most people are lost. They don't know the difference between a codec and a container, they don't understand what a "bitrate" is, and they end up either not compressing at all (wasting storage and bandwidth) or over-compressing (creating ugly, blocky messes).

This guide is going to fix that. No jargon soup, no academic theory — just practical knowledge that will help you shrink your video files dramatically while keeping them looking great.

How Video Compression Actually Works

Before diving into specific settings and recommendations, it helps to understand the basic principles. Don't worry — this is the simplified version, and it's genuinely interesting.

Video is essentially a rapid sequence of images (frames) — typically 24, 30, or 60 frames per second. If you stored each frame as an independent photograph, the file sizes would be astronomical. A single uncompressed 4K frame is about 24MB. At 30 frames per second, that's 720MB per second, or 43 GB per minute. Obviously, we can't store or transmit video at those sizes.

Video compression solves this by exploiting two fundamental types of redundancy:

Spatial redundancy: what's redundant within each frame

Look at any frame of a typical video — there's a lot of repetition. The blue sky in the upper half? Those millions of pixels are all very similar shades of blue. The white wall behind the speaker? Nearly identical across thousands of pixels. Instead of storing every individual pixel, the encoder describes these similar regions mathematically: "this 16×16 block is all approximately this shade of blue, with this slight gradient." This mathematical description uses far fewer bytes than listing every pixel value.

This is essentially the same principle behind JPEG compression for photographs. It works well because natural images have a lot of similarity in neighboring pixels.

Temporal redundancy: what doesn't change between frames

This is where video compression gets really clever, and it's the reason video can be compressed so much more aggressively than individual photographs.

Think about a typical talking-head video — a YouTube tutorial, a Zoom call, a news anchor. From one frame to the next, what actually changes? The speaker's mouth moves slightly. Maybe their eyes blink. But the background, their shirt, the desk, the lighting — 95% or more of the frame is identical to the previous frame.

A smart encoder doesn't store the same background 30 times per second. Instead, it uses a system of frame types:

  • I-frames (Intra-frames or keyframes) — complete, self-contained images, like a JPEG. The encoder inserts these periodically (every 1-5 seconds typically) as reference points.
  • P-frames (Predicted frames) — store only what changed since the previous frame. "Take the last frame, but move this 8×8 block of pixels 3 pixels to the right and change these specific pixels." P-frames are dramatically smaller than I-frames.
  • B-frames (Bidirectional frames) — even more efficient than P-frames, these can reference both past and future frames to describe changes. They're the smallest frame type but the most computationally expensive to encode.

This is why different types of video content compress to wildly different sizes:

  • A static slideshow presentation — 95%+ of each frame is identical to the previous one. Compresses extraordinarily well. A 30-minute presentation might be 50MB.
  • A talking-head video — only the face changes significantly. Compresses very well. 10 minutes might be 80-150MB.
  • Live-action movie with cuts and motion — lots of scene changes and movement. Moderate compression. 10 minutes might be 200-400MB.
  • Fast-paced action or sports — constant motion across the entire frame, lots of scene changes. Hard to compress. 10 minutes might be 500MB+.
  • Confetti or particle effects — every pixel changes every frame, random patterns that defy prediction. The worst-case scenario for video compression.

Understanding this explains something practical: why your screen recordings are so much smaller than your phone videos at the same resolution. Screen recordings have huge areas of static UI that barely change, while phone videos of real-world scenes have constant motion, lighting variation, and complexity.

Codecs vs Containers: Finally Understanding the Difference

This is the single most confusing aspect of video for most people, so let me make it clear once and for all.

A codec is the compression algorithm

The codec (coder-decoder) is the mathematical algorithm that does the actual compression. It determines how the video data is shrunk and what quality trade-offs are made. Think of it as the language the video is written in.

Here are the codecs that matter in 2026:

Codec Also Known As Year Compression Efficiency Encoding Speed Browser Support License
H.264 AVC, MPEG-4 Part 10 2003 Good (baseline) Very fast Universal Patented (free for web)
H.265 HEVC 2013 ~50% better than H.264 2-5× slower Wide but not universal Complex patent pool
VP9 2013 Similar to H.265 Medium Universal (web) Royalty-free (Google)
AV1 2018 ~30% better than H.265 5-20× slower Growing rapidly Royalty-free (Alliance for Open Media)

The key takeaway: newer codecs produce smaller files at the same quality, but they take longer to encode. H.264 is the safe universal choice. H.265 cuts file sizes roughly in half with wide (not universal) support. AV1 is the future — smallest files, royalty-free — but encoding is painfully slow and support is still catching up.

A container is the file format wrapper

The container (or wrapper) is the file format that holds the video stream, audio stream, subtitles, chapter markers, and metadata together in one file. Think of it as the box that holds the contents.

Container Extension Can Hold These Codecs Best For
MP4 .mp4 H.264, H.265, AV1, AAC, MP3 Everything — the universal choice
WebM .webm VP8, VP9, AV1, Opus, Vorbis Web delivery, royalty-free stack
MKV .mkv Almost anything Archival, multiple audio/subtitle tracks
MOV .mov H.264, H.265, ProRes, AAC Apple ecosystem, professional editing
AVI .avi Various (legacy codecs) Legacy compatibility only

The crucial insight: you can have the same codec in different containers, and different codecs in the same container. An MP4 file might contain H.264 video, or it might contain H.265, or even AV1. The container is just the box — the codec inside determines the actual quality and compression.

This means "converting from MOV to MP4" doesn't necessarily mean re-encoding the video. If both containers support the same codec (they both support H.264), you can often just re-wrap the video without any quality loss — a process called "remuxing" that takes seconds instead of minutes.

Practical Compression Settings for Every Scenario

Now let's get to what you actually need to know. Here are specific, tested recommendations for every common use case:

For social media (Instagram, TikTok, YouTube, Twitter/X)

  • Container: MP4
  • Codec: H.264 (universally accepted by all platforms)
  • Resolution: 1080p (1920×1080). Don't bother with 4K — every major platform downscales to 1080p or lower for most viewers, and they'll re-compress your video regardless. Uploading a smaller file means faster upload and gives the platform's encoder more headroom.
  • Bitrate/CRF: CRF 20-23 or 8-12 Mbps CBR
  • Audio: AAC at 128-192 kbps (stereo)
  • Frame rate: Match your source (30 or 60 fps). Don't upscale 30fps to 60fps — it doesn't add smoothness, just file size.
  • Expected size: ~80-120MB per minute of 1080p

Pro tip: many platforms re-encode everything you upload. By uploading a high-quality but well-compressed file, you give their encoder the best possible source material, which results in a better-looking final video on the platform.

For email or messaging (need to be small)

  • Container: MP4
  • Codec: H.264
  • Resolution: 720p (1280×720) for videos over 1 minute; 480p for longer clips. Most email attachments are viewed on phone screens where 720p is more than sharp enough.
  • Bitrate/CRF: CRF 26-28 or 2-5 Mbps
  • Audio: AAC at 96-128 kbps
  • Expected size: ~15-30MB per minute
  • Tip: Most email services cap attachments at 25MB. For longer videos, compress aggressively or use a cloud sharing link instead.

For website embedding

  • Primary format: MP4 with H.264 (works everywhere)
  • Optional secondary: WebM with VP9 (20-30% smaller, for browsers that support it)
  • Resolution: Match your <video> player's display size. If your player is 800px wide, serving a 4K video is pure waste — the browser downscales it anyway, but the user still downloads the full file. For a 640px player, 720p is perfect.
  • Bitrate/CRF: CRF 23-26 or 2-8 Mbps depending on content
  • Audio: AAC at 128 kbps, or strip audio entirely for background/hero/loop videos
  • Tip: For hero background videos, use very aggressive compression (CRF 30+) with reduced resolution. The visual quality matters less than the loading speed for a blurred or dimmed background.

For archival (keeping the best quality)

  • Container: MKV (most flexible) or MP4
  • Codec: H.265 for best size-to-quality ratio, or AV1 if you have time for slow encoding
  • Resolution: Keep original
  • Quality: CRF 18-22 (visually lossless — meaning you cannot distinguish the compressed version from the original in normal viewing conditions)
  • Audio: FLAC (lossless) or copy original audio stream without re-encoding
  • Expected size: Roughly 30-50% of the original file size with no visible quality loss

For screen recordings

Screen recordings compress incredibly well because most of the frame is static UI:

  • Container: MP4
  • Codec: H.264
  • Resolution: Original (don't downscale screen recordings — text becomes unreadable)
  • Quality: CRF 20-24
  • Expected size: A 10-minute screen recording that was originally 1GB can often compress to 50-100MB with zero visible quality loss

The CRF Scale: The Most Important Setting You've Never Heard Of

If you learn one thing from this guide, let it be CRF. CRF (Constant Rate Factor) is the quality control knob for modern video encoding, and it's far more useful than trying to pick a specific bitrate.

CRF works on a logarithmic scale where lower numbers mean higher quality (and larger files):

CRF Value Quality Level Typical Use Case File Size Impact
0 Mathematically lossless Scientific/medical — never use for normal video Enormous (often larger than raw)
14-17 Practically lossless Professional mastering Very large
18-20 Visually lossless Archival, quality-critical workflows Large but reasonable
21-23 Excellent Default for most H.264 encoding Good balance
24-27 Good Web delivery, social media Smaller files, minimal visible difference
28-32 Acceptable Previews, drafts, bandwidth-constrained Noticeable softening on close inspection
33+ Low Thumbnails, extreme compression Visible artifacts and blocking

The beauty of CRF is that it's adaptive. Instead of using a constant bitrate (which wastes bits on simple scenes and starves complex ones), CRF lets the encoder use more bits for complex, fast-moving scenes and fewer bits for static, simple scenes. The result is consistent perceived quality throughout the video, which is exactly what you want.

Important note for H.265/HEVC: The CRF scale is the same, but H.265 produces better quality at the same CRF value. A CRF 28 in H.265 looks roughly equivalent to CRF 23 in H.264 — at about half the file size. So if you're encoding with H.265, add about 4-6 to your usual H.264 CRF value.

Our recommendation for most people: Start with CRF 23 for H.264 or CRF 28 for H.265. Watch the result. If it looks good (it probably will), you're done. If you notice artifacts in fast-moving scenes, drop the CRF by 2 and try again.

Resolution vs Quality: The Trade-Off Nobody Talks About

Here's something counterintuitive: a 720p video at high quality (CRF 20) often looks better than a 1080p video at low quality (CRF 30). Resolution isn't everything — it's the interplay between resolution, bitrate, and content complexity that determines perceived quality.

The file size impact of resolution changes is dramatic:

Resolution Pixels per Frame Relative File Size Notes
4K (3840×2160) 8.3 million ~4× of 1080p Overkill for most use cases
1440p (2560×1440) 3.7 million ~1.8× Nice for gaming content
1080p (1920×1080) 2.1 million 1× (baseline) The sweet spot for most content
720p (1280×720) 0.9 million ~0.45× Good for mobile viewing
480p (854×480) 0.4 million ~0.2× Acceptable for very small players

Halving the resolution in each dimension (e.g., 1080p to 540p) reduces the pixel count by 75%, which roughly corresponds to a 60-75% file size reduction. This is by far the most impactful lever you have for reducing video file size.

Practical tip: if someone will watch your video on a phone screen, 720p is indistinguishable from 1080p at normal viewing distances. Sending 1080p to a 6-inch screen is wasting bandwidth. On the other hand, if the video will be displayed on a 4K monitor at full screen, 1080p will look soft.

Audio Matters Too (But Less Than You Think)

Video files contain both video and audio streams, and most of the file size is video. But audio settings still matter, especially for long videos:

Audio Codec Typical Bitrate Quality Compatibility
AAC 96-192 kbps Excellent for speech/music Universal
Opus 64-128 kbps Best efficiency (better than AAC) WebM/MKV, browser support growing
MP3 128-320 kbps Good, legacy Universal
FLAC 800-1400 kbps Lossless MKV, not MP4

For most videos, AAC at 128 kbps is the right choice — it's universally supported, sounds great for speech and music, and adds about 1MB per minute to the file size.

If your video doesn't need audio (background videos, loops, animated UI demos), strip the audio track entirely. This saves file size and prevents unexpected sound for visitors.

How to Compress Video with Fileza

The Video Tools page makes compression accessible without installing software:

  1. Drop your video onto the converter (supports MP4, WebM, AVI, MOV, MKV, and more)
  2. Choose your output format — MP4 for universal compatibility, WebM for smaller web files
  3. Adjust quality settings — the slider controls compression level
  4. Optionally resize — reduce resolution for dramatic file size savings
  5. Convert — processing happens entirely in your browser using FFmpeg WebAssembly

Since everything runs locally, your videos never leave your device. This matters — video files often contain GPS metadata, audio of private conversations, and visible personal information. Processing locally means none of that data touches anyone else's server.

For batch processing, you can add multiple videos and convert them all at once. The results download individually or as a ZIP archive.

Common Mistakes to Avoid

After seeing thousands of video compression questions, here are the mistakes people make most often:

  1. Upscaling resolution — converting a 720p video to 1080p doesn't make it sharper. It just makes the file bigger. The video will look exactly the same (or worse, due to re-encoding artifacts) at a larger file size.

  2. Re-encoding multiple times — every lossy re-encode degrades quality slightly. If you compress a video, edit it, and compress it again, you've lost quality twice. Try to do all your editing before the final compression step.

  3. Using bitrate instead of CRF — fixed bitrate wastes bits on simple scenes and starves complex ones. CRF adapts to the content and produces much better results. Use CRF unless you have a specific reason for constant bitrate (like live streaming).

  4. Ignoring content type — a screen recording and an action movie need completely different settings. Screen recordings compress 10× better because most of the frame doesn't change. Apply content-appropriate settings rather than one-size-fits-all.

  5. 4K for everything — unless your audience has 4K screens and the bandwidth to stream 4K, you're wasting storage and bandwidth. 1080p is the right default for most content in 2026.

The Bottom Line

Video compression is a balance between quality, file size, compatibility, and encoding speed. The good news is that for most people, the decisions are simpler than they seem:

  • Use H.264 in MP4 when you need it to work everywhere — it's been the universal standard for 20 years and nothing has replaced it for compatibility
  • Use H.265 in MP4 when you want 50% smaller files and compatibility isn't critical (most modern devices support it)
  • Target 1080p unless you have a specific reason for higher resolution
  • Use CRF 22-24 for H.264 (or CRF 26-28 for H.265) — this is the sweet spot where quality is excellent and files are reasonable
  • Process locally using browser-based tools to keep your videos private — they often contain sensitive metadata and audio you might not want on someone else's server

Modern codecs are genuinely remarkable — they can compress video by 50-100× with quality that's indistinguishable from the original to most viewers. The technology is there. You just need to know which knobs to turn, and now you do.