【问题标题】:ffmpeg: chain of multiple filter_complex, re-using intermediate output streamffmpeg:多个filter_complex的链,重用中间输出流
【发布时间】:2015-12-17 23:57:43
【问题描述】:

如何依次应用两个 filter_complex 命令?

首先,我想将视频与图像混合 然后我想获取该过滤器的输出并将其拆分为 4 个图块,如本文Stackoverflow 中所述。

我试过这个: (我的策略是从 filter_complex [int] 生成一个中间输出,我想重复使用该输出两次。

ffmpeg.exe 
-i videoIn.avi 
-i imageIn.avi 
-filter_complex "[1:0] setsar=sar=1 [1sared];[0:0][1sared]blend=all_mode='divide':repeatlast=1[int];
[int]crop=960:960:24:1055:[out1];
[int]crop=960:960:1056:1062:[out2]" 
-map [out1] out1.avi 
-map [out2] out2.avi

但是,我收到一个错误: filtergraph 描述中的流说明符 'int' [int]crop=960:960:24:1055[out1];[int]crop=960:960:1056:1062:[out2] 不匹配任何流

如果我只使用一个裁剪操作而不使用两个裁剪操作,则此代码有效 - 所以我猜测中间流 [int] 不能按照我尝试的方式重复使用?

如何为后续过滤器多次重复使用中间流?

【问题讨论】:

    标签: ffmpeg


    【解决方案1】:

    您必须使用split 过滤器来复制输入流。

    例子:

    [...] split [crop1][crop2];
    [crop1] crop=960:960:24:1055 [out1];
    [crop2] crop=960:960:1056:1062 [out2]
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-10-18
      • 1970-01-01
      • 2016-10-31
      • 2016-10-07
      • 2015-10-05
      • 1970-01-01
      • 2017-03-28
      • 2014-11-12
      相关资源
      最近更新 更多