Compress MP4 files

Compress MP4 for reliable, compatible playback. MP4 is the safest default for web video delivery.

Last updated: 2026-03-18

To compress MP4 files, run npx optimo video.mp4. Optimo applies FFmpeg-powered compression by default. For stronger reduction, use --lossy or --resize to shrink dimensions — often the single biggest lever for file size.

Start with optimo

First, run optimo on your video file:

npx optimo video.mp4

This is safe: optimo keeps the original if the output isn't smaller.

Two big levers

1) Lossy mode
npx optimo video.mp4 --lossy
2) Resize (dimensions)
npx optimo video.mp4 --resize w1280

Practical tips

  • Use `--lossy` for smaller files when slight quality loss is acceptable.
  • Use `--resize w1280` (or similar) to avoid shipping 4K sources to small players.
  • Mute if audio isn’t required; it reduces size and avoids autoplay issues.

Consider converting

Sometimes the best compression is picking a better delivery format.

Popular conversions

Frequently asked questions

How do I compress MP4 files?
Run "npx optimo video.mp4" to compress MP4 with lossless optimization. For stronger compression, add --lossy. For size reduction through resizing, add --resize followed by a percentage, dimensions, or target file size.
What is the best way to reduce MP4 file size?
The two biggest levers are resizing (reducing dimensions to match display size) and lossy compression. Resizing usually has a larger impact than codec-level compression. Sometimes converting to a more efficient format is the best approach.