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; partial/platform-dependent in Chrome, Edge, and Firefox | Complex patent pools |
| VP9 | 30-40% smaller | Moderate | Chrome, Firefox, Edge, Safari 16+ | Royalty-free (Google) |
| AV1 | 40-50% smaller | Slow (2-10x slower than H.264) | Chrome, Firefox, Edge; partial/device-dependent in 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. Safari is the safest browser target; Chrome, Edge, and Firefox support is partial and depends on platform codecs and hardware. H.265 is best for Apple-ecosystem delivery and offline use.
VP9
VP9 is Google's royalty-free codec, used by YouTube for high-quality video delivery. It provides 30-40% compression improvement over H.264, similar to H.265. VP9 is well-supported in Chrome, Firefox, Edge, and modern Safari, though older Safari versions still need an MP4/H.264 fallback.
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, but Safari support is partial and hardware-dependent. 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 |
|---|---|---|---|---|
| Inline video media: about 16MB; documents: up to 2GB | 720p-1080p depending on send mode | Varies by send mode; file size is the hard target for inline media | 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.com; 20MB Outlook client internet email including message | N/A | N/A | H.264 |
| X (standard) | 512MB | 1920x1200 | 2 min 20 sec | H.264 |
| X Premium | Up to 16GB on web/iOS | 1080p for shorter videos; 720p for longer videos | Up to 4 hours on web/iOS; Android is shorter | H.264 |
| Instagram Reels | Account/app dependent | 1080x1920 | 3 minutes is the discovery-safe target; longer uploads vary | H.264 |
| YouTube | 256GB | 8K | 12 hours | H.264, VP9, AV1 |
Compression Settings by Use Case
Sharing Inline via WhatsApp or Messaging (Around 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 inline WhatsApp media, reduce bitrate to 1.5-2 Mbps or shorten the clip; for larger files, send as a document instead.
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 (Target 18-19MB for Broad Compatibility)
- Resolution: 1080p or 720p
- Codec: H.264
- Bitrate: 2.5-3 Mbps
- Result: A 1-minute 1080p clip at 2.5Mbps video plus AAC audio lands around 19-20MB. That fits Gmail and Outlook.com, but leaves little room for Outlook client internet-email accounts that count the whole message against a 20MB limit.
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 browser-native media APIs. 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 hard upload cap: Since there is no upload, the practical limit is whatever your browser and device memory can handle
- Real-time preview: See how compression settings affect quality before committing to the full export
FastEdit supports common browser-available encoders including H.264, H.265, VP8, VP9, and AV1, with presets for platforms such as WhatsApp, Discord, X, Instagram, and YouTube. Presets set dimensions, format, codec, and validation constraints where applicable; use the bitrate, resolution, and duration controls to work toward a file-size target, then check the generated output size before posting.
Quick Reference: Compression Cheat Sheet
| Goal | Resolution | Codec | Bitrate | Expected Size (1 min) |
|---|---|---|---|---|
| WhatsApp inline 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 | 2.5 Mbps | 19-20 MB |
| Social media upload | 1080p | H.264 | 5-8 Mbps | 37-60 MB |
| High quality archive | Original | H.265/AV1 | CRF 20-23 | Varies |