Skip to content

Instantly share code, notes, and snippets.

Created May 8, 2015
Embed
What would you like to do?
test
#!/bin/sh
# chmod u+x program_name
# % ./gifenc.sh video.mkv anim.gif
palette="/tmp/palette.png"
# filters="fps=15,scale=320:-1:flags=lanczos"
filters="fps=15"
~/ffmpeg-static/ffmpeg -v warning -i $1 -vf "$filters,palettegen" -y $palette
~/ffmpeg-static/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