Skip to content

Instantly share code, notes, and snippets.

@gnclmorais
Last active February 9, 2016 10:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save gnclmorais/7870423 to your computer and use it in GitHub Desktop.
Save gnclmorais/7870423 to your computer and use it in GitHub Desktop.
OS X Screencast to animated GIF

Overview

Following this gist, I decided to create my own tutorial/manual for future reference.

Prerequisites

Before trying to convert anything, you must have the following tools installed:

  • QuickTime (to record the video)
  • ffmpeg (to process the video file)
  • gifsicle (to create and optimise the animated gif)

Instalation

If the previous prerequisites are not met, perform the follwing commands:

# ffmpeg
brew install ffmpeg

# brew-cask (for gifsicle's dependencies)
brew tap phinze/homebrew-cask
brew install brew-cask

# gifsicle (and its dependencies)
brew cask install xquartz
brew install gifsicle

Instructions

Now that everything is ready, let's use it!

  1. Record a video with QuickTime (File -> New Screen Recording), and save it as in-mov.
  2. Run the following command in the same folder of in.mov: ffmpeg -i in.mov -pix_fmt rgb24 -r 20 -f gif - | gifsicle --optimize=3 --delay=3 > out.gif
  3. That's it! You now have an animated out.gif to share.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment