To optimize MP4 videos, run `npx optimo video.mp4`. Optimo applies format-specific FFmpeg-powered compression that typically reduces MP4 file size by 15–40% without visible quality loss. The original file is kept if the output is not smaller.

## Command

Start here. Run optimo on a video file:

```
npx optimo video.mp4
```

Tip: add `--dry-run` to preview changes.

## When to use MP4

- web embeds
- product videos
- social clips

### Trade-offs

- Encoding choices affect quality/size heavily

## Related formats

[WebM]((https://optimo.microlink.io/optimize/webm/)) - Web-first video format that often compresses well and is common for modern browsers.
[MOV]((https://optimo.microlink.io/optimize/mov/)) - Common container from cameras and editing tools; typically converted for the web.
[MKV]((https://optimo.microlink.io/optimize/mkv/)) - Flexible container used in many workflows; commonly remuxed/converted for delivery.
[AVI]((https://optimo.microlink.io/optimize/avi/)) - Legacy container format; usually worth converting to MP4/WebM.
[OGV]((https://optimo.microlink.io/optimize/ogv/)) - Ogg video container; occasionally used for open formats, but uncommon today.

## Related conversions

[Convert GIF to MP4](/content/convert/gif-to-mp4/index.html)  
[Convert MOV to MP4](/content/convert/mov-to-mp4/index.html)  
[Convert MKV to MP4](/content/convert/mkv-to-mp4/index.html)  
[Convert AVI to MP4](/content/convert/avi-to-mp4/index.html)  
[Convert MP4 to WebM](/content/convert/mp4-to-webm/index.html)  
[Convert WebM to MP4](/content/convert/webm-to-mp4/index.html)  
[Convert MP4 to MOV](/content/convert/mp4-to-mov/index.html)  
[Convert MP4 to MKV](/content/convert/mp4-to-mkv/index.html)

## More for MP4

[Compress MP4](/content/compress/mp4/index.html)  
[Resize MP4](/content/resize/mp4/index.html)  
[What is MP4?](/content/formats/mp4/index.html)

## Compare formats

If you're picking a delivery format, comparisons can help.

[MP4 vs WebM](/content/compare/mp4-vs-webm/index.html)

## Frequently asked questions

**How do I optimize MP4 files?** Run "npx optimo video.mp4" in your terminal. Optimo applies format-specific FFmpeg-powered compression that reduces MP4 file size while preserving quality. The original file is kept if the optimized output is not smaller.

**Is MP4 optimization lossless?** By default, optimo uses lossless optimization for MP4. For additional compression, add the --lossy flag to allow minor quality trade-offs for significantly smaller files.

**What tools does optimo use for MP4?** Optimo uses FFmpeg under the hood with format-specific settings tuned for MP4 files.
