Created
August 8, 2014 01:23
-
-
Save andrewk/8417cdb175c182a0430f to your computer and use it in GitHub Desktop.
Animated screenshot for github PRs
This file contains hidden or 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/sh | |
# Convert movie (screencast) to lofi animated gif for embedding in github PR's, emails etc. | |
# | |
# Requires: ffmpeg, gifsicle | |
# Screencasts are easily captured in Quicktime Player: File > New screen recording | |
if [ -z "$1" ] | |
then | |
echo "Usage: mov2gif input.mov 700 > output.gif" | |
echo "Second argument is gif max width in pixels, defaults to 600" | |
exit 1 | |
fi | |
ffmpeg -i $1 -vf scale=${2:-600}:-1 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=8 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment