Video Compressor
Shrink a video to a target size (two-pass) for e-mail, WhatsApp or Discord, or by quality.
How it works
Compresses a video to a target file size with a two-pass H.264 encode: the bitrate is calculated from the size and length, minus the audio budget, and the resolution is lowered automatically when the bitrate would be too thin. Presets for e-mail (25 MB), WhatsApp (16/100 MB) and Discord (10 MB), or a constant-quality CRF mode. Reports the achieved size.
- Target size: usable bits = (target − 2 % − 20 kB container overhead) × 8. Total bitrate = usable bits ÷ duration. Audio gets 128/96/64/48/32 kbit/s, at most about 20 % of the total; the rest goes to the video. If the video would get less than 50 kbit/s, the tool tells you the smallest workable target instead.
- Resolution "automatic" picks the largest standard height (never above the source) where the video bitrate still gives at least 0.05 bits per pixel per frame — a common H.264 rule of thumb — and caps the frame rate at 30 fps when the bitrate is below 2 Mbit/s. The suggestion table shows bits per pixel for each step.
- Two-pass libx264 (preset veryfast): pass 1 analyses the video, pass 2 distributes the bitrate where it is needed, which hits the size much more precisely than one pass. maxrate/bufsize limit spikes. Quality mode is a single CRF pass.
- The output is MP4 (H.264/AAC, faststart for streaming). The achieved size is measured and compared with the target; two-pass is typically within a few percent.
Size limits of e-mail providers and messengers change; check the current limit of your service. Very low targets make the picture blurry.
Sources
- FFmpeg H.264 encoding guide (two-pass, CRF) (FFmpeg wiki)
Use this tool in an app
These free programs for your browser have this tool built in, next to everything else the task needs.
-
Reelcraft Audio, video & image batch studio
Audio, video & image batch studio: cut, convert, compress, subtitle, reframe
Related tools
- Universal Video Converter – Convert video to MP4, WebM, MOV or MKV: resize, set quality and fps, or remux losslessly.
- Video Cutter & Merger – Trim video, remove a section or join clips: lossless copy or frame-exact re-encode.
How to use the Video Compressor
Shrink a video to fit e-mail, WhatsApp or Discord limits with a two-pass encode, or compress by quality, and understand which resolution to pick.
What it is for
"File too large" is the most common video problem there is. E-mail attachments stop around 25 MB and messengers and chat apps have their own caps. This compressor works backwards from the size you need. It takes the target, subtracts container overhead and an audio budget, divides by the video length to get a bitrate, and runs a two-pass H.264 encode that lands close to the target. If the bitrate would be too thin for the original resolution, it automatically picks a lower one and shows you why.
There's also a quality mode (CRF). It doesn't aim for a size. It keeps the quality constant and lets the size fall where it may. The output is always MP4 (H.264/AAC), which plays practically everywhere.
The presets (e-mail 25 MB, WhatsApp 16/100 MB, Discord 10 MB) reflect common limits. Services change their limits, so check yours.
Worked example
Source: a 20-second 1920×1080, 30 fps clip of 13.3 MB (5.3 Mbit/s).
Preset Discord 10 MB: "Two-pass H.264 at 3784 kbit/s video + 128 kbit/s audio, 1920×1080: 13.3 MB → 9.80 MB (target 10.0 MB, within target)." The resolution stayed at 1080p because 3784 kbit/s gives 0.061 bits per pixel per frame, rated "acceptable".
Custom target 2 MB: "Two-pass H.264 at 648 kbit/s video + 128 kbit/s audio, 854×480: 13.3 MB → 1.97 MB (within target)." The resolution table explains the drop to 480p. At 648 kbit/s, 1080p would get only 0.01 bits per pixel ("blurry"), 540p 0.042 ("soft"), and 480p 0.053, the largest size rated "acceptable".
Quality mode, CRF 28: "H.264 CRF 28 at 1920×1080: 13.3 MB → 5.68 MB (57.5% smaller)."
How to read the result
- New size and the green within target callout are the main answer. Two-pass usually lands a few percent under the target.
- Resolution options lists each standard height with its bits per pixel per frame and an expected picture verdict. Roughly 0.05 is the threshold the tool uses for automatic selection. Above about 0.1 is comfortable.
- Video/audio kbit/s shows how the budget was split. Audio gets at most about 20 % of the total.
- If the target is impossible (less than 50 kbit/s left for video), you get the smallest workable target instead of an unusable file.
Tips and common mistakes
- Size is bitrate × duration. If a long video needs to be small, trimming it first (Video Cutter & Merger) helps more than any setting.
- Set the target a little below the hard limit. The tool counts 1 MB as 1,000,000 bytes, while some apps count 1 MB as 1,048,576 bytes.
- Remove the audio for silent screen recordings. The whole budget then goes to the picture.
- Forcing "keep" resolution at a tiny target produces mush. Let "automatic" lower the resolution, because a sharp 480p looks better than a blocky 1080p.
- Use quality mode when there's no hard limit. CRF 23 is the x264 default, 26–30 is small with acceptable quality, and every +6 roughly halves the size.
- Screen recordings and talking heads compress far better than handheld, grainy or confetti-filled footage. Expect different results with the same settings.
FAQ
Why is the result smaller than the target?
Two-pass encoding aims slightly below the target to leave a safety margin for container overhead. Within a few percent under is normal.
Will the video look bad?
That depends on bits per pixel. The resolution table shows what to expect before you share it. If "blurry" appears for every size you'd accept, the target is too small for this length.
Why is it limited to 30 fps sometimes?
When the total bitrate is below 2 Mbit/s, the frame rate is capped at 30 fps so each frame gets more bits.
Which file types can I upload?
MP4, MOV, MKV, WebM, AVI, MPEG-TS, WMV and FLV, up to 250 MB and 20 minutes.
Guide last updated:
For scripts and AI agents
- JSON API:
POST https://videocompressor.usefulweb.site/api/v1/calculate(same calculation as this page) - Interface description: OpenAPI 3.1 · AI guide: llms.txt
- MCP server (Streamable HTTP):
https://videocompressor.usefulweb.site/mcp· tool namevideo_compressor
Example request
curl -s -X POST https://videocompressor.usefulweb.site/api/v1/calculate \
-H 'content-type: application/json' \
-d '{…see OpenAPI examples…}'