-
-
Save rupl/e4c026e9ea52ce7def1d to your computer and use it in GitHub Desktop.
GIF workflow for OS X Mavericks 10.9 and Homebrew 0.9.5 — lovingly adapted from https://gist.github.com/SlexAxton/4989674
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
gifify() { | |
if [[ -n "$1" ]]; then | |
if [[ $2 == '--good' ]]; then | |
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png | |
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif | |
rm out-static*.png | |
else | |
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif | |
fi | |
else | |
echo "proper usage: gifify <input_movie.mov>. You DO need to include extension." | |
fi | |
} |
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
# Installation for OS X Mavericks 10.9 | |
brew install ffmpeg | |
brew tap phinze/homebrew-cask | |
brew install brew-cask | |
brew cask install xquartz | |
open /opt/homebrew-cask/Caskroom/xquartz/2.7.6/XQuartz.pkg | |
# Click through the XQuartz installer | |
brew install gifsicle | |
brew install imagemagick |
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
# Take screencast using Quicktime. Export as high quality as possible. | |
# --good flag is highly recommended, unless size really counts | |
gifify screencap.mov | |
gifify screencap.mov --good |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment