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:

NameDimensionsPixels per FrameRelative Size
720p (HD)1280 x 720921,6001x
1080p (Full HD)1920 x 10802,073,6002.25x
1440p (2K)2560 x 14403,686,4004x
4K (UHD)3840 x 21608,294,4009x

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

CodecCompression vs H.264Encoding SpeedBrowser SupportLicensing
H.264 (AVC)Baseline (reference)FastUniversalLicensed (widely free in practice)
H.265 (HEVC)30-40% smallerModerateSafari, Edge; no Chrome/FirefoxComplex patent pools
VP930-40% smallerModerateChrome, Firefox, EdgeRoyalty-free (Google)
AV140-50% smallerSlow (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:

PlatformMax File SizeMax ResolutionMax DurationRecommended Codec
WhatsApp16MB1080p3 minutesH.264
Discord (free)10MBNo limitNo limitH.264
Discord (Nitro)50MB (Basic) / 500MBNo limitNo limitH.264
Email attachment25MB (Gmail/Outlook)N/AN/AH.264
Twitter/X512MB1920x12002 min 20 secH.264
Instagram Reels4GB1080x192090 secondsH.264
YouTube256GB8K12 hoursH.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

GoalResolutionCodecBitrateExpected Size (1 min)
WhatsApp share720pH.2641.5-2 Mbps11-15 MB
Discord free480-720pH.2641-1.5 Mbps7-11 MB
Email attachment1080pH.2643-4 Mbps22-30 MB
Social media upload1080pH.2645-8 Mbps37-60 MB
High quality archiveOriginalH.265/AV1CRF 20-23Varies