Skip to content

Instantly share code, notes, and snippets.

@johanneswseitz
Created May 16, 2016 10:57
Show Gist options
  • Save johanneswseitz/7eba1db2380ad9d3ede0c9b76fffddd7 to your computer and use it in GitHub Desktop.
Save johanneswseitz/7eba1db2380ad9d3ede0c9b76fffddd7 to your computer and use it in GitHub Desktop.
Convert Video to Gif file
#!/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