3

I am creating a video from 38,179 images. ffmpeg successfully creates a video but only includes the first 20,998 images. It does not include the last 17xxx images. I am running Windows 7 64-bit.

The files are all in the same directory and named 1000000.jpg - 1038179.jpg.

This is the command I used:

ffmpeg -r 16 -i 1%6d.jpg -r 16 video.mp4

How can I get it to include all the images?

This is the last screen of output:

frame=20998 fps=6.4 q=27.0 size=  478740kB time=00:19:23.66 bitrate=3370.2kbits/
frame=20998 fps=6.4 q=27.0 size=  478740kB time=00:19:23.66 bitrate=3370.2kbits/
frame=20998 fps=6.4 q=27.0 size=  478740kB time=00:19:23.66 bitrate=3370.2kbits/
frame=20998 fps=6.4 q=27.0 size=  478740kB time=00:19:23.66 bitrate=3370.2kbits/
frame=20998 fps=6.4 q=27.0 size=  478740kB time=00:19:23.66 bitrate=3370.2kbits/
frame=20998 fps=6.4 q=-1.0 Lsize=  480427kB time=00:19:26.44 bitrate=3374.1kbits
/s dup=0 drop=17182
video:480204kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.046423%

[libx264 @ 00000000041aa020] frame I:332   Avg QP:18.87  size:110978
[libx264 @ 00000000041aa020] frame P:10468 Avg QP:21.59  size: 32633
[libx264 @ 00000000041aa020] frame B:10198 Avg QP:23.35  size: 11108
[libx264 @ 00000000041aa020] consecutive B-frames: 22.7% 35.1%  7.9% 34.3%
[libx264 @ 00000000041aa020] mb I  I16..4: 13.2% 84.6%  2.2%
[libx264 @ 00000000041aa020] mb P  I16..4:  9.6% 30.7%  0.3%  P16..4: 30.1%  6.9%  3.0%  0.0%  0.0%    skip:19.4%
[libx264 @ 00000000041aa020] mb B  I16..4:  1.3%  4.4%  0.0%  B16..8: 33.4%  3.3%  0.4%  direct: 2.2%  skip:54.9%  L0:43.9% L1:51.4% BI: 4.8%
[libx264 @ 00000000041aa020] 8x8 transform intra:76.3% inter:90.0%
[libx264 @ 00000000041aa020] coded y,uvDC,uvAC intra: 46.6% 62.7% 10.4% inter: 12.3% 22.3% 0.5%
[libx264 @ 00000000041aa020] i16 v,h,dc,p: 42% 24%  9% 25%
[libx264 @ 00000000041aa020] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 31% 22% 33%  2%  2% 3%  2%  3%  2%
[libx264 @ 00000000041aa020] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30% 16% 11%  5% 10% 12%  7%  6%  3%
[libx264 @ 00000000041aa020] i8c dc,h,v,p: 46% 23% 27%  4%
[libx264 @ 00000000041aa020] Weighted P-Frames: Y:1.0% UV:0.5%
[libx264 @ 00000000041aa020] ref P L0: 65.7% 11.6% 17.0%  5.7%  0.0%
[libx264 @ 00000000041aa020] ref B L0: 86.8% 11.6%  1.6%
[libx264 @ 00000000041aa020] ref B L1: 96.3%  3.7%
[libx264 @ 00000000041aa020] kb/s:3372.17

EDIT Here is the beginning output:

ffmpeg -r 16 -i 1%6d.jpg -r 16 video1.mp4 -report
ffmpeg started on 2013-09-25 at 16:25:30
Report written to "ffmpeg-20130925-162530.log"
ffmpeg version N-49610-gc2dd5a1 Copyright (c) 2000-2013 the FFmpeg developers
  built on Feb  5 2013 13:26:02 with gcc 4.7.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libg
sm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --e
nable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --e
nable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-
libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable
-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil      52. 17.101 / 52. 17.101
  libavcodec     54. 91.100 / 54. 91.100
  libavformat    54. 61.104 / 54. 61.104
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 35.101 /  3. 35.101
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
Input #0, image2, from '1%6d.jpg':
  Duration: 00:28:02.80, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: mjpeg, yuvj420p, 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 2
5 tbr, 25 tbn, 25 tbc
[graph 0 input from stream 0:0 @ 0000000000312fc0] w:1920 h:1080 pixfmt:yuvj420p
 tb:1/16 fr:16/1 sar:1/1 sws_param:flags=2
[graph 0 input from stream 0:0 @ 0000000000312fc0] TB:0.062500 FRAME_RATE:16.000
000 SAMPLE_RATE:nan
[libx264 @ 000000000030de00] using SAR=1/1
[libx264 @ 000000000030de00] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShu
ffle SSE4.2 AVX
[libx264 @ 000000000030de00] profile High, level 4.0
[libx264 @ 000000000030de00] 264 - core 129 r2245 bc13772 - H.264/MPEG-4 AVC cod
ec - Copyleft 2003-2013 - http://www.videolan.org/x264.html - options: cabac=1 r
ef=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed
_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pski
p=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 deci
mate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_
adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=1
6 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.6
0 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'video1.mp4':
  Metadata:
    encoder         : Lavf54.61.104
    Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuvj420p, 1920x1080 [SAR
1:1 DAR 16:9], q=-1--1, 16384 tbn, 16 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg -> libx264)
Press [q] to stop, [?] for help
frame=   52 fps=8.7 q=-1.0 Lsize=    1152kB time=00:00:03.12 bitrate=3020.1kbits
/s
video:1151kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.114819%
[libx264 @ 000000000030de00] frame I:2     Avg QP:19.64  size: 93604
[libx264 @ 000000000030de00] frame P:21    Avg QP:21.21  size: 33175
[libx264 @ 000000000030de00] frame B:29    Avg QP:22.12  size: 10130
[libx264 @ 000000000030de00] consecutive B-frames: 25.0%  0.0%  5.8% 69.2%
[libx264 @ 000000000030de00] mb I  I16..4: 13.0% 80.1%  6.9%
[libx264 @ 000000000030de00] mb P  I16..4:  7.7% 31.7%  0.4%  P16..4: 32.1%  7.3
%  3.4%  0.0%  0.0%    skip:17.5%
[libx264 @ 000000000030de00] mb B  I16..4:  1.0%  3.7%  0.0%  B16..8: 33.8%  3.8
%  0.4%  direct: 3.3%  skip:54.0%  L0:46.1% L1:49.3% BI: 4.6%
[libx264 @ 000000000030de00] 8x8 transform intra:79.6% inter:91.8%
[libx264 @ 000000000030de00] coded y,uvDC,uvAC intra: 52.0% 73.1% 16.8% inter: 1
0.7% 24.2% 0.5%
[libx264 @ 000000000030de00] i16 v,h,dc,p: 40% 23%  9% 27%
[libx264 @ 000000000030de00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 34% 23% 35%  2%  1%
 2%  1%  2%  1%
[libx264 @ 000000000030de00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 40% 20%  9%  5%  6%
 6%  5%  5%  3%
[libx264 @ 000000000030de00] i8c dc,h,v,p: 42% 23% 31%  4%
[libx264 @ 000000000030de00] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 000000000030de00] ref P L0: 64.3% 10.7% 19.8%  5.3%
[libx264 @ 000000000030de00] ref B L0: 83.9% 13.2%  3.0%
[libx264 @ 000000000030de00] ref B L1: 92.4%  7.6%
[libx264 @ 000000000030de00] kb/s:2898.83
4
  • And I went ahead and uploaded the full report - depositfiles.com/files/gba3ec6ji
    – travisb
    Sep 25, 2013 at 20:44
  • I see that the input frame rate isn't correctly applied. It still shows as 25fps although you specified 16. Your input therefore reads 25 frames in a second, and this is why they are dropped to achieve the final output rate of 16. Can you please try the same thing with a more recent build of ffmpeg? For Linux there are several static builds here: ffmpeg.org/download.html – in general, what you're trying to do should work just fine and I've done it several times. Could be that you're just seeing a bug.
    – slhck
    Sep 28, 2013 at 18:59
  • slhck - I updated to the newest version. I don't think where it is showing 25fps is the problem. I tested it with two other sets of images and it showed 25fps but it did create a video of 16fps and included all the images. Say I have 10,000 images in a folder. In the case of the two other sets I just mentioned it includes images from the full range from 1.jpg to 10000.jpg. It might be dropping some, but it is using the full range. The problem with the one set of images that I started this thread about is that it will start at 1.jpg and stop around 6000.jpg. It never gets to the last images.
    – travisb
    Oct 1, 2013 at 10:28
  • @travisb I hate to "be that guy" but did you have any luck? Having similar issues with no concrete/viable workarounds.
    – Mitch Kent
    Feb 25, 2017 at 21:22

3 Answers 3

1

I had the same issue on Linux and Windows. For me the solution was observing that the conversion stopped on an image with 0 bytes. When I deleted that image, ffmpeg continued to process the rest of the images.

0

I had a similar problem. I don't know what is going on, but when I copied the last frame and re-named it as a higher number many times i got the video I wanted.

0

Try resizing the images, and use the "Without leading zeroes" scheme of renaming ('filename-%d.png') preferably. It worked in my case.

Alternatively, adjust the fps to a lower or even value, oddly it worked for me following these cases, but there is no evidence of bugs or known issues regarding these specific settings.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .