Browser FFmpeg recipe

Convert GIF to MP4 Online with FFmpeg

Create a web-friendly MP4 from an animated GIF.

Command

Run this FFmpeg command

ffmpeg -i input.gif -movflags +faststart -pix_fmt yuv420p -vf scale=trunc(iw/2)*2:trunc(ih/2)*2 output.mp4

When to use it

  • smaller animations
  • web uploads
  • social previews

How it works

  1. Upload the animated GIF.
  2. Run the MP4 conversion command.
  3. Download the converted MP4.

Option reference

OptionWhat it does
-pix_fmt yuv420pImproves playback compatibility.
scale=trunc(iw/2)*2:trunc(ih/2)*2Ensures even video dimensions.
-movflags +faststartOptimizes MP4 playback start.

Practical notes

  • MP4 is usually much smaller than GIF for animation.
  • GIFs do not contain normal audio, so the output is silent.

FAQ

Why convert GIF to MP4?

MP4 usually compresses animation better and plays more smoothly on the web.

Can I keep transparency?

This MP4 preset does not preserve alpha transparency.