Created
September 8, 2019 06:30
-
-
Save kaizhu256/030fbe30ef3756732c499e4ddd709917 to your computer and use it in GitHub Desktop.
this function will convert quicktime.mov $1 to animated gif $2
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
shScreencastToGif () {(set -e | |
# this function will convert quicktime.mov $1 to animated gif $2 | |
# https://gist.github.com/dergachev/4627207 | |
# https://gist.github.com/baumandm/1dba6a055356d183bbf7 | |
ffmpeg -y -i "$1" -vf fps=10,palettegen /tmp/palette.png | |
ffmpeg -i "$1" -i /tmp/palette.png -filter_complex "fps=10,paletteuse" "$2" | |
)} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment