user3204: I have a bunch of images, that follow this pattern.
0001.png
0004.png
0007.png
0010.png
0013.png
0016.png
0019.png
...

They're in the correct order, but FFMPEG ignores anything after the first file, because it can't find a 0002.png.  How can I get it to join these files?
I tried
ffmpeg -i %04d.png out.avi


user21991: For the missing sequence part, I used 2 liner
CONCAT=$(echo $(ls *.png | sort -n -t _ -k 2) | sed -e "s/ /|/g")
ffmpeg -framerate 25 -i "concat:$CONCAT" -c:v libx264 -profile:v high -pix_fmt yuv420p output.mp4

Hope this will help someone in future

user2836: I would actually suggest the same thing Mulvya suggested.  Whenever I've needed to do stuff like this when dealing with 3D animation renderings, I've renamed the files to make them sequential.  It's just easier to work with that way in a lot of different software unless you need to preserve the file names for some reason.  Total Commander is also a great tool for multi-renaming.

user4874: From http://www.ffmpeg.org/faq.html:
If you have large number of pictures to rename, you can use the following command to ease the burden. The command, using the bourne shell syntax, symbolically links all files in the current directory that match *jpg to the ‘/tmp’ directory in the sequence of ‘img001.jpg’, ‘img002.jpg’ and so on.

x=1; for i in *jpg; do counter=$(printf %03d $x); ln -s "$i" /tmp/img"$counter".jpg; x=$(($x+1)); done


user1871: Besides the workaround in my comment, you should be able to use this syntax from the ffmpeg documentation:
ffmpeg -f image2 -pattern_type glob -i '*.png' out.avi

The quotes are important, you need ffmpeg to see the *, not have the shell expand it.

user3894: For recent versions of ffmpeg, see Gyan's answer instead
Original answer:

with ffmpeg 0.11.1 it's as easy as:
ffmpeg -f image2 -i %*.png out.avi

From the man page, in an example under "Video and Audio file format conversion":

When importing an image sequence, -i also supports expanding shell-like wildcard patterns (globbing) internally. To lower the chance of interfering with your actual file names and the shell's glob expansion, you are required to activate glob meta characters by prefixing them with a single % character, like in foo-%*.jpeg, foo-%?%?%?.jpeg or foo-00%[234%]%*.jpeg.

Update per comments: on recent versions you should now use -i '*.png' syntax.

3204: <p>I have a bunch of images, that follow this pattern.</p>

<pre><code>0001.png
0004.png
0007.png
0010.png
0013.png
0016.png
0019.png
...
</code></pre>

<p>They're in the correct order, but FFMPEG ignores anything after the first file, because it can't find a <code>0002.png</code>.  How can I get it to join these files?</p>

<p>I tried</p>

<pre><code>ffmpeg -i %04d.png out.avi
</code></pre>
 21991: <p>For the missing sequence part, I used 2 liner</p>

<pre><code>CONCAT=$(echo $(ls *.png | sort -n -t _ -k 2) | sed -e "s/ /|/g")
ffmpeg -framerate 25 -i "concat:$CONCAT" -c:v libx264 -profile:v high -pix_fmt yuv420p output.mp4
</code></pre>

<p>Hope this will help someone in future</p>
 2836: <p>I would actually suggest the same thing Mulvya suggested.  Whenever I've needed to do stuff like this when dealing with 3D animation renderings, I've renamed the files to make them sequential.  It's just easier to work with that way in a lot of different software unless you need to preserve the file names for some reason.  Total Commander is also a great tool for multi-renaming.</p>
 4874: <p>From <a href="http://www.ffmpeg.org/faq.html">http://www.ffmpeg.org/faq.html</a>:
If you have large number of pictures to rename, you can use the following command to ease the burden. The command, using the bourne shell syntax, symbolically links all files in the current directory that match *jpg to the ‘/tmp’ directory in the sequence of ‘img001.jpg’, ‘img002.jpg’ and so on.</p>

<p><code>
x=1; for i in *jpg; do counter=$(printf %03d $x); ln -s "$i" /tmp/img"$counter".jpg; x=$(($x+1)); done
</code></p>
 1871: <p>Besides the workaround in my comment, you should be able to use this syntax from the ffmpeg <a href="http://ffmpeg.org/ffmpeg.html#Video-and-Audio-file-format-conversion">documentation</a>:</p>

<pre><code>ffmpeg -f image2 -pattern_type glob -i '*.png' out.avi
</code></pre>

<p>The quotes are important, you need ffmpeg to see the <code>*</code>, not have the shell expand it.</p>
 3894: <p><strong>For recent versions of ffmpeg, see <a href="https://video.stackexchange.com/a/7320/3894">Gyan's answer</a> instead</strong></p>
<p><em>Original answer:</em></p>
<hr />
<p>with ffmpeg 0.11.1 it's as easy as:</p>
<pre><code>ffmpeg -f image2 -i %*.png out.avi
</code></pre>
<p>From the <code>man</code> page, in an example under &quot;Video and Audio file format conversion&quot;:</p>
<blockquote>
<p>When importing an image sequence, <code>-i</code> also supports expanding shell-like wildcard patterns (globbing) internally. To lower the chance of interfering with your actual file names and the shell's glob expansion, you are required to activate glob meta characters by prefixing them with a single <code>%</code> character, like in <code>foo-%*.jpeg</code>, <code>foo-%?%?%?.jpeg</code> or <code>foo-00%[234%]%*.jpeg</code>.</p>
</blockquote>
<p>Update per comments: on recent versions you should now use <code>-i '*.png'</code> syntax.</p>
