Audio, video & images

Video Compressor

Shrink a video to a target size (two-pass) for e-mail, WhatsApp or Discord, or by quality.

MP4, MOV, MKV, WebM, AVI, MPEG-TS, WMV, FLV; max 250 MB and 20 minutes. Processed on our server in a private temporary folder that is deleted afterwards; the result can be downloaded for about 2 hours.

MB

Only used with "Custom target size". 1 MB = 1,000,000 bytes.

Lower = better and larger. 23 is the x264 default; 26–30 is small with acceptable quality.

Try an example: Test clip to a 0.05 MB target (two-pass) · Constant quality CRF 30

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

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 name video_compressor
Example request
curl -s -X POST https://videocompressor.usefulweb.site/api/v1/calculate \
  -H 'content-type: application/json' \
  -d '{…see OpenAPI examples…}'

Related tools

Feedback