Skip to content

Instantly share code, notes, and snippets.

@ErickWendel
Created October 18, 2023 16:02
Show Gist options
  • Save ErickWendel/9cdbedc302409a301ea1a2e615e3f135 to your computer and use it in GitHub Desktop.
Save ErickWendel/9cdbedc302409a301ea1a2e615e3f135 to your computer and use it in GitHub Desktop.
INPUT=demo.gif
OUTPUT=demo-1.gif
ffmpeg -hide_banner -v warning -i $INPUT -filter_complex "[0:v] scale=320:-1:flags=lanczos,split [a][b]; [a] palettegen=reserve_transparent=on:transparency_color=ffffff [p]; [b][p] paletteuse" $OUTPUT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment