Question:
I have a folder filled with frames that have the timestamp in the name in the folowing format
im_%H_%M_%S_%MS.png
1 2 3 4 5 6 7 8 9 |
im_08_05_09_007324.png im_08_05_09_532857.png im_08_05_10_059340.png im_08_05_10_575862.png im_08_05_11_118361.png im_08_05_11_596814.png im_08_05_12_148340.png im_08_05_12_665838.png |
I try to use -pattern_type glob
in windows but it does not work.
1 2 |
ffmpeg.exe -framerate 10 -pattern_type glob -i im_*.png -c:v libx264 -r 30 -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" -pix_fmt yuv420p $videoName |
I get
1 2 |
Pattern type 'glob' was selected but globbing is not supported by this libavformat build im_*.png: Function not implemented |
later I found that this do not work on windows 🙁 which is what I am using. ffmpeg Error: Pattern type ‘glob’ was selected but globbing is not support ed by this libavformat build
I also try
1 2 |
ffmpeg.exe -framerate 10 -pattern_type glob -i im_%02d_%02d_%02d_%06d.png -c:v libx264 -r 30 -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" -pix_fmt yuv420p $videoName |
I got
1 2 |
im_%02d_%02d_%02d_%06d.png: No such file or directory |
I am running out of ideas. I refuse to believe that there is no way to do this in ffmpeg and powershell.
I really appreciate any help!
Answer:
You can use a workaround, via the concat demuxer
Create a text file with the list of filenames in order
1 2 3 4 5 6 |
file im_08_05_09_007324.png file im_08_05_09_532857.png file im_08_05_10_059340.png file im_08_05_10_575862.png file im_08_05_11_118361.png |
and then run
1 2 |
ffmpeg -f concat -r 10 -i list.txt -c:v libx264 ... |
(this will produce warnings about invalid DTS but you can ignore them)