2
I want to encode a sequence of images to an video file, I have done this in the past with something like:
ffmpeg -i %08d.jpg out.mp4
But first I had to rename the files to be in that %08d.jpg format. I want to just encode them and let them be in alphabetical order (or whatever) without having to rename them, is this possible? I tried with using *.jpg and ffmpeg just hung and eventually crashed.
1Not possible by default.
*.jpg
will simply expand to all filenames before FFmpeg even sees the asterisk. Why couldn't you just rename the files, if I may ask? Or copy them somewhere else, then rename? Maybe you can pipe the images into FFmpeg similar tocat *.jpg | ffmpeg -f image2 -i pipe: -r 25 out.mp4
? – slhck – 2012-10-23T12:31:19.650You can do it with Symbolic Links to your list of files... Have a look at this link to give you an idea: Sort images by aspect ratio
– Peter.O – 2012-10-23T16:21:48.113I do currently just rename the files, with a little python script, but it's a kludge and I thought it likely there was a more elegant solution I wasn't aware of. The symbolic link thing had occurred to me, too, but it's really just as much work as renaming the files anyway. I will try the pipe thing next... – wim – 2012-10-24T00:30:14.037
Have you tried the pipe already? Would be interested to see if that works – slhck – 2012-10-29T15:07:38.400
No, it didn't work. But on reading the man pages to try and figure out the syntax to make it work, I saw something else which solved the problem. I'll post it as an answer.. – wim – 2012-10-31T12:22:51.980