Convert a video to a gif

+1
+1
-1
gif-ify() {
  if [[ -n "$1" && -n "$2" ]]; then
    ffmpeg -i $1 -pix_fmt rgb24 temp.gif
    convert -layers Optimize temp.gif $2
    rm temp.gif
  else
    echo "proper usage: gif-ify <input_movie.mov> <output_file.gif>. You DO need to include extensions."
  fi
}
Description: 
Requires ffmpeg and imagemagick installed. On Mac OS X with Homebrew, simply do "brew install ffmpeg" and "brew install imagemagick".