user4976: I know I can create a video from files in a folder like so:
ffmpeg -f image2 -i %*.png out.avi

But if the folder I am in have sub-folders can i use some sort of switch to read those image files in those sub-folders?  At the moment I am having to copy these image files into 1 folder, create the video and then delete those copied image files. Which is time consuming .
Is there a way please?
Thanks

user4943: While you can go with the links approach, suggested by Gyan in the comments. You could also generate a list of files that you want to use for encoding, and then use -f concat. I have tried it with the following:
find . -name '*.jpeg' -exec echo "file '"{}"'" >> list.text \;
ffmpeg  -f concat -r 25 -safe 0 -i list.text -c:v libtheora -q:v 8 out.ogv

Let's take it apart.
First we generate the list of all the files matching '*.jpeg' name starting with the current directory ., we do not want to output that list as is, because ffmpeg for whatever reason cannot default to lines being files, and expects us to say it each and every line. So rather than my_image_001.jpeg we want file 'my_image_001.jpeg'. So we do a trick with the -exec of find piping the echo command into a file. list.text in this example.
Now we get to ffmpeg. You tell it that you wish to concatenate all of the files, by providing -f concat as the format of the file it is about to read. Note that you will need to specify the frame rate, since images do not have this at all. The -safe 0 is needed so that ffmpeg does not crash and burn with Unsafe file name error message. I believe that is because we are using paths relative to the current directory. It makes little sense, but you just need to do this. After this, the line is the same as if you were just re-encoding another video.

4976: <p>I know I can create a video from files in a folder like so:</p>

<pre><code>ffmpeg -f image2 -i %*.png out.avi
</code></pre>

<p>But if the folder I am in have sub-folders can i use some sort of switch to read those image files in those sub-folders?  At the moment I am having to copy these image files into 1 folder, create the video and then delete those copied image files. Which is time consuming .</p>

<p>Is there a way please?</p>

<p>Thanks</p>
 4943: <p>While you can go with the links approach, suggested by <a href="https://video.stackexchange.com/users/1871/gyan">Gyan</a> in the comments. You could also generate a list of files that you want to use for encoding, and then use <code>-f concat</code>. I have tried it with the following:</p>
<pre><code>find . -name '*.jpeg' -exec echo &quot;file '&quot;{}&quot;'&quot; &gt;&gt; list.text \;
ffmpeg  -f concat -r 25 -safe 0 -i list.text -c:v libtheora -q:v 8 out.ogv
</code></pre>
<p>Let's take it apart.</p>
<p>First we generate the list of all the files matching '*.jpeg' name starting with the current directory <code>.</code>, we do not want to output that list as is, because <code>ffmpeg</code> for whatever reason cannot default to lines being files, and expects us to say it each and every line. So rather than <code>my_image_001.jpeg</code> we want <code>file 'my_image_001.jpeg'</code>. So we do a trick with the <code>-exec</code> of <code>find</code> piping the <code>echo</code> command into a file. <code>list.text</code> in this example.</p>
<p>Now we get to <code>ffmpeg</code>. You tell it that you wish to concatenate all of the files, by providing <code>-f concat</code> as the format of the file it is about to read. Note that you will need to specify the frame rate, since images do not have this at all. The <code>-safe 0</code> is needed so that <code>ffmpeg</code> does not crash and burn with <code>Unsafe file name</code> error message. I believe that is because we are using paths relative to the current directory. It makes little sense, but you just need to do this. After this, the line is the same as if you were just re-encoding another video.</p>
