FFmpeg - 无法将 YADIF 过滤器与 CONCAT 一起使用

FFmpeg - 无法将 YADIF 过滤器与 CONCAT 一起使用

我尝试在 MacOS 中使用 FFMPEG 对视频进行去隔行处理,同时将其与保险杠连接,但没有成功。有什么想法吗?

这是我正在使用的命令:

ffmpeg -i //volumes/DMR_30/BUMPERS/YUYU_BUMPER_5994_V2.mov -i //Volumes/DMR_38/SUMMERSIDE_38/SNOW/SNOW_SUBS_1080p_25PAL.mov\> -filter_complex  "[0:v:0] [0:a:0] [1:v:0] [1:a:0] concat=n=2:v=1:a=1 [v][0:0]yadif=0:-1:0; [a]" \[base] -map "[v]" -map "[a]" -pix_fmt yuv422p -r 25 -codec:v libx264 -x264opts "keyint=48:min-keyint=48: no-scenecut" -s 1920:1080 -aspect 16:9 -vb 40M -minrate 40M -maxrate 40M -bufsize 40M -acodec aac -strict -2 -ab 320k ~/desktop/CONCAT+TEST.mp4

这是我得到的输出:

ffmpeg version 3.2.1 Copyright (c) 2000-2016 the FFmpeg developers built with Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM
3.5svn) configuration: --prefix=/usr/local/Cellar/ffmpeg/3.2.1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libass --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --disable-lzma --enable-vda   libavutil      55. 34.100 / 55. 34.100   libavcodec     57. 64.101 / 57. 64.101   libavformat    57. 56.100 / 57. 56.100   libavdevice    57.  1.100 / 57.  1.100   libavfilter     6. 65.100 / 
6. 65.100   libavresample   3.  1.  0 /  3.  1.  0   libswscale      4.  2.100 /  4.  2.100   libswresample   2.  3.100 /  2.  3.100   libpostproc    54.  1.100 / 54.  1.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '//volumes/DMR_30/BUMPERS/YUYU_BUMPER_5994_V2.mov':   Metadata:
    major_brand     : qt  
    minor_version   : 537199360
    compatible_brands: qt  
    creation_time   : 2016-09-12T22:32:25.000000Z   Duration: 00:00:04.00, start: 0.000000, bitrate: 53342 kb/s
    Stream #0:0(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo, s16, 1536 kb/s (default)
    Metadata:
      creation_time   : 2016-09-12T22:32:25.000000Z
      handler_name    : Apple Alias Data Handler
    Stream #0:1(eng): Video: prores (apcn / 0x6E637061), yuv422p10le(progressive), 1920x1080, 51801 kb/s, SAR 1:1 DAR 16:9,
59.94 fps, 59.94 tbr, 5994 tbn, 5994 tbc (default)
    Metadata:
      creation_time   : 2016-09-14T19:22:03.000000Z
      handler_name    : Apple Alias Data Handler
      encoder         : Apple ProRes 422 Guessed Channel Layout for Input Stream #1.1 : stereo Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '//Volumes/DMR_38/SUMMERSIDE_38/SNOW/SNOW_SUBS_1080p_25PAL.mov':   Metadata:
    major_brand     : qt  
    minor_version   : 512
    compatible_brands: qt  
    creation_time   : 1970-01-01T00:00:00.000000Z
    encoder         : Lavf53.24.2   Duration: 01:19:05.13, start: 0.000000, bitrate: 105644 kb/s
    Stream #1:0(eng): Video: prores (apcn / 0x6E637061), yuv422p10le, 1920x1080, 104108 kb/s, SAR 159:160 DAR 53:30, 25 fps, 25 tbr, 25025 tbn, 25025 tbc (default)
    Metadata:
      creation_time   : 1970-01-01T00:00:00.000000Z
      handler_name    : DataHandler
      encoder         : qt_apcn
    Stream #1:1(eng): Audio: pcm_s16le (lpcm / 0x6D63706C), 48000 Hz, stereo, s16, 1536 kb/s (default)
    Metadata:
      creation_time   : 1970-01-01T00:00:00.000000Z
      handler_name    : DataHandler [AVFilterGraph @ 0x7f9afe5003c0] Unable to parse graph description substring: "yadif=0:-1:0; [a]"
Error initializing complex filters. Invalid argument

答案1

您的语法(至少粘贴时)是错误的。

ffmpeg -i //volumes/DMR_30/BUMPERS/YUYU_BUMPER_5994_V2.mov -i //Volumes/DMR_38/SUMMERSIDE_38/SNOW/SNOW_SUBS_1080p_25PAL.mov \
 -filter_complex  "[1]yadif=0:-1:0,setsar=1[mp]; \
                   [0:v][0:a][mp][1:a]concat=n=2:v=1:a=1[v][a]" \
 -map "[v]" -map "[a]" \
 -pix_fmt yuv422p -r 25 -codec:v libx264 -x264opts "keyint=48:min-keyint=48: no-scenecut" \
 -aspect 16:9 -vb 40M -minrate 40M -maxrate 40M -bufsize 40M \
 -acodec aac -strict -2 -ab 320k ~/desktop/CONCAT+TEST.mp4

相关内容