Skip to content
Advertisement

ffmpeg img to video = Could find no file with path

i try to convert img to mp4 with ffmpeg. i try to do it like this:

ffmpeg -framerate 25 -f image2 -start_number 1 -i '/tmp/stream/_%09d.jpg' -c:v libx264 -profile:v high -crf 20 -pix_fmt yuv420p output.mp4

and get an error:

[image2 @ 0xe74800] Could find no file with path '/tmp/stream/_%09d.jpg' and index in the range 1-5
/tmp/stream/_%09d.jpg: No such file or directory

The jpg file-name format is:

/tmp/stream/2017_11_20_08_48_30_picture_000000001.jpg
/tmp/stream/2017_11_20_08_48_35_picture_000000002.jpg
/tmp/stream/2017_11_20_08_48_40_picture_000000003.jpg
***
/tmp/stream/2017_11_20_08_56_30_picture_000000999.jpg

anyone can help, where is mistake?… Thanks!

Advertisement

Answer

To match all jpg files in /tmp/stream use:

ffmpeg -framerate 25 -pattern_type glob -i '*.jpg'

For more specificity use additional glob patterns. For example, if you only want images from 2017-11-08 to 2017-11-10:

ffmpeg -framerate 25 -pattern_type glob -i '/tmp/stream/2017_11_{08,09,10}*.jpg'

For more info on glob patterns see man 7 glob.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement