Last active
August 29, 2015 14:25
-
-
Save danielepolencic/1aa7ce8281332a480845 to your computer and use it in GitHub Desktop.
video to gif
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/bash | |
rm -rf frames | |
mkdir frames | |
ffmpeg -i "$1" -vf scale=320:-1:flags=lanczos,fps=10 frames/ffout%03d.png | |
convert -delay 5 -loop 0 -dither None -colors 128 "frames/ffout*.png" -fuzz "10%" -layers OptimizeFrame "$2" | |
rm -rf frames | |
# as seen on: | |
# http://superuser.com/questions/556029/how-do-i-convert-a-video-to-gif-using-ffmpeg-with-reasonable-quality |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment