[FFmpeg-user] Concatenate diffetents video size in one output.mp4
Marcelo Laia
marcelolaia at gmail.com
Sat Sep 9 00:49:22 EEST 2017
On 08/09/17 at 08:49, Paul B Mahol wrote:
> On 9/8/17, Marcelo Laia <marcelolaia at gmail.com> wrote:
>
> This one should work from quick look.
marcelo at marcelo:~/Vídeos/Ceverja$ ffmpeg -i Parte_A1.mp4 -i Parte_B1.mp4
-filter_complex
"[0:v]scale=640:352:force_original_aspect_ratio=decrease,pad=640:352:(ow-iw)/2:(oh-ih)/2[v0];
[v0][0:a][1:v][1:a]concat=n=2:v=1:a=1[v][a]" -map "[v]" -map "[a]" -c:v libx264
-c:a aac -movflags +faststart output.mp4
ffmpeg version 3.3.3 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 7 (Debian 7.1.0-13)
(split)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Parte_A1.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.71.100
Duration: 00:00:10.03, start: 0.165985, bitrate: 9538 kb/s
Stream #0:0(und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661),
yuv420p, 352x640 [SAR 1:1 DAR 11:20], 9412 kb/s, 23.95 fps, 23.95 tbr, 23954
tbn, 47.91 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(unk): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo,
fltp, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'Parte_B1.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.71.100
Duration: 00:00:24.01, start: 0.165985, bitrate: 8940 kb/s
Stream #1:0(und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661),
yuv420p, 640x352 [SAR 1:1 DAR 20:11], 8808 kb/s, 23.95 fps, 23.95 tbr, 23954
tbn, 47.91 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #1:1(unk): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo,
fltp, 127 kb/s (default)
Metadata:
handler_name : SoundHandler
File 'output.mp4' already exists. Overwrite ? [y/N] y
Stream mapping:
Stream #0:0 (h264) -> scale
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
[Parsed_concat_2 @ 0x55e37b087000] Input link in1:v0 parameters (size 640x352,
SAR 1:1) do not match the corresponding output link in0:v0 parameters (640x352,
SAR 484:485)
[Parsed_concat_2 @ 0x55e37b087000] Failed to configure output pad on
Parsed_concat_2
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #1:0
Conversion failed!
marcelo at marcelo:~/Vídeos/Ceverja$
No output.mp4 is rendered.
>
> What you get instead?
>
marcelo at marcelo:~/Vídeos/Ceverja$ MP4Box -cat Parte_A1.mp4 -cat Parte_B1.mp4
-new output.mp4
Appending file Parte_A1.mp4
No suitable destination track found - creating new one (type vide)
No suitable destination track found - creating new one (type soun)
Appending file Parte_B1.mp4
Saving output.mp4: 0.500 secs Interleaving
marcelo at marcelo:~/Vídeos/Ceverja$
The output.mp4 is created, but the Parte_A1.mp4 is a statitc image. Only
Parte_B1.mp4 is a video (stream).
--
Marcelo
More information about the ffmpeg-user
mailing list