Skip to content

Instantly share code, notes, and snippets.

@skratchdot
Created January 1, 2019 17:23
Show Gist options
  • Save skratchdot/95ac8e02e4057eb478bd5f7952bb4ea2 to your computer and use it in GitHub Desktop.
Save skratchdot/95ac8e02e4057eb478bd5f7952bb4ea2 to your computer and use it in GitHub Desktop.
convert a gif to an mp4 using ffmpeg
#!/bin/bash
# https://unix.stackexchange.com/questions/40638/how-to-do-i-convert-an-animated-gif-to-an-mp4-or-mv4-on-the-command-line/294892#294892
ffmpeg -i animated.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" video.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment