To convert GIF to MP4, run `npx optimo animation.gif --format mp4`. GIFs are often much larger than video for the same animation. Optimo handles format conversion and optimization in a single step.

## Command

Convert a file by targeting the output format:

```
npx optimo animation.gif --format mp4
```

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

## Why convert?

- GIFs are often much larger than video for the same animation.
- MP4 plays smoothly and is broadly compatible on the web.

## Format notes

**GIF**  
Legacy animated image format that is still widely used for simple loops.

[Optimize GIF](/content/optimize/gif/index.html) [Compress GIF](/content/compress/gif/index.html) [Resize GIF](/content/resize/gif/index.html) [GIF guide](/content/formats/gif/index.html)

**MP4**  
The most compatible web video container; a safe default for delivery.

[Optimize MP4](/content/optimize/mp4/index.html) [Compress MP4](/content/compress/mp4/index.html) [Resize MP4](/content/resize/mp4/index.html) [MP4 guide](/content/formats/mp4/index.html)

## Not sure which to use?

If you're choosing a delivery format, here's a quick comparison.

[GIF vs MP4](/content/compare/gif-vs-mp4/index.html)
