Skip to content

Instantly share code, notes, and snippets.

@kaizhu256
Created September 8, 2019 06:30
Show Gist options
  • Select an option

  • Save kaizhu256/030fbe30ef3756732c499e4ddd709917 to your computer and use it in GitHub Desktop.

Select an option

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