Skip to content

Instantly share code, notes, and snippets.

@dan-r95
Created July 13, 2018 13:31
Show Gist options
  • Save dan-r95/6b2bc4806d16f5694fda17df78a1f003 to your computer and use it in GitHub Desktop.
Save dan-r95/6b2bc4806d16f5694fda17df78a1f003 to your computer and use it in GitHub Desktop.
gif with ffmpeg using a color palette
ffmpeg -i 2.flv -filter:v "crop=222:448:17:2" 2.gif
ffmpeg -y -i alignment1.mp4 -vf fps=24,scale=1080:-1:flags=lanczos,palettegen palette.png
ffmpeg -i alignment1.mp4 -i palette.png -filter_complex "fps=24,scale=1080:-1:flags=lanczos[x];[x][1:v]paletteuse" alignment1.gif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment