🎬 Video Compressor

Compress MP4 videos using FFmpeg WASM — your files never leave your browser

🔒 Your videos never leave your browser. 100% Client-Side.
📁

Drag & drop your MP4 video here

or click to browse — MP4 only, max 500 MB recommended

0% (Smallest) 100% (Best)

How Video Compression Works

Video compression reduces file size by eliminating redundant data across both space and time. Modern codecs like H.264 use sophisticated techniques to achieve dramatic size reductions while maintaining visual quality.

How H.264 / AVC Encoding Works

H.264 (also known as AVC or MPEG-4 Part 10) is the most widely used video codec. It achieves compression through several key techniques:

  • Intra-frame prediction: Within a single frame, blocks of pixels are predicted from neighboring blocks, so only the differences need to be stored.
  • Inter-frame prediction: Motion vectors describe how blocks move between frames, eliminating redundancy across time. Only the differences between predicted and actual frames are stored.
  • Discrete Cosine Transform (DCT): Similar to JPEG, blocks are transformed to frequency domain, and high-frequency details (less noticeable to the eye) are discarded or coarsely quantized.
  • Entropy coding: The remaining data is compressed using Context-Adaptive Binary Arithmetic Coding (CABAC) for maximum efficiency.

Understanding CRF (Constant Rate Factor)

CRF is FFmpeg's quality-based encoding mode. Unlike bitrate-based encoding (which targets a specific file size), CRF targets a consistent perceptual quality level:

  • CRF 18-20 (80-100% quality): Visually lossless or near-perceptually transparent. Use for archiving or when quality is paramount.
  • CRF 21-24 (50-79% quality): Excellent balance of quality and file size. Good for web distribution, social media.
  • CRF 25-28 (20-49% quality): Noticeable compression artifacts. Acceptable for previews or bandwidth-constrained delivery.
  • CRF 29-51 (0-19% quality): Heavy compression with significant quality loss. Use only when file size is the absolute priority.

Compression Ratio Formula

The compression ratio tells you how much space you saved:

Compression Ratio = (1 − Compressed Size / Original Size) × 100%

For example, if a 50 MB video compresses to 15 MB, the compression ratio is (1 − 15/50) × 100% = 70%.

Why Browser-Based Compression Matters

Traditional online video compressors upload your files to a server, process them, and send them back. This means your videos (which could contain sensitive content) traverse the internet and may be stored on remote servers. This tool uses FFmpeg compiled to WebAssembly (WASM) to compress videos entirely within your browser — zero data leaves your device.

Step-by-Step Guide

  1. Upload a video — Drag and drop or click to select an MP4 file (H.264 encoded). Files up to 500 MB are recommended.
  2. Adjust quality — Use the slider to set compression quality (0-100%). Higher values = better quality but larger files.
  3. Wait for processing — FFmpeg WASM processes the video entirely in your browser. Progress is shown. Larger videos take longer.
  4. Download — Once compression is complete, download your compressed MP4 file.

Frequently Asked Questions

No. All compression happens entirely in your browser using FFmpeg compiled to WebAssembly (WASM). Your videos never leave your device — no server upload, no cloud processing, no storage.

CRF (Constant Rate Factor) is FFmpeg's quality-based encoding mode. Lower CRF values produce better quality but larger files. CRF 18 is visually lossless, CRF 23 is the default, and CRF 28+ shows visible compression artifacts. Our quality slider maps 0-100% to CRF 51-18.

This tool supports MP4 input (H.264 encoded videos). The output is also an MP4 file with H.264 video and AAC audio. If your video is in another format, convert it to MP4 first.

Because processing happens entirely in your browser's memory, very large files may cause issues. We recommend compressing videos under 500 MB. Files larger than 500 MB will show a warning.