Video Compressor
Shrink a video with H.264 in your browser. Choose "Quality (CRF)" to set the picture quality, or "Target Size (MB)" to set the file size.
Equivalent FFmpeg command
CLI command for your current settings. Updates live as you change controls.
ffmpeg -y -i input.mp4 -map 0:v:0 -map "0:a:0?" -pix_fmt yuv420p -map_metadata -1 -map_metadata:s -1 -map_chapters -1 -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" -c:v libx264 -crf 23 -preset fast -c:a aac -b:a 128k -movflags +faststart output.mp4 What changes when you compress a video?
One 10-second clip compressed with three settings. The pictures show part of the frame at 2x.
ffmpeg -i input.mp4 -map 0:v:0 -map 0:a:0? -c:v libx264 -crf 36 -preset fast -pix_fmt yuv420p -c:a aac -b:a 96k -movflags +faststart output.mp4
Original Compressed How this was measured
2026-09-24, FFmpeg 8.1 on Windows (H.264, fast preset), one run per setting on a 10-second 1080p live-action clip. The pictures are a 480x270 native-resolution crop at 3 seconds, shown at 2x.
Tears of Steel (CC) Blender Foundation | mango.blender.org, CC BY 3.0. Cropped from the 4K version and scaled to 1080p; part of each encoded frame at 2x
How to use
- Drop a videoMP4 / MOV / MKV / WebM up to 500MB. Drag-and-drop or tap to pick.
- Pick a modeChoose "Quality (CRF)" to put quality first, or "Target Size (MB)" to set the file size.
- Adjust resolutionKeep the original or downscale. Going from 1080 → 720 roughly halves the file.
- CompressWhen the progress bar finishes, a preview and a download button appear.
Recommended settings
When it goes wrong
File size barely changes
Cause: The source is already well compressed.
Fix: Drop one resolution tier (1080 → 720) or push CRF above 28.
Quality looks awful
Cause: CRF above 30, or target MB too low for the duration.
Fix: Lower CRF back to 23–26, raise target MB, or trim the clip.
Browser freezes
Cause: Phones can run out of memory with files over 200 MB.
Fix: Lower the resolution or try a shorter clip. You can also use a computer.
Questions
How do I avoid noticeable quality loss?
Use about CRF 20 and keep the original resolution. At CRF 18 the loss is very hard to see, but the file is larger.
Can I strip the audio?
No. If the video has sound, the output keeps it. To remove the sound, use the Mute Video Tool, or add `-an` in FFmpeg.
Does iPhone HEVC (.mov) work?
Yes. It reads HEVC and writes H.264 in an MP4, which plays on more devices. HDR video is not converted to SDR.
How long can the input be?
The limit is 500 MB. The browser works in memory, so large files fail more often (phones show a warning above 200 MB). Trim long videos first, or use FFmpeg on a computer.
Why does the same CRF give different sizes for different videos?
CRF is a quality target, not a bitrate. Videos with more motion and fine detail need more data.
Can I output WebM or MOV?
No, this tool only outputs MP4 (H.264 + AAC). Use the Format Converter for other formats.
CRF or target MB?
Use CRF when quality matters and size is flexible. Use target MB for a size-limited upload: take the destination's limit and subtract any other attachments. Longer clips leave less bitrate for each second of video.
What does the encode preset (ultrafast / fast / slow) actually do?
It sets how much time the encoder spends. Slower presets take longer and raise quality a little, but at the same CRF they do not reliably make the file smaller. ultrafast is quick but makes the file much larger. If unsure, keep the default, fast.
My iPhone won't play the output
The output is H.264 (8-bit 4:2:0) with AAC audio in an MP4, a format iPhone plays. If it still will not play, try another clip to see whether the problem is the source file.
Output ended up larger than the original — why?
This happens when the source is already heavily compressed and you pick a low CRF (high quality). The result then shows "% larger". Raise the CRF or lower the resolution.
More detail (settings, limits, FFmpeg commands)
What each setting means
Browsers and limits
- Modern Chrome / Edge / Firefox / Safari
- Up to 500 MB (phones show a warning above 200 MB)
- Output is MP4 (H.264 + AAC) only
The same job with the FFmpeg command line
ffmpeg -i input.mp4 -c:v libx264 -crf 23 -preset fast -pix_fmt yuv420p -c:a aac -b:a 128k -movflags +faststart output.mp4 ffmpeg -i input.mp4 -vf "scale='if(gte(iw,ih),-2,trunc(min(min(iw,ih),720)/2)*2)':'if(gte(iw,ih),trunc(min(min(iw,ih),720)/2)*2,-2)'" -c:v libx264 -crf 23 -preset fast -pix_fmt yuv420p -c:a aac -b:a 128k -movflags +faststart output.mp4 ffmpeg -i input.mp4 -c:v libx264 -b:v 1138k -maxrate 1252k -bufsize 2276k -preset fast -pix_fmt yuv420p -c:a aac -b:a 128k -movflags +faststart output.mp4 CRF vs target-MB: when to pick which
CRF (Constant Rate Factor) puts steady quality first. The encoder spends more data on busy, moving scenes and less on still ones, so the final size depends on the content and cannot be fixed in advance. It suits destinations where size does not matter much, such as YouTube.
Target Size (MB) counts 1 MB as 1,000,000 bytes. The total bitrate is floor(target_MB × 8000 × 0.95 / duration_seconds); the audio (128 kbps, or 64 kbps for clips over 300 seconds) is subtracted and the rest goes to the video. The 5% reserve covers the container and similar overhead; it is not a size guarantee. If the output is over the target, the tool lowers the bitrate and encodes once more. If it is still over, it says so. Trim the clip or lower the resolution.
When the clip is short for the target, the video bitrate is held at a cap for the output size and the file comes out smaller than the target. The caps are the recommended upload bitrates in YouTube Help (SDR, 48–60 fps): 1500 kbps up to 360p, 4000 up to 480p, 7500 up to 720p, 12000 up to 1080p, 24000 up to 1440p and 68000 up to 2160p (checked 2026-09-25). With these caps even 1080p60 stays within H.264 level 4.2.
x264 preset vs encode time
libx264 presets run from ultrafast through veryfast, fast, medium and slow to veryslow. Slower presets take longer and raise quality a little. At the same CRF they do not reliably make the file smaller, and ultrafast makes it much larger. This tool offers ultrafast, fast, medium and slow; the default is fast.
To spend more time on quality, copy the command from the 'Equivalent FFmpeg command' box on this page, change `-preset` to `slow` or slower, and run it with FFmpeg on your computer.
Why this tool outputs H.264, not HEVC or AV1
H.264 plays in more places than any other format: the built-in apps on Windows, macOS, iPhone and Android, the main browsers, and most software such as PowerPoint. HEVC (H.265) and AV1 can make smaller files at the same quality, but HEVC may need a paid extension from the Microsoft Store on Windows, and AV1 does not play on some older devices and apps.
For your own archive, HEVC or AV1 can save space. When you send a video to others, or do not know where it will be played, an MP4 with H.264 and AAC is the safest choice.