Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

convert all the png files in a folder to video

Writer Andrew Henderson

I have ~450 frames named 1...450. However, there are some missing frames for example frame 10, 30, and so on do not exists.

I want to create an AVI video in the same order as 1...450.png. How should I do that?

1

1 Answer

Option 1: Rename

  1. First rename all of the inputs so they have zero-padding (001.png...450.png).

  2. Then run ffmpeg:

    ffmpeg -framerate 25 -i %03d.png output.avi

    or

    ffmpeg -framerate 25 -pattern_type glob -i "*.png" output.avi

Option 2: Sort

Use a more complicated command to sort the files and then pipe to ffmpeg:

cat $(find . -maxdepth 1 -name "*.png" | sort -V) | ffmpeg -framerate 25 -i - output.avi
2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy