[FFmpeg-user] concat & input trimming

Christian Johannesen chrisjohannesen at gmail.com
Wed Mar 30 00:22:46 CEST 2016


Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:

> Christian Johannesen <chrisjohannesen <at> gmail.com> writes:
>
> > I am attempting to use the concat filter along with input
> > trimming which i'm guessing might not be supported in this
> > combination.
>
> Can you confirm that seeking alone works in combination
> with the concat filter and that only the input option -t
> is not working as expected?
>
> Carl Eugen
>
>
I modified the command to remove the duration with -t. When the ffmpeg
command starts, I observed the command line process stalled on frame 0 for
almost 3 minutes. When the transcode completed, the output file was
assembled out of order. The last input is used first (-ss 00:24:25.089)
followed by the first input (-ss 00:00:10.052), then the second input (-ss
00:01:12.114), then third input (--ss 00:10:49.608) and then the fourth
input (-ss 00:16:57.767).

Chris

ffmpeg -i D:\stitchtest\full.mov -ss 00:00:10.052 -i D:\stitchtest\full.mov
-ss 00:01:12.114 -i D:\stitchtest\full.mov -ss 00:10:49.608 -i
D:\stitchtest\full.mov -ss 00:16:57.767 -i D:\stitchtest\full.mov -ss
00:24:25.089 -filter_complex
"[0:v:0][0:a:0][1:v:0][1:a:0][2:v:0][2:a:0][3:v:0][3:a:0][4:v:0][4:a:0]concat=n=5:v=1:a=1[v][a]"
-map "[v]" -map "[a]" -c:v libx264 -crf 19 -c:a aac -b:a 192k
D:\stitchtest\clip_and_concat_no_t.mp4
ffmpeg version N-79143-g8ff0f6a Copyright (c) 2000-2016 the FFmpeg
developers
  built with gcc 5.3.0 (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-libdcadec --enable-libfreetype
--enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug
--enable-libmfx --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus
--enable-librtmp --enable-libschroedinger --enable-libsnappy
--enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame
--enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis
--enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264
--enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg
--enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 19.100 / 55. 19.100
  libavcodec     57. 30.100 / 57. 30.100
  libavformat    57. 29.101 / 57. 29.101
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 40.102 /  6. 40.102
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\stitchtest\full.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 512
    compatible_brands: qt
    encoder         : Lavf57.29.100
  Duration: 00:25:49.30, start: 0.000000, bitrate: 82284 kb/s
    Stream #0:0(eng): Video: prores (apcs / 0x73637061),
yuv422p10le(bt709), 1920x1080, 79974 kb/s, 23.98 fps, 23.98 tbr, 24k tbn,
24k tbc (default)
    Metadata:
      handler_name    : DataHandler
      encoder         : Apple ProRes 422 LT
      timecode        : 00:00:00:00
    Stream #0:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz,
stereo, s32 (24 bit), 2304 kb/s (default)
    Metadata:
      handler_name    : DataHandler
    Stream #0:2(eng): Data: none (tmcd / 0x64636D74) (default)
    Metadata:
      handler_name    : DataHandler
      timecode        : 00:00:00:00
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\stitchtest\full.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 512
    compatible_brands: qt
    encoder         : Lavf57.29.100
  Duration: 00:25:49.30, start: 0.000000, bitrate: 82284 kb/s
    Stream #1:0(eng): Video: prores (apcs / 0x73637061),
yuv422p10le(bt709), 1920x1080, 79974 kb/s, 23.98 fps, 23.98 tbr, 24k tbn,
24k tbc (default)
    Metadata:
      handler_name    : DataHandler
      encoder         : Apple ProRes 422 LT
      timecode        : 00:00:00:00
    Stream #1:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz,
stereo, s32 (24 bit), 2304 kb/s (default)
    Metadata:
      handler_name    : DataHandler
    Stream #1:2(eng): Data: none (tmcd / 0x64636D74) (default)
    Metadata:
      handler_name    : DataHandler
      timecode        : 00:00:00:00
Input #2, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\stitchtest\full.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 512
    compatible_brands: qt
    encoder         : Lavf57.29.100
  Duration: 00:25:49.30, start: 0.000000, bitrate: 82284 kb/s
    Stream #2:0(eng): Video: prores (apcs / 0x73637061),
yuv422p10le(bt709), 1920x1080, 79974 kb/s, 23.98 fps, 23.98 tbr, 24k tbn,
24k tbc (default)
    Metadata:
      handler_name    : DataHandler
      encoder         : Apple ProRes 422 LT
      timecode        : 00:00:00:00
    Stream #2:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz,
stereo, s32 (24 bit), 2304 kb/s (default)
    Metadata:
      handler_name    : DataHandler
    Stream #2:2(eng): Data: none (tmcd / 0x64636D74) (default)
    Metadata:
      handler_name    : DataHandler
      timecode        : 00:00:00:00
Input #3, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\stitchtest\full.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 512
    compatible_brands: qt
    encoder         : Lavf57.29.100
  Duration: 00:25:49.30, start: 0.000000, bitrate: 82284 kb/s
    Stream #3:0(eng): Video: prores (apcs / 0x73637061),
yuv422p10le(bt709), 1920x1080, 79974 kb/s, 23.98 fps, 23.98 tbr, 24k tbn,
24k tbc (default)
    Metadata:
      handler_name    : DataHandler
      encoder         : Apple ProRes 422 LT
      timecode        : 00:00:00:00
    Stream #3:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz,
stereo, s32 (24 bit), 2304 kb/s (default)
    Metadata:
      handler_name    : DataHandler
    Stream #3:2(eng): Data: none (tmcd / 0x64636D74) (default)
    Metadata:
      handler_name    : DataHandler
      timecode        : 00:00:00:00
Input #4, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\stitchtest\full.mov':
  Metadata:
    major_brand     : qt
    minor_version   : 512
    compatible_brands: qt
    encoder         : Lavf57.29.100
  Duration: 00:25:49.30, start: 0.000000, bitrate: 82284 kb/s
    Stream #4:0(eng): Video: prores (apcs / 0x73637061),
yuv422p10le(bt709), 1920x1080, 79974 kb/s, 23.98 fps, 23.98 tbr, 24k tbn,
24k tbc (default)
    Metadata:
      handler_name    : DataHandler
      encoder         : Apple ProRes 422 LT
      timecode        : 00:00:00:00
    Stream #4:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz,
stereo, s32 (24 bit), 2304 kb/s (default)
    Metadata:
      handler_name    : DataHandler
    Stream #4:2(eng): Data: none (tmcd / 0x64636D74) (default)
    Metadata:
      handler_name    : DataHandler
      timecode        : 00:00:00:00
No pixel format specified, yuv422p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 00000020a3be0240] using cpu capabilities: MMX2 SSE2Fast SSSE3
SSE4.2 AVX
[libx264 @ 00000020a3be0240] profile High 4:2:2, level 4.0, 4:2:2 8-bit
[libx264 @ 00000020a3be0240] 264 - core 148 r2665 a01e339 - H.264/MPEG-4
AVC codec - Copyleft 2003-2016 - 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=34
lookahead_threads=5 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=23
scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=19.0
qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'D:\stitchtest\clip_and_concat_no_t.mp4':
  Metadata:
    major_brand     : qt
    minor_version   : 512
    compatible_brands: qt
    encoder         : Lavf57.29.101
    Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv422p,
1920x1080, q=-1--1, 23.98 fps, 24k tbn, 23.98 tbc (default)
    Metadata:
      encoder         : Lavc57.30.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream #0:1: Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz,
stereo, fltp, 192 kb/s (default)
    Metadata:
      encoder         : Lavc57.30.100 aac
Stream mapping:
  Stream #0:0 (prores) -> concat:in0:v0
  Stream #0:1 (pcm_s24le) -> concat:in0:a0
  Stream #1:0 (prores) -> concat:in1:v0
  Stream #1:1 (pcm_s24le) -> concat:in1:a0
  Stream #2:0 (prores) -> concat:in2:v0
  Stream #2:1 (pcm_s24le) -> concat:in2:a0
  Stream #3:0 (prores) -> concat:in3:v0
  Stream #3:1 (pcm_s24le) -> concat:in3:a0
  Stream #4:0 (prores) -> concat:in4:v0
  Stream #4:1 (pcm_s24le) -> concat:in4:a0
  concat:out:v0 -> Stream #0:0 (libx264)
  concat:out:a0 -> Stream #0:1 (aac)
Press [q] to stop, [?] for help
frame=108656 fps= 74 q=-1.0 Lsize= 1553771kB time=01:15:31.81
bitrate=2808.7kbits/s dup=5 drop=0 speed=3.09x
video:1449471kB audio:101253kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: 0.196503%
[libx264 @ 00000020a3be0240] frame I:1097  Avg QP:12.23  size:309218
[libx264 @ 00000020a3be0240] frame P:31077 Avg QP:15.10  size: 29532
[libx264 @ 00000020a3be0240] frame B:76482 Avg QP:19.10  size:  2972
[libx264 @ 00000020a3be0240] consecutive B-frames:  4.7%  3.7%  1.7% 89.9%
[libx264 @ 00000020a3be0240] mb I  I16..4: 18.3% 70.4% 11.3%
[libx264 @ 00000020a3be0240] mb P  I16..4:  0.8%  4.2%  0.7%  P16..4: 15.1%
 4.6%  4.0%  0.0%  0.0%    skip:70.7%
[libx264 @ 00000020a3be0240] mb B  I16..4:  0.1%  0.2%  0.0%  B16..8: 11.0%
 0.8%  0.2%  direct: 0.3%  skip:87.3%  L0:48.1% L1:48.2% BI: 3.8%
[libx264 @ 00000020a3be0240] 8x8 transform intra:71.4% inter:77.6%
[libx264 @ 00000020a3be0240] coded y,uvDC,uvAC intra: 75.2% 86.1% 60.4%
inter: 3.4% 5.7% 1.4%
[libx264 @ 00000020a3be0240] i16 v,h,dc,p: 39% 36% 11% 13%
[libx264 @ 00000020a3be0240] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 20% 45%  3%
 3%  3%  4%  3%  5%
[libx264 @ 00000020a3be0240] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 25% 18%  5%
 5%  5%  6%  4%  5%
[libx264 @ 00000020a3be0240] i8c dc,h,v,p: 54% 18% 22%  5%
[libx264 @ 00000020a3be0240] Weighted P-Frames: Y:0.3% UV:0.2%
[libx264 @ 00000020a3be0240] ref P L0: 58.0%  4.7% 19.4% 17.9%  0.1%
[libx264 @ 00000020a3be0240] ref B L0: 70.1% 23.4%  6.5%
[libx264 @ 00000020a3be0240] ref B L1: 84.0% 16.0%
[libx264 @ 00000020a3be0240] kb/s:2620.13
[aac @ 00000020a3be1580] Qavg: 7996.980


More information about the ffmpeg-user mailing list