Created
May 9, 2016 09:38
-
-
Save hatashiro/c407fbb5b3106f67299f20416c2b2a79 to your computer and use it in GitHub Desktop.
mov-to-gif
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
#!/usr/bin/env bash | |
if [ -z "$3" ]; then | |
scale=600 | |
else | |
scale=$3 | |
fi | |
if [ -z "$2" ]; then | |
out="out.gif" | |
else | |
out=$2 | |
fi | |
ffmpeg -i "$1" -filter:v scale=$scale:-1 -pix_fmt rgb24 -r 10 -f gif - |\ | |
gifsicle --optimize=3 --delay=3 > $out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment