Skip to content

Instantly share code, notes, and snippets.

@githubutilities
Last active August 29, 2015 14:15
Show Gist options
  • Select an option

  • Save githubutilities/b8e2ae8fb3fd97ed0832 to your computer and use it in GitHub Desktop.

Select an option

Save githubutilities/b8e2ae8fb3fd97ed0832 to your computer and use it in GitHub Desktop.
convert gif file to mp4

I got a gif file from google homepage but I want to convert it to more general mp4 file in order to share through wechat, but most of the solution I found on the internet suggest that I should combile imagemagick and ffmpeg to accomplish this. Here it's the interesting fact that most of the scripts does not work on mac os x mavericks.

Here is the solution I got:

ffmpeg -i lunar-new-year-2015-5753824463552512-hp.gif -pix_fmt yuv420p out.mp4

This command also proves useful, it can split gif file to pngs

convert lunar-new-year-2015-5753824463552512-hp.gif %d.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment