Skip to content

Instantly share code, notes, and snippets.

@davinctor
Created July 3, 2017 15:43
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 davinctor/77af1369e4b8e2d59c17d60190ae71fb to your computer and use it in GitHub Desktop.
Save davinctor/77af1369e4b8e2d59c17d60190ae71fb to your computer and use it in GitHub Desktop.
Convert video to gif
palette="/tmp/palette.png"
filters="fps=60,scale=1024:-1:flags=lanczos"
ffmpeg -i shoot.mov -vf "$filters,palettegen" -y $palette
ffmpeg -i shoot.mov -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y output.gif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment