[View source on GitHub](https://github.com/microlinkhq/optimo)

To optimize WebM videos, run `npx optimo video.webm`. Optimo applies format-specific FFmpeg-powered compression that typically reduces WebM 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.webm
```

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

## When to use WebM

- web delivery
- background videos
- high compression

### Trade-offs

- Some platforms prefer MP4 for maximum compatibility

## Related formats

[MP4](/content/optimize/mp4/index.html)  
The most compatible web video container; a safe default for delivery.  
[MOV](/content/optimize/mov/index.html)  
Common container from cameras and editing tools; typically converted for the web.  
[MKV](/content/optimize/mkv/index.html)  
Flexible container used in many workflows; commonly remuxed/converted for delivery.  
[AVI](/content/optimize/avi/index.html)  
Legacy container format; usually worth converting to MP4/WebM.  
[OGV](/content/optimize/ogv/index.html)  
Ogg video container; occasionally used for open formats, but uncommon today.

## Related conversions

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

## More for WebM

[Compress WebM](/content/compress/webm/index.html)  
[Resize WebM](/content/resize/webm/index.html)  
[What is WebM?](/content/formats/webm/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 WebM files?** Run "npx optimo video.webm" in your terminal. Optimo applies format-specific FFmpeg-powered compression that reduces WebM file size while preserving quality. The original file is kept if the optimized output is not smaller.

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

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