Compress Video

Re-encode an MP4 with x264 in your browser using CRF presets tuned for email, WhatsApp and Discord. Free, private, no upload, no watermark, no sign-up.

🌐 Español

Drop your file here (.mp4)

πŸ”’ Private by design: your files are processed locally in your browser and never uploaded to any server.

CRF is a quality dial, not a size dial

The most common disappointment with any video compressor is expecting it to produce a number of megabytes. This one cannot, and it is worth being upfront about why.

Every preset here drives x264 in constant-quality mode. You tell the encoder how good the picture has to look and it spends whatever bitrate that requires, frame by frame. A locked-off screen recording of a text editor will sail through at a tiny bitrate; the same duration of handheld footage of leaves moving in wind will not, because there is genuinely more information in it.

The four Compression target choices map to CRF 26, 28, 30 and 32. On x264’s scale, lower is better quality and larger, and moving six points is the rough rule of thumb for halving the bitrate. Combining the higher CRF values with a resolution cap is what makes the platform presets land where they usually need to.

What the resolution caps do to a portrait clip

Balanced keeps your original resolution. It only applies scale=trunc(iw/2)*2:trunc(ih/2)*2, which nudges each dimension down to the nearest even number because H.264 requires that, and can therefore shave a single row or column off an odd-sized frame.

The other three build a different filter, of the shape scale='min(iw,1280)':'min(ih,1280)':force_original_aspect_ratio=decrease:force_divisible_by=2, with 854 in place of 1280 for the Discord preset. That reads as fit the frame inside a square box of that size, shrink only, and round to even dimensions. On a 16:9 landscape clip a 1280 box produces 1280 by 720, which is why the option is labelled 720p. On a 9:16 vertical clip the same box produces 720 by 1280. The cap is on the longest side, not on the width.

Only .mp4 gets past the dropzone

This page accepts .mp4 and nothing else, and the check happens in the browser before any processing begins, so a MOV or a WEBM never reaches the encoder at all.

That is narrower than several neighbouring tools on purpose. If your file is a MOV, an M4V or a WEBM, the target-size compressor takes all four containers and always writes MP4 out, so it doubles as a converter. The same is true of the trimmer and the audio remover, both of which accept those four extensions and both of which do their job with a stream copy rather than a re-encode, meaning no quality is lost at all.

Sending a video through the encoder

  1. Drop your .mp4 on the box above, or click Choose a file.
  2. Set the Compression target. Balanced preserves resolution; the other three are sized for a destination and will reduce it.
  3. Click Compress Video and leave the tab open. The progress bar reflects the FFmpeg run, and Cancel abandons it and empties the box.
  4. Compare the two sizes printed above the download button. If the result is still too large, click Process another and step down a preset.

Three flags every run passes, whatever preset you pick

Alongside the CRF value, every run passes the same three fixed settings, and they matter more than they look.

-pix_fmt yuv420p forces 4:2:0 chroma subsampling. Some phone and screen-capture sources arrive in formats that many hardware decoders and browsers refuse outright, and this is the setting that makes the output universally playable rather than something that works on your laptop and shows a black rectangle on someone’s TV.

-movflags +faststart moves the MP4 index to the front of the file after encoding. Without it a browser has to download the whole file before it can start playing; with it, playback begins immediately. It costs one extra pass over the finished file and is worth it for anything that will be streamed rather than downloaded.

-preset fast is x264’s own speed setting, and it is unrelated to the dropdown on this page. It trades a little compression efficiency for encode time, which is a sensible default when the encoder is running single-threaded inside a browser tab.

This page can hand you a bigger file

The GIF, MP3 and PDF compressors on this site compare their output against the input and return your original bytes when the encode did not help, and the image compressor does the same on any file it did not downscale. This one does none of that. Whatever x264 writes is what you get.

That matters most on already-compressed footage. A clip downloaded from a social platform has usually been through a hard encode already, and asking for CRF 26 at full resolution can genuinely produce a larger file than the one you started with. The interface will tell you, since it prints the percentage change, but you have to look at it. Three things help more than reaching for a harsher CRF. Drop the audio track first if the clip is silent anyway, which the audio remover linked above does without re-encoding the picture. Cut the clip shorter, since duration is the one variable that scales the output linearly. Or hand the problem to the target-size page, which reads the duration and works backwards from an explicit ceiling instead of guessing. The video tools index has the rest, and there is a longer explanation of what re-encoding costs in the guide on why video re-encoding loses quality.

Frequently asked questions

What does the CRF number in each preset control?

CRF stands for Constant Rate Factor, and it tells x264 what quality level to hold rather than what file size to hit. The four presets use 26, 28, 30 and 32 in that order, and each step of roughly six on that scale is conventionally treated as halving or doubling the bitrate. Because the encoder spends whatever bits the footage needs to hold that quality, a busy handheld clip and a static screen recording at the same CRF come out at very different sizes.

Can this tool guarantee my file lands under a specific megabyte limit?

It cannot, and no CRF-based encode can. The presets pair a CRF with a resolution cap chosen so typical short clips land under the matching platform limit, but the actual output depends on how long and how detailed your footage is. If you need an exact ceiling, use the target-size page on this site instead, which measures the clip's duration first and computes a bitrate to aim at.

Why is my portrait phone video still tall after picking the 720p preset?

The scale filter fits your frame inside a square box rather than forcing a width. For the 720p presets that box is 1280 by 1280, so a 1080 by 1920 vertical clip comes out at 720 by 1280, not 1280 by 720. The cap applies to whichever side is longest, the aspect ratio is preserved, and a clip already smaller than the box is left alone rather than stretched up.

How long should I expect an encode to take?

Longer than a desktop app, because the WebAssembly build of FFmpeg used here runs on a single thread. Using more than one thread would require COOP and COEP response headers, which are incompatible with the ad iframes this site is built around, so single-threaded is a deliberate trade rather than an oversight. Keep the tab in the foreground and watch the progress bar rather than guessing.

Is there any chance the output is larger than the input?

Yes, and this page does not protect you from it. Unlike the GIF, MP3, image and PDF compressors on this site, this module returns whatever x264 produced without ever comparing it against your original. A clip that has already been squeezed hard, or a very short one, can come back bigger at the Balanced preset. Check the before and after sizes printed above the download button before you use the result.

Does the audio survive untouched?

No. Audio is always re-encoded to AAC, at 128 kbps on the Balanced preset and 96 kbps on the three platform presets. There is no stream-copy path, so even if your source already carried perfectly good AAC it gets decoded and encoded again. If you do not need the audio at all, removing it entirely before compressing is both faster and smaller.

Related tools