[FFmpeg-trac] #6959(ffmpeg:new): Concat images only makes 3 frames with -filter_complex
FFmpeg
trac at avcodec.org
Thu Jan 11 14:10:27 EET 2018
#6959: Concat images only makes 3 frames with -filter_complex
-------------------------------------+-------------------------------------
Reporter: mattaias | Type: defect
Status: new | Priority: normal
Component: ffmpeg | Version:
Keywords: concat | unspecified
framerange | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
When trying to concat images in the -filter_complex the final output
returns only 3 frames in the last build. In the older build 2.5.2 it is
even 2 frames. Is it possible this is hardcoded somewhere and ignoring the
concat=n=...?
The reproduce script looks big, but it is happening with any list of
random images we tried.
(ps: hope I'm submitting it correctly)
How to reproduce:
take any list of images and set them as inputs.
load them all in the filter_complex but make the width and height the same
as the largest resolutions of these images and also make them an even
number (and add panning).
Now concat all these images.
Script runs fine, but the result is not expected result.
The output mp4 is only 3 frames long on ffmpeg version
N-89773-g7fcbebbeaf; built with gcc 7.2.0 (or 2 frames on version 2.5.2;
but it should be 11 long in this case).
{{{
% ffmpeg -r 2 -i
"C:/WTD_Temp/VersionConcatTest/Images\bluebells_darker.jpg" -pix_fmt
yuvj422p -r 2 -i "C:/WTD_Temp/VersionConcatTest/Images\Chrysanthemum.jpg"
-pix_fmt yuvj422p -r 2 -i
"C:/WTD_Temp/VersionConcatTest/Images\Desert.jpg" -pix_fmt yuvj422p -r 2
-i "C:/WTD_Temp/VersionConcatTest/Images\dojocat.jpg" -pix_fmt yuvj422p -r
2 -i "C:/WTD_Temp/VersionConcatTest/Images\Hydrangeas.jpg" -pix_fmt
yuvj422p -r 2 -i "C:/WTD_Temp/VersionConcatTest/Images\Jellyfish.jpg"
-pix_fmt yuvj422p -r 2 -i "C:/WTD_Temp/VersionConcatTest/Images\Koala.jpg"
-pix_fmt yuvj422p -r 2 -i
"C:/WTD_Temp/VersionConcatTest/Images\Lighthouse.jpg" -pix_fmt yuvj422p -r
2 -i "C:/WTD_Temp/VersionConcatTest/Images\Penguins.jpg" -pix_fmt yuvj422p
-r 2 -i "C:/WTD_Temp/VersionConcatTest/Images\target.png" -pix_fmt
yuvj422p -r 2 -i "C:/WTD_Temp/VersionConcatTest/Images\Tulips.jpg"
-pix_fmt yuvj422p -filter_complex "[0:v:0] pad=1024:896:(ow-iw)/2:(oh-
ih)/2:color=black,setsar=1024/896 [temp0],[1:v:0] pad=1024:896:(ow-iw)/2
:(oh-ih)/2:color=black,setsar=1024/896 [temp1],[2:v:0] pad=1024:896:(ow-
iw)/2:(oh-ih)/2:color=black,setsar=1024/896 [temp2],[3:v:0] pad=1024:896
:(ow-iw)/2:(oh-ih)/2:color=black,setsar=1024/896 [temp3],[4:v:0]
pad=1024:896:(ow-iw)/2:(oh-ih)/2:color=black,setsar=1024/896
[temp4],[5:v:0] pad=1024:896:(ow-iw)/2:(oh-
ih)/2:color=black,setsar=1024/896 [temp5],[6:v:0] pad=1024:896:(ow-iw)/2
:(oh-ih)/2:color=black,setsar=1024/896 [temp6],[7:v:0] pad=1024:896:(ow-
iw)/2:(oh-ih)/2:color=black,setsar=1024/896 [temp7],[8:v:0] pad=1024:896
:(ow-iw)/2:(oh-ih)/2:color=black,setsar=1024/896 [temp8],[9:v:0]
pad=1024:896:(ow-iw)/2:(oh-ih)/2:color=black,setsar=1024/896
[temp9],[10:v:0] pad=1024:896:(ow-iw)/2:(oh-
ih)/2:color=black,setsar=1024/896 [temp10],[temp0] [temp1] [temp2] [temp3]
[temp4] [temp5] [temp6] [temp7] [temp8] [temp9] [temp10]
"concat=n=11:v=1:a=0:unsafe=1" [tempout],[tempout]
scale=trunc(iw/2)*2:trunc(ih/2)*2 [out]" -map [out] -pix_fmt yuv420p -y
C:/WTD_Temp/VersionConcatTest/target.mp4
ffmpeg version 2.5.2 Copyright (c) 2000-2014 the FFmpeg developers
built on Dec 30 2014 17:23:26 with gcc 4.9.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-iconv --enable-libass --enable-libbluray
--enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme
--enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
--enable-libopus --enable-librtmp --enable-libschroedinger --enable-
libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-
libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-
libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-
libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma
--enable-decklink --enable-zlib
libavutil 54. 15.100 / 54. 15.100
libavcodec 56. 13.100 / 56. 13.100
libavformat 56. 15.102 / 56. 15.102
libavdevice 56. 3.100 / 56. 3.100
libavfilter 5. 2.103 / 5. 2.103
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, image2, from
'C:/WTD_Temp/VersionConcatTest/Images\bluebells_darker.jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: 5357 kb/s
Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown),
384x288 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
Input #1, image2, from
'C:/WTD_Temp/VersionConcatTest/Images\Chrysanthemum.jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: 175878 kb/s
Stream #1:0: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown),
1024x768 [SAR 96:96 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
Input #2, image2, from 'C:/WTD_Temp/VersionConcatTest/Images\Desert.jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: 169188 kb/s
Stream #2:0: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown),
1024x768 [SAR 96:96 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
Input #3, image2, from 'C:/WTD_Temp/VersionConcatTest/Images\dojocat.jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: 10667 kb/s
Stream #3:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown),
895x895 [SAR 72:72 DAR 1:1], 25 tbr, 25 tbn, 25 tbc
Input #4, image2, from
'C:/WTD_Temp/VersionConcatTest/Images\Hydrangeas.jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: 119056 kb/s
Stream #4:0: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown),
1024x768 [SAR 96:96 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
Input #5, image2, from
'C:/WTD_Temp/VersionConcatTest/Images\Jellyfish.jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: 155140 kb/s
Stream #5:0: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown),
1024x768 [SAR 96:96 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
Input #6, image2, from 'C:/WTD_Temp/VersionConcatTest/Images\Koala.jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: 156166 kb/s
Stream #6:0: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown),
1024x768 [SAR 96:96 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
Input #7, image2, from
'C:/WTD_Temp/VersionConcatTest/Images\Lighthouse.jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: 112255 kb/s
Stream #7:0: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown),
1024x768 [SAR 96:96 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
Input #8, image2, from
'C:/WTD_Temp/VersionConcatTest/Images\Penguins.jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: 155567 kb/s
Stream #8:0: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown),
1024x768 [SAR 96:96 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
Input #9, png_pipe, from
'C:/WTD_Temp/VersionConcatTest/Images\target.png':
Duration: N/A, bitrate: N/A
Stream #9:0: Video: png, rgb24, 706x56, 25 tbr, 25 tbn, 25 tbc
Input #10, image2, from 'C:/WTD_Temp/VersionConcatTest/Images\Tulips.jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: 124177 kb/s
Stream #10:0: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown),
1024x768 [SAR 96:96 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
[swscaler @ 0000000004c080a0] deprecated pixel format used, make sure you
did set range correctly
[swscaler @ 0000000004c3ffe0] deprecated pixel format used, make sure you
did set range correctly
[swscaler @ 0000000004c23120] deprecated pixel format used, make sure you
did set range correctly
[swscaler @ 0000000005382f80] deprecated pixel format used, make sure you
did set range correctly
[swscaler @ 0000000004d8dfc0] deprecated pixel format used, make sure you
did set range correctly
[swscaler @ 0000000004d972a0] deprecated pixel format used, make sure you
did set range correctly
[swscaler @ 0000000004daff60] deprecated pixel format used, make sure you
did set range correctly
[swscaler @ 0000000004dba280] deprecated pixel format used, make sure you
did set range correctly
[swscaler @ 0000000004dced20] deprecated pixel format used, make sure you
did set range correctly
[swscaler @ 000000000577cfc0] deprecated pixel format used, make sure you
did set range correctly
[libx264 @ 00000000055ca9c0] using SAR=8/7
[libx264 @ 00000000055ca9c0] using cpu capabilities: MMX2 SSE2Fast SSSE3
SSE4.2
[libx264 @ 00000000055ca9c0] profile High, level 3.1
[libx264 @ 00000000055ca9c0] 264 - core 144 r2525 40bb568 - H.264/MPEG-4
AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html -
options: cabac=1 ref=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_pskip=1 chroma_qp_offset=-2 threads=24
lookahead_threads=4 sliced_threads=0 nr=0 decimate=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=2
scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0
qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'C:/WTD_Temp/VersionConcatTest/target.mp4':
Metadata:
encoder : Lavf56.15.102
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p,
1024x896 [SAR 8:7 DAR 64:49], q=-1--1, 2 fps, 16384 tbn, 2 tbc (default)
Metadata:
encoder : Lavc56.13.100 libx264
Stream mapping:
Stream #0:0 (mjpeg) -> pad
Stream #1:0 (mjpeg) -> pad
Stream #2:0 (mjpeg) -> pad
Stream #3:0 (mjpeg) -> pad
Stream #4:0 (mjpeg) -> pad
Stream #5:0 (mjpeg) -> pad
Stream #6:0 (mjpeg) -> pad
Stream #7:0 (mjpeg) -> pad
Stream #8:0 (mjpeg) -> pad
Stream #9:0 (png) -> pad
Stream #10:0 (mjpeg) -> pad
scale -> Stream #0:0 (libx264)
Press [q] to stop, [?] for help
frame= 2 fps=0.0 q=-1.0 Lsize= 168kB time=00:00:01.00
bitrate=1373.1kbits/s dup=0 drop=9
video:167kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.497090%
[libx264 @ 00000000055ca9c0] frame I:1 Avg QP: 5.71 size: 24912
[libx264 @ 00000000055ca9c0] frame P:1 Avg QP:19.02 size:145193
[libx264 @ 00000000055ca9c0] mb I I16..4: 87.9% 11.4% 0.7%
[libx264 @ 00000000055ca9c0] mb P I16..4: 1.7% 46.2% 37.8% P16..4:
0.0% 0.0% 0.0% 0.0% 0.0% skip:14.3%
[libx264 @ 00000000055ca9c0] 8x8 transform intra:31.0%
[libx264 @ 00000000055ca9c0] coded y,uvDC,uvAC intra: 50.5% 52.6% 52.5%
inter: 0.0% 0.0% 0.0%
[libx264 @ 00000000055ca9c0] i16 v,h,dc,p: 95% 1% 2% 2%
[libx264 @ 00000000055ca9c0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14% 13% 8%
10% 10% 11% 9% 12% 13%
[libx264 @ 00000000055ca9c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16% 13% 9%
10% 12% 11% 10% 10% 10%
[libx264 @ 00000000055ca9c0] i8c dc,h,v,p: 68% 10% 10% 13%
[libx264 @ 00000000055ca9c0] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 00000000055ca9c0] kb/s:1360.84
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/6959>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list