<p>Under Linux I use such command:</p>

<pre><code>ffmpeg -f image2 -pattern_type glob -framerate 30 -i *.jpg output.mp4
</code></pre>

<p>Of course you should add encoder options etc. Or you can add leading 0's (zeros) to filenames, eg.: a000123.jpg instead of a123.jpg. Then <code>-i a%06d.jpg</code> should work.</p>

CC BY-SA 4.0
2019-04-25T13:55:11.877Z
Thank you so much, I'll try this some time later and I'll get back to you
user2824371
CC BY-SA 4.0
2019-04-25T08:41:21.840Z
2019-04-25T08:41:21.840Z
stalker
<p>I'd like to turn a sequence of images into a video using FFMPEG. They are numbered but with different "digits". Eg:</p>

<pre><code>a0001.jpg

a0002.jpg

a0003.jpg

.

.

.

a654321.jpg

a654322.jpg

a654323.jpg
</code></pre>

<p>The first part consists of 4 digits but due to a very large number of images (more than a million). The number of digits can be up to 6.</p>

<p>after reading this <a href="https://en.wikibooks.org/wiki/FFMPEG_An_Intermediate_Guide/image_sequence" rel="nofollow noreferrer">wiki article</a>, the following code didn't work:</p>

<blockquote>
  <p>ffmpeg -framerate 24 -i a%d.jpg video.webm</p>
</blockquote>

<p>Error msg: </p>

<blockquote>
  <p>Could find no file with path 'a%d.jpg' and index in the range 0-4
  a%d.jpg: No such file or directory</p>
</blockquote>

<p>Version:</p>

<pre><code>ffmpeg version N-92899-g1dcb5b7dca Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8.2.1 (GCC) 20181201
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 25.100 / 56. 25.100
  libavcodec     58. 43.100 / 58. 43.100
  libavformat    58. 25.100 / 58. 25.100
  libavdevice    58.  6.101 / 58.  6.101
  libavfilter     7. 46.101 /  7. 46.101
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100
</code></pre>

<p><strong>Windows 10</strong></p>

<ffmpeg>
How to convert a sequence of images to a video with different number of digits in the names?
user2824371
# How to convert a sequence of images to a video with different number of digits in the names?

(Asked by: username_0 on 2019-04-24)

I'd like to turn a sequence of images into a video using FFMPEG. They are numbered but with different "digits". Eg:
a0001.jpg

a0002.jpg

a0003.jpg

.

.

.

a654321.jpg

a654322.jpg

a654323.jpg

The first part consists of 4 digits but due to a very large number of images (more than a million). The number of digits can be up to 6.
after reading this wiki article, the following code didn't work:

ffmpeg -framerate 24 -i a%d.jpg video.webm

Error msg: 

Could find no file with path 'a%d.jpg' and index in the range 0-4
  a%d.jpg: No such file or directory

Version:
ffmpeg version N-92899-g1dcb5b7dca Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8.2.1 (GCC) 20181201
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 25.100 / 56. 25.100
  libavcodec     58. 43.100 / 58. 43.100
  libavformat    58. 25.100 / 58. 25.100
  libavdevice    58.  6.101 / 58.  6.101
  libavfilter     7. 46.101 /  7. 46.101
  libswscale      5.  4.100 /  5.  4.100
  libswresample   3.  4.100 /  3.  4.100
  libpostproc    55.  4.100 / 55.  4.100

Windows 10

**Tags:** ffmpeg


---

## 1 answers

### Answer by username_1 on 2019-04-25. Score: 1

Under Linux I use such command:
ffmpeg -f image2 -pattern_type glob -framerate 30 -i *.jpg output.mp4

Of course you should add encoder options etc. Or you can add leading 0's (zeros) to filenames, eg.: a000123.jpg instead of a123.jpg. Then -i a%06d.jpg should work.

> **Comments:**
> **username_0**: Thank you so much, I'll try this some time later and I'll get back to you  

---

