Created
March 29, 2017 15:57
-
-
Save charltoons/1266a8ae0427ee286ecb83e1289ba233 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
palette="/tmp/palette.png" | |
filters="fps=12,scale=768:-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 /tmp/gif.gif | |
gifsicle -O3 --no-extensions -o $2 --dither --colors 256 /tmp/gif.gif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment