Compress a video in the browser
The compress video tool makes an MP4, MOV, WebM, MKV, or AVI smaller and writes the result as an MP4 with H.264 video. Two options control the size: a CRF quality setting and a maximum height. ffmpeg compiled to WebAssembly does the work inside the tab with the same x264 encoder as desktop ffmpeg, and the video is never uploaded.
Output is always MP4 because it is the format every device plays. The output name adds "-compressed", so "lecture.mov" becomes "lecture-compressed.mp4".
CRF: trade quality for size
CRF, the constant rate factor, runs from 0 to 51 and defaults to 28. Lower is higher quality and larger; each step of about 6 doubles or halves the file size.
The default of 28 sits a notch below the usual x264 default of 23, because people compressing a video want it smaller. At 28 the picture still looks fine on a phone or in a chat window, and most sources shrink to a fraction of their size. If the output looks too soft, step back to 24 or 26. If the file still needs to be smaller and the content is mostly talking heads or screen recordings, 30 to 32 is acceptable. Past 35, blocking becomes obvious in motion and dark areas.
Maximum height: the other size setting
Max height runs from 144 to 4320 pixels and defaults to 1080. If the source is taller than the limit, the tool scales it down to that height and keeps the aspect ratio. If the source is already at or below the limit, it is left at its original size; the tool never upscales.
Pixel count has a bigger effect on size than CRF. A 4K video has four times the pixels of 1080p, so capping at 1080 removes three quarters of the work before the encoder starts. For a video that will be watched on a phone, 720 is plenty. For sending over a messaging app with tight limits, 480 combined with a CRF around 30 gets most clips through.
Some settings that work for common cases:
- Shared in a group chat: 720 max height, CRF 28.
- Attached to an email: 480 max height, CRF 30.
- Kept as a copy where space is tight: 1080 max height, CRF 24.
What the tool does not change
Frame rate and duration stay the same. Audio is kept and carried into the MP4. If the sound is all you need, video to MP3 produces a much smaller file than any video setting can.
Long videos take a while, since every frame is decoded, scaled, and encoded again on your own processor. Keep the tab open until the download appears.
Related tools
If the source is MP4 and you want the output to stay close to the original, video to MP4 uses the same encoder with a default CRF of 23 and no scaling. For an open format with a smaller file at the same quality, video to WebM encodes VP9, though it cannot limit the height. For a silent loop in an image format, use video to GIF.
Frequently asked questions
What format does the compressed video come out as?
MP4 with H.264 video, whatever the input was. MP4 plays on every device, which is why the tool always writes it.
What CRF should I use?
The default of 28 is a sensible starting point. Go to 24 or 26 if the picture looks too soft, or 30 to 32 for talking heads and screen recordings that need to be smaller.
What does max height do?
If the video is taller than the limit, it is scaled down to that height with the aspect ratio kept. Videos already at or below the limit are left at their size. The tool never upscales.
Which setting shrinks the file more?
Height. Capping a 4K video at 1080 removes three quarters of the pixels before encoding starts. Lower the height first, then raise CRF if the file is still too big.
Is the audio kept?
Yes. The audio is carried into the MP4 along with the video.
Which input formats are accepted?
MP4, MOV, WebM, MKV, and AVI.