Last active
September 23, 2020 23:52
-
-
Save dannygarcia/4d965c84e0278a5a65cc13b0b5d51f41 to your computer and use it in GitHub Desktop.
Convert Image Sequence to Animations
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
# This is not intended to be run as an executable shell script file. | |
# These are just the commands I use directly in the terminal after `cd`-ing to the image sequence directory. | |
# Images are named in this format: ####.png | |
# Convert video to sequence (ffmpeg) | |
ffmpeg -i anim.mp4 -vf fps=60 %04d.png | |
# Convert sequence to animated GIF (imagemagick) | |
convert -delay 2.5 -loop 0 *.png anim.gif | |
# Convert sequence to video @ 24fps (ffmpeg) | |
# https://avpres.net/FFmpeg/sq_H264.html | |
ffmpeg -r 24 -f image2 -i %04d.png -vcodec libx264 -crf 25 -pix_fmt yuv420p anim.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment