How Video Compression Works
All modern video compression relies on two core techniques:
- Spatial compression (intra-frame): Each individual frame is compressed like an image, removing redundant data within the frame. This is similar to how JPEG compresses a photo.
- Temporal compression (inter-frame): The codec stores only the differences between consecutive frames rather than encoding each frame independently. Since most video has relatively stable backgrounds with localized motion, this eliminates enormous amounts of redundant data.
The combination of these two techniques is why video compression is so effective. A raw, uncompressed 1-minute 1080p video at 30fps would be roughly 10.8GB. Modern codecs compress that to 50-200MB at high quality, a reduction of 50-200x.
Understanding the Key Variables
Bitrate
Bitrate is the amount of data used per second of video, measured in megabits per second (Mbps) or kilobits per second (kbps). Higher bitrate means more data, which generally means better quality and larger file size.
- 720p video: 2-5 Mbps for good quality
- 1080p video: 5-10 Mbps for good quality
- 4K video: 15-40 Mbps for good quality
These ranges assume a modern codec like H.264. More efficient codecs (H.265, AV1) can achieve the same quality at 30-50% lower bitrates.
Resolution
Resolution is the pixel dimensions of the video frame. Common resolutions:
| Name | Dimensions | Pixels per Frame | Relative Size |
|---|---|---|---|
| 720p (HD) | 1280 x 720 | 921,600 | 1x |
| 1080p (Full HD) | 1920 x 1080 | 2,073,600 | 2.25x |
| 1440p (2K) | 2560 x 1440 | 3,686,400 | 4x |
| 4K (UHD) | 3840 x 2160 | 8,294,400 | 9x |
Reducing resolution is the single most effective way to reduce file size. Going from 4K to 1080p reduces the pixel count by 4x, which typically results in a 3-4x reduction in file size at the same visual quality per pixel.
Codec
The codec is the compression algorithm. This is the most important choice for balancing quality and file size.
Codec Comparison: H.264 vs H.265 vs VP9 vs AV1
| Codec | Compression vs H.264 | Encoding Speed | Browser Support | Licensing |
|---|---|---|---|---|
| H.264 (AVC) | Baseline (reference) | Fast | Universal | Licensed (widely free in practice) |
| H.265 (HEVC) | 30-40% smaller | Moderate | Safari, Edge; no Chrome/Firefox | Complex patent pools |
| VP9 | 30-40% smaller | Moderate | Chrome, Firefox, Edge | Royalty-free (Google) |
| AV1 | 40-50% smaller | Slow (2-10x slower than H.264) | Chrome, Firefox, Edge, Safari 17+ | Royalty-free (AOM) |
H.264 (AVC)
H.264 is the universal default. Every browser, every device, every platform supports it. Encoding is fast and hardware acceleration is ubiquitous. If you need maximum compatibility or fast encoding, H.264 is the safe choice. The tradeoff is that files are larger than what newer codecs produce.
H.265 (HEVC)
H.265 offers 30-40% smaller files than H.264 at the same quality. It is the standard for 4K content delivery and is used by iPhone for video recording. The main drawback is complex patent licensing and incomplete web browser support. Chrome and Firefox do not support H.265 playback due to licensing concerns. H.265 is best for Apple-ecosystem delivery and offline use.
VP9
VP9 is Google's royalty-free codec, used by YouTube for all high-quality video delivery. It provides 30-40% compression improvement over H.264, similar to H.265. VP9 is well-supported in Chrome, Firefox, and Edge, but not in Safari (which prefers H.265). VP9 is a solid choice for web delivery where Safari support is not critical.
AV1
AV1 is the newest and most efficient codec, offering 40-50% compression improvement over H.264. It is royalty-free and backed by the Alliance for Open Media (Google, Apple, Netflix, Amazon, Microsoft, and others). AV1 has broad browser support as of 2026, including Safari 17+. The main drawback is encoding speed: AV1 is 2-10x slower to encode than H.264. However, hardware AV1 encoding is becoming available in newer GPUs, which is narrowing this gap.
Platform-Specific File Size Limits
Knowing your target platform's limits helps you set compression targets:
| Platform | Max File Size | Max Resolution | Max Duration | Recommended Codec |
|---|---|---|---|---|
| 16MB | 1080p | 3 minutes | H.264 | |
| Discord (free) | 10MB | No limit | No limit | H.264 |
| Discord (Nitro) | 50MB (Basic) / 500MB | No limit | No limit | H.264 |
| Email attachment | 25MB (Gmail/Outlook) | N/A | N/A | H.264 |
| Twitter/X | 512MB | 1920x1200 | 2 min 20 sec | H.264 |
| Instagram Reels | 4GB | 1080x1920 | 90 seconds | H.264 |
| YouTube | 256GB | 8K | 12 hours | H.264, VP9, AV1 |
Compression Settings by Use Case
Sharing via WhatsApp or Messaging (Under 16MB)
- Resolution: 720p (1280x720) is plenty for phone viewing
- Codec: H.264 for universal compatibility
- Bitrate: 1.5-3 Mbps
- Audio: AAC 96-128 kbps stereo
- Result: A 1-minute clip at these settings is approximately 12-22MB. For under 16MB, reduce bitrate to 1.5-2 Mbps or shorten the clip.
Discord Free Tier (Under 10MB)
- Resolution: 720p or 480p depending on duration
- Codec: H.264
- Bitrate: 1-2 Mbps for short clips; lower for longer clips
- Tip: A 30-second clip at 720p/1.5Mbps is about 5.6MB, fitting comfortably
Email Attachment (Under 25MB)
- Resolution: 1080p or 720p
- Codec: H.264
- Bitrate: 3-5 Mbps
- Result: A 1-minute clip at 1080p/3Mbps is approximately 22MB
High Quality Archive
- Resolution: Original (do not downscale)
- Codec: H.265 or AV1 for maximum compression; H.264 for compatibility
- Bitrate: 8-15 Mbps for 1080p, 20-40 Mbps for 4K
- Use CRF mode: CRF 18-23 for H.264/H.265 (lower = higher quality). CRF 23 is visually transparent for most content.
Resolution vs Bitrate: The Tradeoff
A common mistake is keeping resolution high while dropping bitrate too low. A 4K video at 5 Mbps will look worse than a 1080p video at 5 Mbps because the same amount of data is spread across 4x as many pixels. Each pixel gets less information, resulting in visible compression artifacts.
The rule of thumb: if you must reduce file size significantly, drop resolution before dropping bitrate below the quality floor. A clean, sharp 720p video looks better than a muddy, artifact-laden 1080p video.
How FastEdit Handles Video Compression
FastEdit compresses video entirely in your browser using WebAssembly-compiled FFmpeg. No video data is uploaded to any server. This has several practical benefits:
- Privacy: Sensitive or personal video never leaves your device
- No upload wait: You skip the upload step entirely, which saves significant time for large files on slow connections
- No file size limits: Since there is no upload, the tool can process files of any size your browser can handle
- Real-time preview: See how compression settings affect quality before committing to the full export
FastEdit supports H.264 and VP9 encoding, with platform-specific presets for WhatsApp, Discord, email, and social media. Select a preset and the tool automatically configures resolution, bitrate, codec, and container format to meet the platform's requirements.
Quick Reference: Compression Cheat Sheet
| Goal | Resolution | Codec | Bitrate | Expected Size (1 min) |
|---|---|---|---|---|
| WhatsApp share | 720p | H.264 | 1.5-2 Mbps | 11-15 MB |
| Discord free | 480-720p | H.264 | 1-1.5 Mbps | 7-11 MB |
| Email attachment | 1080p | H.264 | 3-4 Mbps | 22-30 MB |
| Social media upload | 1080p | H.264 | 5-8 Mbps | 37-60 MB |
| High quality archive | Original | H.265/AV1 | CRF 20-23 | Varies |