Skip to content

Instantly share code, notes, and snippets.

@vvo
Created July 15, 2013 14:28
Show Gist options
  • Star 17 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save vvo/6000388 to your computer and use it in GitHub Desktop.
Save vvo/6000388 to your computer and use it in GitHub Desktop.
generate sprites of video snapshots
sudo aptitude install ffmpeg
sudo aptitude install imagemagick
# fps=1 > every seconds
ffmpeg -i video.mp4 -f image2 -vf fps=fps=1 out%d.png
# horizontal sprite, resized at 30%
convert -resize 30% +append out*.png sprite-1-sec.png
# references:
# http://www.imagemagick.org/script/command-line-options.php#append
# http://www.imagemagick.org/script/command-line-options.php#resize
# http://ffmpeg.org/trac/ffmpeg/wiki/Create%20a%20thumbnail%20image%20every%20X%20seconds%20of%20the%20video
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment