Skip to content

Instantly share code, notes, and snippets.

@kaizhu256
Created September 8, 2019 06:30
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 kaizhu256/030fbe30ef3756732c499e4ddd709917 to your computer and use it in GitHub Desktop.
Save kaizhu256/030fbe30ef3756732c499e4ddd709917 to your computer and use it in GitHub Desktop.
this function will convert quicktime.mov $1 to animated gif $2
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