过滤器 Boxblur 具有未连接的输出

过滤器 Boxblur 具有未连接的输出

我正在尝试根据特定间隔模糊视频的特定部分,例如在 2-10 秒内模糊此部分,在 12-20 秒内模糊另一部分,但我无法实现这一点。这是我目前可以执行的命令

'ffmpeg -y -i with_out_sound.mp4 -filter_complex [0:v]crop=206:169:32:121,boxblur=10:enable='between(t,2,10)'[fg];[0:v]crop=206:169:62:100,boxblur=10:enable='between(t,12,20)'[fg1];[0:v[fg]overlay=32:121:enable='between(t,2,10)'[tmp];[0:v][tmp]overlay=62:100:enable='between(t,12,20)'[tmp2]-map [tmp2] with_blur.mp4'

但是使用上述命令我得到了错误过滤器 Boxblur 具有未连接的输出

答案1

使用

ffmpeg -y -i with_out_sound.mp4 -filter_complex \
"[0:v]crop=206:169:32:121,boxblur=10:enable='between(t,2,10)'[fg]; \
 [0:v]crop=206:169:62:100,boxblur=10:enable='between(t,12,20)'[fg1]; \
 [0:v[fg]overlay=32:121:enable='between(t,2,10)'[tmp]; \
 [tmp][fg1]overlay=62:100:enable='between(t,12,20)'[tmp2]"
-map [tmp2] with_blur.mp4

第一次覆盖的结果应该是第二次覆盖的背景。

发生错误是因为fg1没有在任何地方使用。所有过滤器输出应该 1) 映射以进行编码,2) 由另一个过滤器使用或 3) 发送到接收器。

相关内容