Created
December 12, 2017 23:05
-
-
Save bwhiteley/a997201e608dacc06f3827e0748a4d53 to your computer and use it in GitHub Desktop.
Create GIF from screen recording (or other video)
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
#!/bin/sh | |
# https://superuser.com/questions/436056/how-can-i-get-ffmpeg-to-convert-a-mov-to-a-gif | |
# Requires ffmpeg and ImageMagick | |
INPUT=$1 | |
OUTPUT=$2 | |
TMP=giffer_tmp_$$.gif | |
if [ "x$OUTPUT" == "x" ]; then | |
echo "Invalid args" | |
exit 1 | |
fi | |
ffmpeg -i $INPUT -pix_fmt rgb24 -r 10 $TMP | |
convert -layers Optimize $TMP $OUTPUT | |
rm $TMP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment