Skip to content

Instantly share code, notes, and snippets.

@phillip-boombox
Last active July 25, 2019 00:13
Show Gist options
  • Save phillip-boombox/1e9ba2f1fd483cf8ed816407456f1090 to your computer and use it in GitHub Desktop.
Save phillip-boombox/1e9ba2f1fd483cf8ed816407456f1090 to your computer and use it in GitHub Desktop.
Create a sprite sheet in the terminal using FFmpeg and ImageMagick
ffmpeg -i video.mp4 %04d.png && montage -geometry $(identify -format '%wx%h' $(ls | sort | head -1)) -tile 8x *.png sprite.jpg && echo $(ls *.png | wc -l) "frames" && rm *.png
@phillip-boombox
Copy link
Author

Both FFmpeg and ImageMagick can be installed using Homebrew.
brew install ffmpeg
brew install imagemagick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment