Skip to content

Instantly share code, notes, and snippets.

@joelbyler
Last active May 2, 2017 14:38
Show Gist options
  • Save joelbyler/55e0bd94de4318ddb80eb72479117f7e to your computer and use it in GitHub Desktop.
Save joelbyler/55e0bd94de4318ddb80eb72479117f7e to your computer and use it in GitHub Desktop.
Change quick time movie to animated gif

Sometimes I like to do screen capture with quicktime because its already installed on my mac.

And then sometimes I want to take the resulting video (.mov file) and attach it to a PR on github (animated .gif)

You can use this command to make the conversion, adjust and configure to suite your own needs.

ffmpeg -i orig.mov -s 640x360 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=6 > final3.gif

OR

ffmpeg -i orig.mov -vf scale=600:-1 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=5 > final.gif

NOTE: requires ffmpeg and gifsicle to be installed, both can be installed on mac using homebrew

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment