Created
March 26, 2015 23:31
-
-
Save heisters/0d3c34d52d8f3eea05ec to your computer and use it in GitHub Desktop.
Convert videos to gifs
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/bash | |
in="$1" | |
out="$2" | |
fps=6 | |
delay=$(printf "%0.f" $(echo "scale=2;100 / $fps" | bc)) | |
mkdir gif | |
cd gif | |
ffmpeg -i $in -r $fps frame%05d.png | |
convert -delay $delay -loop 0 *.png $out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment