Last active
May 12, 2017 21:30
-
-
Save surma/d361d177d25bee798ee02cd2f5bef843 to your computer and use it in GitHub Desktop.
Convert video to gif
This file contains hidden or 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/bash | |
FUZZ="0.0% 0.5% 1.0% 1.5% 2.0% 2.5% 3.0%" | |
COLORS="128 256" | |
CONV_OPTS="-resize 450 -layers optimize-plus -layers optimize-transparency" | |
mkdir output | |
for f in $FUZZ; do | |
convert +repage -fuzz $f -delay 4 -loop 0 $@ $CONV_OPTS ./output/im-$f.gif | |
for c in $COLORS; do | |
gifsicle -O3 --colors $c ./output/im-$f-0.gif > ./output/gs-$f-$c.gif | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment