Last active
July 18, 2024 04:25
-
-
Save jonathanconway/e8aedf6d1a3b9029595df4a7d9877323 to your computer and use it in GitHub Desktop.
Convert QuickTime screencasts to animated GIFs using ffmpeg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Inspired by solution by StackOverflow user #18664. | |
# [See: https://apple.stackexchange.com/a/211219/97498] | |
# | |
# Dependencies: ffmpeg, gifsicle | |
# | |
# Usage: | |
# mov2gif [filename] | |
# | |
# filename - name of a .mov file to convert | |
# | |
# Outputs a file with the same name, suffixed with ".gif" | |
ffmpeg -i "$@" -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=7 > "$@".gif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment