Skip to content

Instantly share code, notes, and snippets.

@madeingnecca
Created May 14, 2013 22:25
Show Gist options
  • Save madeingnecca/5580161 to your computer and use it in GitHub Desktop.
Save madeingnecca/5580161 to your computer and use it in GitHub Desktop.
MULTIMEDIA - video to gif
# Extract frames. One every 1 second(s)
ffmpeg -i video.mp4 -r 1 scenes/scene_%04d.png
# Convert png to png8 to decrease size.
for f in $(ls scenes | grep -i png); do convert "scenes/$f" "PNG8:scenes/$f"; done;
# Create animation
convert -delay 100 -loop 0 scenes/*.png animation.gif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment