Skip to content

Instantly share code, notes, and snippets.

@anselanza
Created December 17, 2020 09:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anselanza/533b337118b18164227e67701de84233 to your computer and use it in GitHub Desktop.
Save anselanza/533b337118b18164227e67701de84233 to your computer and use it in GitHub Desktop.
ffmpeg to convert a video to animated GIF

Useful for converting screenshots, for example. Note the reduced framerate and scale (which can be changed) to help with reduced filesizes:

ffmpeg -i some-video.mov -filter_complex "[0:v] fps=12,scale=480:-1,split [a][b];[a] palettegen [p];[b][p] paletteuse" output.gif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment