ffmpeg 配置复杂过滤器时出错

ffmpeg Error configuring complex filters

ffmpeg 命令有一些问题,也许有人可以指出正确的方向,我用这个 link 来构建我的命令: SO Question

我得到的输出:

ffmpeg version N-81646-gc19da0c Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.4.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --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-libopenh264 --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. 29.100 / 55. 29.100
  libavcodec     57. 55.101 / 57. 55.101
  libavformat    57. 48.103 / 57. 48.103
  libavdevice    57.  0.102 / 57.  0.102
  libavfilter     6. 62.100 /  6. 62.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'E:\Documents\Content Bar\Photo Booth\PhotosDrop180416215218.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.11.101
  Duration: 00:00:25.32, start: 0.000000, bitrate: 838 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 800x600 [SAR 1:1 DAR 4:3], 702 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'E:\Desktop\Videos\Processing18-05-15 14-01-16.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.84.100
  Duration: 00:00:04.20, start: 0.000000, bitrate: 4476 kb/s
    Stream #1:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 4339 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #1:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Input #2, mov,mp4,m4a,3gp,3g2,mj2, from 'E:\Documents\Content Bar\Photo Booth\PhotosDrop180416215218.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.11.101
  Duration: 00:00:25.32, start: 0.000000, bitrate: 838 kb/s
    Stream #2:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 800x600 [SAR 1:1 DAR 4:3], 702 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #2:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Input #3, mov,mp4,m4a,3gp,3g2,mj2, from 'E:\Desktop\Videos\Processing18-05-15 14-01-27.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.84.100
  Duration: 00:00:04.20, start: 0.000000, bitrate: 4877 kb/s
    Stream #3:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 4739 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #3:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Input #4, mov,mp4,m4a,3gp,3g2,mj2, from 'E:\Documents\Content Bar\Photo Booth\PhotosDrop180416215218.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.11.101
  Duration: 00:00:25.32, start: 0.000000, bitrate: 838 kb/s
    Stream #4:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 800x600 [SAR 1:1 DAR 4:3], 702 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #4:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Input #5, mov,mp4,m4a,3gp,3g2,mj2, from 'E:\Documents\Content Bar\Photo Booth\PhotosDrop180416215218.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.11.101
  Duration: 00:00:25.32, start: 0.000000, bitrate: 838 kb/s
    Stream #5:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 800x600 [SAR 1:1 DAR 4:3], 702 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #5:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Input #6, mov,mp4,m4a,3gp,3g2,mj2, from 'E:\Desktop\Videos\Processing18-05-15 14-01-33.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.84.100
  Duration: 00:00:04.20, start: 0.000000, bitrate: 4446 kb/s
    Stream #6:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 4309 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #6:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Input #7, mov,mp4,m4a,3gp,3g2,mj2, from 'E:\Documents\Content Bar\Photo Booth\PhotosDrop180416215218.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.11.101
  Duration: 00:00:25.32, start: 0.000000, bitrate: 838 kb/s
    Stream #7:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 800x600 [SAR 1:1 DAR 4:3], 702 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #7:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
[Parsed_concat_0 @ 07212280] Input link in1:v0 parameters (size 1280x720, SAR 0:1) do not match the corresponding output link in0:v0 parameters (800x600, SAR 1:1)
[Parsed_concat_0 @ 07212280] Failed to configure output pad on Parsed_concat_0
Error configuring complex filters.
Invalid argument

我使用的参数:

 -i "E:\Documents\Content Bar\Photo Booth\PhotosDrop180416215218.mp4" -i "E:\Desktop\Videos\Processing18-05-15 14-01-16.mp4" -i "E:\Documents\Content Bar\Photo Booth\PhotosDrop180416215218.mp4" -i "E:\Desktop\Videos\Processing18-05-15 14-01-27.mp4" -i "E:\Documents\Content Bar\Photo Booth\PhotosDrop180416215218.mp4" -i "E:\Documents\Content Bar\Photo Booth\PhotosDrop180416215218.mp4" -i "E:\Desktop\Videos\Processing18-05-15 14-01-33.mp4" -i "E:\Documents\Content Bar\Photo Booth\PhotosDrop180416215218.mp4" -filter_complex "[0:v] [0:a] [1:v] [1:a] [2:v] [2:a] [3:v] [3:a] [4:v] [4:a] [5:v] [5:a] [6:v] [6:a] concat=n=7:v=1:a=1 [v] [a]" -map "[v]" -map "[a]" "E:\Desktop\Videos\Processing18-05-15 14-01-16OUT.mp4"

据我了解,这样做时不应该关心视频大小吗?

对于给定的输入集,您将使用

 -i "E:\Documents\Content Bar\Photo Booth\PhotosDrop180416215218.mp4"
 -i "E:\Desktop\Videos\Processing18-05-15 14-01-16.mp4"
 -i "E:\Documents\Content Bar\Photo Booth\PhotosDrop180416215218.mp4"
 -i "E:\Desktop\Videos\Processing18-05-15 14-01-27.mp4"
 -i "E:\Documents\Content Bar\Photo Booth\PhotosDrop180416215218.mp4"
 -i "E:\Documents\Content Bar\Photo Booth\PhotosDrop180416215218.mp4"
 -i "E:\Desktop\Videos\Processing18-05-15 14-01-33.mp4"
 -i "E:\Documents\Content Bar\Photo Booth\PhotosDrop180416215218.mp4"
 -filter_complex "
    [1:v]scale=800:600:force_original_aspect_ratio=decrease,pad=800:600:(ow-iw)/2:(oh-ih)/2,setsar=1[1v];
    [3:v]scale=800:600:force_original_aspect_ratio=decrease,pad=800:600:(ow-iw)/2:(oh-ih)/2,setsar=1[3v];
    [6:v]scale=800:600:force_original_aspect_ratio=decrease,pad=800:600:(ow-iw)/2:(oh-ih)/2,setsar=1[6v];
    [0:v] [0:a] [1v] [1:a] [2:v] [2:a] [3v] [3:a] [4:v] [4:a] [5:v] [5:a] [6v] [6:a] concat=n=7:v=1:a=1 [v] [a]" -map "[v]" -map "[a]" "E:\Desktop\Videos\Processing18-05-15 14-01-16OUT.mp4"

对于每个 720p 输入,视频都调整为 800X600 canvas 并且 SAR 设置为 1。

(您没有使用第 8 个输入)。