使用 FFMPEG 同时应用多个过滤器 [英] Applying multiple filters at once with FFMPEG
本文介绍了使用 FFMPEG 同时应用多个过滤器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要对视频应用淡入淡出和叠加过滤器.可以同时应用 2 个过滤器吗?
I have the need to apply fadein and overlay filters to a video. Is it possible to apply 2 filters at once?
我得到了:
ffmpeg -i input.mpg -vf "movie=watermark.png [logo]; [in][logo] overlay=W-w-10:H-h-10 [out]" output.mpg
我正在尝试添加 fade=in:0:20
,但是如果我添加一个新的 -vf
参数,它将覆盖前面的参数,如果我补充:
I'm trying to add fade=in:0:20
, but if I add a new -vf
parameter, it will overwrite the preceding one, and if I add:
-vf "fade=in:0:20; movie=......"
这行不通.
这是可能的还是我必须运行 FFmpeg 两次?
Is this possible or do I have to run FFmpeg twice?
推荐答案
好的,有人帮了我.
我不得不用逗号分隔过滤器:
I had to separate filters with commas:
ffmpeg -i input.mpg -vf "movie=watermark.png [logo]; [in][logo] overlay=W-w-10:H-h-10, fade=in:0:20 [out]" output.mpg
这将对水印和视频应用淡入淡出.
This will apply fadein to both the watermark and the video.
这篇关于使用 FFMPEG 同时应用多个过滤器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文