Skip to content

Instantly share code, notes, and snippets.

@ahmedam55

ahmedam55/script.sh

Created Apr 21, 2019
Embed
What would you like to do?
Convert Video to Gif
function gif {
ffmpeg -y -i $1 -vf fps=10,scale=${2:-1280}:-1:flags=lanczos,palettegen palette.png
ffmpeg -i $1 -i palette.png -filter_complex "fps=10,scale=${2:-1280}:-1:flags=lanczos[x];[x][1:v]paletteuse" output.gif
rm palette.png
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment