Skip to content

Instantly share code, notes, and snippets.

Forked from SlexAxton/.zshrc
Last active Aug 29, 2015
What would you like to do?
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
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif
echo "proper usage: gifify <>. You DO need to include extension."
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 stuff
brew install gifsicle
brew install imagemagick
# I had a weird problem with Convert/imagemagick where I had to do:
ln -s /usr/local/Cellar/libtool/2.4.2/lib/libltdl.7.dylib libltdl.7.dylib
# But hopefully you don't have to
# Take screencast using Quicktime. Export as high quality as possible.
gifify --good
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment