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?
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?
First rename all of the inputs so they have zero-padding (001.png
...450.png
).
Then run ffmpeg
:
ffmpeg -framerate 25 -i %03d.png output.avi
or
ffmpeg -framerate 25 -pattern_type glob -i "*.png" output.avi
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
find . -maxdepth 1 -name "*.png" | sort -V
and it will show you the order that will be given to ffmpeg
.
– llogan
Nov 11 '19 at 19:19