[FFmpeg-user] Concat limited to certain file types?
Jan Ehrhardt
phpdev at ehrhardt.nl
Tue Oct 16 23:08:43 CEST 2012
Roger Pack in gmane.comp.video.ffmpeg.user (Tue, 16 Oct 2012 13:17:08 -0600):
>> Yes, I was also trying to add the scale filter to the complex_filter
>> definition, but did not succeed. Tried :; space and now also the , as
>> separator, but nothing seems to work. Maybe it is Windows specific
>> because the documentation uses single quotes, which do not work under
>> Windows either. Whoe knows what else does not work under Windows. I will
>> fire up my Ubuntu once again.
>
>What is a command line that failed?
For instance:
ffmpeg -i S1000001.MP4 -i S1000002.MP4 -filter_complex "[0:0] [0:1]
[1:0] [1:1] concat=n=2:v=1:a=1 [v] [a],scale=384:288"
-map [v] -map [a] -aspect 4:3 -vcodec libx264 -b:v 320k
-strict -2 -acodec aac -ab 96k -y out.mp4
I tried putting the ',scale=384:288' inside or outside the quotes,
at the beginning or at the end of the definition. The command
line above generates the output below.
If I leave it out and use -s 384x288 it transcodes fine. Output
further down below.
Jan
ffmpeg64.exe -i S1000001.MP4 -i S1000002.MP4 -filter_complex "[0:0] [0:1] [1:0] [1:1] concat=n=2:v=1:a=1 [v] [a],scale=384:288" -map [v] -map [a] -aspect 4:3 -vcodec libx264 -b:v 320k -strict -2 -acodec aac -ab 96k -y out.mp4
ffmpeg version 1.0 Copyright (c) 2000-2012 the FFmpeg developers
built on Oct 12 2012 05:31:57 with gcc 4.7.1 (GCC)
configuration: --prefix=/usr/local/x64 --enable-w32threads --enable-static --enable-libmp3lame --enable-nonfree --enable-libfaac --enable-gpl --enable-libx264 --enable-libvorbis --enable-libtheora --enable-libvpx --enable-zlib --enable-bzlib
--arch=x86_64 --cross-prefix=x86_64-w64-mingw32- --target-os=mingw32 --disable-shared --disable-doc --extra-cflags=-m64 --extra-ldflags='-m64 -L/usr/local/x64/lib'
libavutil 51. 73.101 / 51. 73.101
libavcodec 54. 59.100 / 54. 59.100
libavformat 54. 29.104 / 54. 29.104
libavdevice 54. 2.101 / 54. 2.101
libavfilter 3. 17.100 / 3. 17.100
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'S1000001.MP4':
Metadata:
major_brand : mp42
minor_version : 1
compatible_brands: mp42avc1
creation_time : 2012-09-19 13:25:59
Duration: 00:00:10.00, start: 0.000000, bitrate: 6841 kb/s
Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 6121 kb/s, 50 fps, 50 tbr, 60k tbn, 100 tbc
Metadata:
creation_time : 2012-09-19 13:25:59
Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 246 kb/s
Metadata:
creation_time : 2012-09-19 13:25:59
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'S1000002.MP4':
Metadata:
major_brand : mp42
minor_version : 1
compatible_brands: mp42avc1
creation_time : 2012-09-19 13:26:20
Duration: 00:00:05.00, start: 0.000000, bitrate: 7077 kb/s
Stream #1:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 6170 kb/s, 50 fps, 50 tbr, 60k tbn, 100 tbc
Metadata:
creation_time : 2012-09-19 13:26:20
Stream #1:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 237 kb/s
Metadata:
creation_time : 2012-09-19 13:26:20
Cannot find a matching stream for unlabeled input pad 0 on filter Parsed_scale_1
ffmpeg.exe -i S1000001.MP4 -i S1000002.MP4 -filter_complex "[0:0] [0:1] [1:0] [1:1] concat=n=2:v=1:a=1 [v] [a]" -map [v] -map [a] -s 384x288 -aspect 4:3 -vcodec libx264 -b:v 320k -strict -2 -acodec aac -ab 96k -y out.mp4
ffmpeg version 1.0 Copyright (c) 2000-2012 the FFmpeg developers
built on Oct 12 2012 05:31:57 with gcc 4.7.1 (GCC)
configuration: --prefix=/usr/local/x64 --enable-w32threads --enable-static --enable-libmp3lame --enable-nonfree --enable-libfaac --enable-gpl --enable-libx264 --enable-libvorbis --enable-libtheora --enable-libvpx --enable-zlib --enable-bzlib
--arch=x86_64 --cross-prefix=x86_64-w64-mingw32- --target-os=mingw32 --disable-shared --disable-doc --extra-cflags=-m64 --extra-ldflags='-m64 -L/usr/local/x64/lib'
libavutil 51. 73.101 / 51. 73.101
libavcodec 54. 59.100 / 54. 59.100
libavformat 54. 29.104 / 54. 29.104
libavdevice 54. 2.101 / 54. 2.101
libavfilter 3. 17.100 / 3. 17.100
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'S1000001.MP4':
Metadata:
major_brand : mp42
minor_version : 1
compatible_brands: mp42avc1
creation_time : 2012-09-19 13:25:59
Duration: 00:00:10.00, start: 0.000000, bitrate: 6841 kb/s
Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 6121 kb/s, 50 fps, 50 tbr, 60k tbn, 100 tbc
Metadata:
creation_time : 2012-09-19 13:25:59
Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 246 kb/s
Metadata:
creation_time : 2012-09-19 13:25:59
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'S1000002.MP4':
Metadata:
major_brand : mp42
minor_version : 1
compatible_brands: mp42avc1
creation_time : 2012-09-19 13:26:20
Duration: 00:00:05.00, start: 0.000000, bitrate: 7077 kb/s
Stream #1:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 6170 kb/s, 50 fps, 50 tbr, 60k tbn, 100 tbc
Metadata:
creation_time : 2012-09-19 13:26:20
Stream #1:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 237 kb/s
Metadata:
creation_time : 2012-09-19 13:26:20
[libx264 @ 000000000198f1e0] using SAR=1/1
[libx264 @ 000000000198f1e0] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
[libx264 @ 000000000198f1e0] profile High, level 3.0
[libx264 @ 000000000198f1e0] 264 - core 125 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - 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=6 lookahead_threads=1 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=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=320 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'out.mp4':
Metadata:
major_brand : mp42
minor_version : 1
compatible_brands: mp42avc1
encoder : Lavf54.29.104
Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 384x288 [SAR 1:1 DAR 4:3], q=-1--1, 320 kb/s, 50 tbn, 50 tbc
Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, flt, 96 kb/s
Stream mapping:
Stream #0:0 (h264) -> concat:in0:v0
Stream #0:1 (aac) -> concat:in0:a0
Stream #1:0 (h264) -> concat:in1:v0
Stream #1:1 (aac) -> concat:in1:a0
concat:out:v0 -> Stream #0:0 (libx264)
concat:out:a0 -> Stream #0:1 (aac)
Press [q] to stop, [?] for help
frame= 120 fps=0.0 q=33.0 size= 57kB time=00:00:01.94 bitrate= 239.9kbits/s
frame= 208 fps=202 q=32.0 size= 141kB time=00:00:03.94 bitrate= 292.6kbits/s
frame= 295 fps=189 q=32.0 size= 233kB time=00:00:05.44 bitrate= 350.9kbits/s
frame= 344 fps=166 q=33.0 size= 303kB time=00:00:06.44 bitrate= 385.5kbits/s
frame= 436 fps=168 q=34.0 size= 400kB time=00:00:08.44 bitrate= 387.4kbits/s
frame= 529 fps=170 q=34.0 size= 492kB time=00:00:10.44 bitrate= 385.7kbits/s
frame= 621 fps=172 q=32.0 size= 564kB time=00:00:12.45 bitrate= 371.3kbits/s
frame= 679 fps=164 q=32.0 size= 612kB time=00:00:13.45 bitrate= 372.5kbits/s
frame= 750 fps=160 q=-1.0 Lsize= 713kB time=00:00:14.99 bitrate= 389.5kbits/s
video:517kB audio:177kB subtitle:0 global headers:0kB muxing overhead 2.793642%
[libx264 @ 000000000198f1e0] frame I:3 Avg QP:29.18 size: 7331
[libx264 @ 000000000198f1e0] frame P:284 Avg QP:28.98 size: 1442
[libx264 @ 000000000198f1e0] frame B:463 Avg QP:33.21 size: 209
[libx264 @ 000000000198f1e0] consecutive B-frames: 0.9% 41.3% 26.8% 30.9%
[libx264 @ 000000000198f1e0] mb I I16..4: 22.8% 46.8% 30.5%
[libx264 @ 000000000198f1e0] mb P I16..4: 1.0% 0.7% 0.2% P16..4: 47.0% 12.0% 7.2% 0.0% 0.0% skip:31.9%
[libx264 @ 000000000198f1e0] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 39.0% 0.9% 0.1% direct: 0.2% skip:59.9% L0:39.9% L1:58.9% BI: 1.2%
[libx264 @ 000000000198f1e0] final ratefactor: 24.12
[libx264 @ 000000000198f1e0] 8x8 transform intra:40.5% inter:65.0%
[libx264 @ 000000000198f1e0] coded y,uvDC,uvAC intra: 40.4% 53.9% 23.1% inter: 7.0% 7.8% 0.3%
[libx264 @ 000000000198f1e0] i16 v,h,dc,p: 15% 25% 9% 51%
[libx264 @ 000000000198f1e0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 18% 27% 6% 6% 6% 7% 7% 6%
[libx264 @ 000000000198f1e0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 26% 16% 5% 7% 6% 9% 5% 9%
[libx264 @ 000000000198f1e0] i8c dc,h,v,p: 65% 17% 15% 4%
[libx264 @ 000000000198f1e0] Weighted P-Frames: Y:12.0% UV:0.0%
[libx264 @ 000000000198f1e0] ref P L0: 59.0% 17.1% 17.8% 5.7% 0.4%
[libx264 @ 000000000198f1e0] ref B L0: 84.3% 13.9% 1.8%
[libx264 @ 000000000198f1e0] ref B L1: 94.3% 5.7%
[libx264 @ 000000000198f1e0] kb/s:281.80
More information about the ffmpeg-user
mailing list