ffmpeg配置复杂过滤器时出错 [英] ffmpeg Error configuring complex filters

查看:163
本文介绍了ffmpeg配置复杂过滤器时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ffmpeg命令有一些问题,也许有人可以指出正确的方向,我使用此链接来构建命令: SO问题

having some issues with an ffmpeg command, maybe someone can point me in the right direction, i used this link to build my command: 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\PhotosDrop\20180416215218.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\Processing\2018-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\PhotosDrop\20180416215218.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\Processing\2018-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\PhotosDrop\20180416215218.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\PhotosDrop\20180416215218.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\Processing\2018-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\PhotosDrop\20180416215218.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\PhotosDrop\20180416215218.mp4" -i "E:\Desktop\Videos\Processing\2018-05-15 14-01-16.mp4" -i "E:\Documents\Content Bar\Photo Booth\PhotosDrop\20180416215218.mp4" -i "E:\Desktop\Videos\Processing\2018-05-15 14-01-27.mp4" -i "E:\Documents\Content Bar\Photo Booth\PhotosDrop\20180416215218.mp4" -i "E:\Documents\Content Bar\Photo Booth\PhotosDrop\20180416215218.mp4" -i "E:\Desktop\Videos\Processing\2018-05-15 14-01-33.mp4" -i "E:\Documents\Content Bar\Photo Booth\PhotosDrop\20180416215218.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\Processing\2018-05-15 14-01-16OUT.mp4"

据我了解,这样做不是应该在乎视频大小吗?

From what I understood is it isn't supposed to care about the video sizes when doing it this way?

推荐答案

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

For the given set of inputs, you would use

 -i "E:\Documents\Content Bar\Photo Booth\PhotosDrop\20180416215218.mp4"
 -i "E:\Desktop\Videos\Processing\2018-05-15 14-01-16.mp4"
 -i "E:\Documents\Content Bar\Photo Booth\PhotosDrop\20180416215218.mp4"
 -i "E:\Desktop\Videos\Processing\2018-05-15 14-01-27.mp4"
 -i "E:\Documents\Content Bar\Photo Booth\PhotosDrop\20180416215218.mp4"
 -i "E:\Documents\Content Bar\Photo Booth\PhotosDrop\20180416215218.mp4"
 -i "E:\Desktop\Videos\Processing\2018-05-15 14-01-33.mp4"
 -i "E:\Documents\Content Bar\Photo Booth\PhotosDrop\20180416215218.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\Processing\2018-05-15 14-01-16OUT.mp4"

对于每个720p输入,将视频调整为800X600画布的大小,并将SAR设置为1.

For each of the 720p inputs, the video is resized to a 800X600 canvas and the SAR is set to 1.

(您不使用第8个输入).

(You don't make use of the 8th input).

这篇关于ffmpeg配置复杂过滤器时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆