Skip to content

Instantly share code, notes, and snippets.

@zenorocha
Forked from SlexAxton/.zshrc
Created May 6, 2013 20:37

Revisions

  1. @SlexAxton SlexAxton revised this gist Feb 27, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion .zshrc
    Original file line number Diff line number Diff line change
    @@ -8,6 +8,6 @@ gifify() {
    ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif
    fi
    else
    echo "proper usage: gif-ify <input_movie.mov>. You DO need to include extension."
    echo "proper usage: gifify <input_movie.mov>. You DO need to include extension."
    fi
    }
  2. @SlexAxton SlexAxton revised this gist Feb 19, 2013. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions Install.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,6 @@
    brew install ffmpeg
    brew tap phinze/homebrew-cask
    brew install brew-cask
    brew cask install x-quartz
    open /usr/local/Cellar/x-quartz/2.7.4/XQuartz.pkg
    # click through the stuff
  3. @SlexAxton SlexAxton revised this gist Feb 19, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion .zshrc
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    gifify() {
    if [[ -n "$1" ]]; then
    if [[ $2 == '--good' ]]; then
    ffmpeg -i $1 -r 10 -vcodec png out-static-%02d.png
    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
  4. @SlexAxton SlexAxton created this gist Feb 19, 2013.
    13 changes: 13 additions & 0 deletions .zshrc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    gifify() {
    if [[ -n "$1" ]]; then
    if [[ $2 == '--good' ]]; then
    ffmpeg -i $1 -r 10 -vcodec png out-static-%02d.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: gif-ify <input_movie.mov>. You DO need to include extension."
    fi
    }
    11 changes: 11 additions & 0 deletions Install.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    brew install ffmpeg
    brew tap phinze/homebrew-cask
    brew cask install x-quartz
    open /usr/local/Cellar/x-quartz/2.7.4/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
    4 changes: 4 additions & 0 deletions usage.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    # Take screencast using Quicktime. Export as high quality as possible.

    gifify screencap.mov
    gifify screencap.mov --good