Skip to content

Instantly share code, notes, and snippets.

@jonathanconway
Last active August 11, 2023 08:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathanconway/e8aedf6d1a3b9029595df4a7d9877323 to your computer and use it in GitHub Desktop.
Save jonathanconway/e8aedf6d1a3b9029595df4a7d9877323 to your computer and use it in GitHub Desktop.
Convert QuickTime screencasts to animated GIFs using ffmpeg
#!/bin/bash
# Inspired by solution by StackOverflow user #18664.
# [See: https://apple.stackexchange.com/a/211219/97498]
#
# Usage:
# gif [filename]
#
# filename - name of a .mov file to convert, excluding .mov extension
ffmpeg -i $0 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=7 > $0.gif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment