Convert animated gif to mp4

file conversionvideo

I'm looking for a tool (GUI would be best) to convert an animated gif to a mp4-video to send it via WhatsApp.
Do you have any suggestions that get this job done?

Best Answer

You can use two programs, Imagemagick's convert command and ffmpeg, to do this.

convert -coalesce animation.gif frames%04d.png

Then convert the pngs to a movie:

ffmpeg -r 10 -i frames%04d.png -vcodec mjpeg -y movie.mp4

For a GUI, it would not gain you much convenience, but I know QuickTime Pro (you might have to get the old version) will convert a stack of sequential images into an animation. I don't know if it will read the GIF properly.

Edit: see @Henry's answer for another codec using h264. In short, for a more modern compression scheme on the movie, use -vcodec h264 instead