Skip to content

Instantly share code, notes, and snippets.

@salmanfarisvp
Created December 10, 2024 13:58
Show Gist options
  • Save salmanfarisvp/eb22dc2f0a29773f001e260edf9ad888 to your computer and use it in GitHub Desktop.
Save salmanfarisvp/eb22dc2f0a29773f001e260edf9ad888 to your computer and use it in GitHub Desktop.
Create High Quality gif using ffmpeg
# Create pallete
ffmpeg -i input.mp4 -vf "fps=15,scale=800:-1:flags=lanczos,palettegen" palette.png
# Create the gif using the pallete and save as output.gif
ffmpeg -i input.mp4 -i palette.png -lavfi "fps=15,scale=800:-1:flags=lanczos [x]; [x][1:v] paletteuse=dither=sierra2_4a" output.gif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment