Created
May 16, 2016 10:57
-
-
Save johanneswseitz/7eba1db2380ad9d3ede0c9b76fffddd7 to your computer and use it in GitHub Desktop.
Convert Video to Gif file
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
#!/usr/bin/sh | |
set -euo pipefail | |
FS=$'\n\t' | |
mkdir tmp | |
mplayer -ao null "$1" -vo jpeg:outdir=tmp | |
convert tmp/* "$1.gif" | |
convert "$1.gif" -fuzz 5% -layers Optimize "$1.opt.gif" | |
rm -rf tmp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment