[FFmpeg-trac] #6959(undetermined:new): Concat images only makes 3 frames with -filter_complex
FFmpeg
trac at avcodec.org
Thu Jan 11 15:57:02 EET 2018
#6959: Concat images only makes 3 frames with -filter_complex
-------------------------------------+-------------------------------------
Reporter: mattaias | Owner:
Type: defect | Status: new
Priority: normal | Component:
Version: unspecified | undetermined
Keywords: concat | Resolution:
Blocking: | Blocked By:
Analyzed by developer: 0 | Reproduced by developer: 0
-------------------------------------+-------------------------------------
Comment (by mattaias):
Indeed, setpts with a value 1 makes the final movie with all the wanted
images (even more, but that won't be a real problem I hope) Just for the
record: on version 2.5.2 it gives exactly 11 frames, on the latest build
there is an extra frame at the start (but that's not a big issue).
The idea of this script is to make a kind of diapresentation at 1 (or 0.5)
fps for checking all images of one item in one movie; where the director
can go to the next frame to see the next image and where he is able to put
comments on the images... (for use on shotgun.com)
Here is the final result of the script, but it seems it gives a satisfying
result now.
Thank you for the help and good luck!
{{{
"C:\Users\mclaeys\Downloads\ffmpeg-20180111-7fcbebb-
win64-static\bin\ffmpeg.exe" -r 1 -i
"C:/WTD_Temp/VersionConcatTest/Images\target.png" -pix_fmt yuvj422p -r 1
-i "C:/WTD_Temp/VersionConcatTest/Images\dojocat.jpg" -pix_fmt yuvj422p -r
1 -i "C:/WTD_Temp/VersionConcatTest/Images\bluebells_darker.jpg" -pix_fmt
yuvj422p -r 1 -i "C:/WTD_Temp/VersionConcatTest/Images\Tulips.jpg"
-pix_fmt yuvj422p -r 1 -i
"C:/WTD_Temp/VersionConcatTest/Images\Penguins.jpg" -pix_fmt yuvj422p -r 1
-i "C:/WTD_Temp/VersionConcatTest/Images\Lighthouse.jpg" -pix_fmt yuvj422p
-r 1 -i "C:/WTD_Temp/VersionConcatTest/Images\Koala.jpg" -pix_fmt yuvj422p
-r 1 -i "C:/WTD_Temp/VersionConcatTest/Images\Jellyfish.jpg" -pix_fmt
yuvj422p -r 1 -i "C:/WTD_Temp/VersionConcatTest/Images\Hydrangeas.jpg"
-pix_fmt yuvj422p -r 1 -i
"C:/WTD_Temp/VersionConcatTest/Images\Desert.jpg" -pix_fmt yuvj422p -r 1
-i "C:/WTD_Temp/VersionConcatTest/Images\Chrysanthemum.jpg" -pix_fmt
yuvj422p -filter_complex "[0:v:0] setpts=1,pad=1024:896:(ow-iw)/2:(oh-
ih)/2:color=black,setsar=1024/896 [temp0],[1:v:0] setpts=1,pad=1024:896
:(ow-iw)/2:(oh-ih)/2:color=black,setsar=1024/896 [temp1],[2:v:0]
setpts=1,pad=1024:896:(ow-iw)/2:(oh-ih)/2:color=black,setsar=1024/896
[temp2],[3:v:0] setpts=1,pad=1024:896:(ow-iw)/2:(oh-
ih)/2:color=black,setsar=1024/896 [temp3],[4:v:0] setpts=1,pad=1024:896
:(ow-iw)/2:(oh-ih)/2:color=black,setsar=1024/896 [temp4],[5:v:0]
setpts=1,pad=1024:896:(ow-iw)/2:(oh-ih)/2:color=black,setsar=1024/896
[temp5],[6:v:0] setpts=1,pad=1024:896:(ow-iw)/2:(oh-
ih)/2:color=black,setsar=1024/896 [temp6],[7:v:0] setpts=1,pad=1024:896
:(ow-iw)/2:(oh-ih)/2:color=black,setsar=1024/896 [temp7],[8:v:0]
setpts=1,pad=1024:896:(ow-iw)/2:(oh-ih)/2:color=black,setsar=1024/896
[temp8],[9:v:0] setpts=1,pad=1024:896:(ow-iw)/2:(oh-
ih)/2:color=black,setsar=1024/896 [temp9],[10:v:0] setpts=1,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 N-89773-g7fcbebbeaf Copyright (c) 2000-2018 the FFmpeg
developers
built with gcc 7.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-
bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass
--enable-libblur
ay --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-
libshine --enab
le-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame
--enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264
--enable-libx265 --en
able-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp
--enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-
libmysofa --enabl
e-libspeex --enable-amf --enable-cuda --enable-cuvid --enable-d3d11va
--enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
libavutil 56. 7.100 / 56. 7.100
libavcodec 58. 9.100 / 58. 9.100
libavformat 58. 3.100 / 58. 3.100
libavdevice 58. 0.100 / 58. 0.100
libavfilter 7. 11.101 / 7. 11.101
libswscale 5. 0.101 / 5. 0.101
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100
Input #0, png_pipe, from
'C:/WTD_Temp/VersionConcatTest/Images\target.png':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: png, rgb24(pc), 706x56, 25 tbr, 25 tbn, 25 tbc
Input #1, image2, from 'C:/WTD_Temp/VersionConcatTest/Images\dojocat.jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: 10667 kb/s
Stream #1:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown),
895x895 [SAR 72:72 DAR 1:1], 25 tbr, 25 tbn, 25 tbc
Input #2, image2, from
'C:/WTD_Temp/VersionConcatTest/Images\bluebells_darker.jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: 5357 kb/s
Stream #2:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown),
384x288 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
Input #3, image2, from 'C:/WTD_Temp/VersionConcatTest/Images\Tulips.jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: 124177 kb/s
Stream #3:0: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown),
1024x768 [SAR 96:96 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
Input #4, image2, from
'C:/WTD_Temp/VersionConcatTest/Images\Penguins.jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: 155567 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\Lighthouse.jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: 112255 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\Jellyfish.jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: 155140 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\Hydrangeas.jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: 119056 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, image2, from 'C:/WTD_Temp/VersionConcatTest/Images\Desert.jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: 169188 kb/s
Stream #9:0: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown),
1024x768 [SAR 96:96 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
Input #10, image2, from
'C:/WTD_Temp/VersionConcatTest/Images\Chrysanthemum.jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: 175878 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
Stream mapping:
Stream #0:0 (png) -> setpts
Stream #1:0 (mjpeg) -> setpts
Stream #2:0 (mjpeg) -> setpts
Stream #3:0 (mjpeg) -> setpts
Stream #4:0 (mjpeg) -> setpts
Stream #5:0 (mjpeg) -> setpts
Stream #6:0 (mjpeg) -> setpts
Stream #7:0 (mjpeg) -> setpts
Stream #8:0 (mjpeg) -> setpts
Stream #9:0 (mjpeg) -> setpts
Stream #10:0 (mjpeg) -> setpts
scale -> Stream #0:0 (libx264)
Press [q] to stop, [?] for help
[swscaler @ 0000000002c6af00] deprecated pixel format used, make sure you
did set range correctly
[swscaler @ 0000000002c7e9c0] deprecated pixel format used, make sure you
did set range correctly
[swscaler @ 0000000002963c00] deprecated pixel format used, make sure you
did set range correctly
[swscaler @ 0000000002994140] deprecated pixel format used, make sure you
did set range correctly
[swscaler @ 00000000029bf640] deprecated pixel format used, make sure you
did set range correctly
[swscaler @ 0000000002cd7f40] deprecated pixel format used, make sure you
did set range correctly
[swscaler @ 0000000002ce4a80] deprecated pixel format used, make sure you
did set range correctly
[swscaler @ 0000000002a600c0] deprecated pixel format used, make sure you
did set range correctly
[swscaler @ 0000000002a7cc00] deprecated pixel format used, make sure you
did set range correctly
[swscaler @ 0000000002ac9780] deprecated pixel format used, make sure you
did set range correctly
[libx264 @ 0000000002943500] using SAR=8/7
[libx264 @ 0000000002943500] using cpu capabilities: MMX2 SSE2Fast SSSE3
SSE4.2
[libx264 @ 0000000002943500] profile High, level 3.1
[libx264 @ 0000000002943500] 264 - core 152 r2851 ba24899 - H.264/MPEG-4
AVC codec - Copyleft 2003-2017 - 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=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=1 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 'C:/WTD_Temp/VersionConcatTest/target.mp4':
Metadata:
encoder : Lavf58.3.100
Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p,
1024x896 [SAR 8:7 DAR 64:49], q=-1--1, 1 fps, 16384 tbn, 1 tbc (default)
Metadata:
encoder : Lavc58.9.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame= 12 fps=0.0 q=-1.0 Lsize= 1465kB time=00:00:09.00
bitrate=1333.7kbits/s dup=1 drop=0 speed=9.56x
video:1464kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.061886%
[libx264 @ 0000000002943500] frame I:1 Avg QP: 1.75 size: 7406
[libx264 @ 0000000002943500] frame P:11 Avg QP:12.90 size:135585
[libx264 @ 0000000002943500] mb I I16..4: 95.8% 0.9% 3.3%
[libx264 @ 0000000002943500] mb P I16..4: 16.0% 45.0% 20.4% P16..4:
0.4% 0.0% 0.0% 0.0% 0.0% skip:18.3%
[libx264 @ 0000000002943500] 8x8 transform intra:49.9% inter:55.6%
[libx264 @ 0000000002943500] coded y,uvDC,uvAC intra: 70.7% 70.1% 66.6%
inter: 0.1% 1.2% 1.2%
[libx264 @ 0000000002943500] i16 v,h,dc,p: 86% 7% 3% 5%
[libx264 @ 0000000002943500] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 13% 17% 23%
6% 7% 8% 8% 7% 11%
[libx264 @ 0000000002943500] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14% 17% 11%
8% 10% 10% 10% 8% 11%
[libx264 @ 0000000002943500] i8c dc,h,v,p: 58% 20% 11% 11%
[libx264 @ 0000000002943500] Weighted P-Frames: Y:9.1% UV:0.0%
[libx264 @ 0000000002943500] ref P L0: 28.4% 1.2% 42.9% 27.5%
[libx264 @ 0000000002943500] kb/s:999.23
}}}
Sincerely,
Mathias
--
Ticket URL: <https://trac.ffmpeg.org/ticket/6959#comment:4>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list