Skip to content

Instantly share code, notes, and snippets.

@mderazon
Created November 1, 2016 09:37
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mderazon/dcfe7c2606a9a9bf0dfd139aa439ab45 to your computer and use it in GitHub Desktop.
Save mderazon/dcfe7c2606a9a9bf0dfd139aa439ab45 to your computer and use it in GitHub Desktop.
convert images and videos screenshots to something that's nice to paste in github
if [[ "$1" == *.mp4 ]]
then
/Users/me/bin/togif "$1"
fi
if [[ "$1" == *.png ]]
then
/Users/me/bin/topic "$1"
fi
/usr/local/bin/ffmpeg -i "$1" -pix_fmt rgb24 -r 10 -y -s 338x600 "${1/%.mp4/.gif}";
sips -Z 600 "$1";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment