Created
April 8, 2014 13:19
-
-
Save tfogo/10122911 to your computer and use it in GitHub Desktop.
How to convert videos to gif using ffmpeg and gifsicle
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
How to convert a video file to an animated GIF on Linux: | |
Install required software: | |
apt-get install ffmpeg gifsicle imagemagick: | |
Convert the video file to a series of small images: | |
mkdir /tmp/gif/ | |
ffmpeg -i YOURVIDEOFILE.mp4 -r 10 /tmp/gif/out%04d.gif | |
Combine these images together into a GIF animation: | |
gifsicle –delay=10 –loop /tmp/gif/*.gif > animation.gif | |
Optimise the GIF animation so the file size is smaller: | |
convert -layers Optimize animation.gif animation_optimized.gif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
P.S. Hey Tim! Thanks! Would you believe this was the first result on Google for gifsicle movie to gif?