Skip to content

Instantly share code, notes, and snippets.

Created May 8, 2015 17:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/c054df746bc2ccc87fb8 to your computer and use it in GitHub Desktop.
Save anonymous/c054df746bc2ccc87fb8 to your computer and use it in GitHub Desktop.
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