What is video compression?

Video compression makes a video file smaller by storing the picture more efficiently. An encoder such as H.264 keeps what changes from frame to frame and throws away detail the eye is unlikely to miss. The more it throws away, the smaller the file and the softer the picture. Phones and cameras record at a high bitrate to keep every detail, so their videos can often be made several times smaller without a visible difference.

Tool description

This tool compresses a video in your browser. Pick a compression level, or enter the file size you need, such as the limit of an email or chat app, and download the smaller video as an MP4. You can also lower the resolution, which saves the most space on large videos. Nothing is uploaded: the video is processed on your device with FFmpeg compiled to WebAssembly.

Features

  • Three compression levels: Light, Medium, and Strong
  • A target file size in megabytes, for upload and attachment limits
  • Optional lower resolution from 1440p down to 240p, for landscape and portrait videos
  • Saves as MP4 with H.264 video and AAC audio, which plays almost everywhere
  • Shows the original file size, and the new size on the download button
  • A preview of the video and a timeline to check it before you compress

How it works

Each compression level is a constant rate factor (CRF) for the x264 encoder: Light is CRF 24, Medium is CRF 28, and Strong is CRF 32. The encoder keeps the quality steady and spends more bits on busy scenes and fewer on calm ones, so the final size depends on the video. Every 6 steps of CRF roughly halves the file.

With a target file size, the tool divides the size by the length of the video to get a bitrate and encodes at that average instead. It aims about 8% below the target, because the encoder and the MP4 container can go a few percent over, most on short clips. Audio gets 128 kbps, or 64 kbps when the target is tight, and the rest goes to the picture. When the target leaves less than 100 kbps for the picture, the tool asks for a larger one.

The resolution menu only lists sizes smaller than the video and shows the exact size each one gives. They apply to the short side, so 720p makes a landscape video 1280 × 720 and a portrait one 720 × 1280.

Tips

  • Start with Medium. If the picture looks blocky, use Light; if the file is still too big, use Strong or a lower resolution.
  • For a small target size on a long video, also lower the resolution. A 720p or 480p picture at a low bitrate looks much cleaner than a 1080p one.
  • Compressing an already compressed video again loses some quality each time, so start from the original file when you can.
  • Encoding in the browser is slower than in a desktop app, so long or high-resolution videos can take several minutes.
  • The first run downloads FFmpeg, about 30 MB. Later runs on the same page start right away.