Skip to content

Instantly share code, notes, and snippets.

@T410
Last active December 6, 2021 21:25
Show Gist options
  • Save T410/e1e327e1d18a31598198f04bf925246d to your computer and use it in GitHub Desktop.
Save T410/e1e327e1d18a31598198f04bf925246d to your computer and use it in GitHub Desktop.
ffmpeg video2GIF
#!/bin/sh
palette="/tmp/palette.png"
filters="fps=15,scale=960:-1:flags=lanczos"
ffmpeg -v warning -i $1 -vf "$filters,palettegen" -y $palette
ffmpeg -v warning -i $1 -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y $2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment