Created
February 18, 2024 01:30
-
-
Save brunosan/8b4179079ec97d98861e85fd57a0a38d to your computer and use it in GitHub Desktop.
Create a properly ordered animated video from frames
This file contains hidden or 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
#/bin/bash | |
rm -rf a_temp_images | |
mkdir -p a_temp_images | |
i=1 | |
for f in $(ls Images_*.png | sort -V ); do | |
ln -s "$PWD/$f" "a_temp_images/$(printf "%05d.png" $i)" | |
i=$((i + 1)) | |
done | |
ffmpeg -y -f image2 -framerate 25 -i a_temp_images/%05d.png -vcodec libx264 -preset slower -crf 25 Animation.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment