简体   繁体   English

如何在 FFMPEG 的同一命令中使用 -filter_complex 和 -vf

[英]How to use -filter_complex and -vf in same command in FFMPEG

I edit the video with the command我用命令编辑视频

ffmpeg -i video.mp4 -y -vf eq=saturation={rand_saturation},fade=in:st=0:d={rand_fade},hflip,noise=alls={rand_noise}:allf=t -c:a copy output.mp4

then the resulting video然后生成的视频

ffmpeg -i output.mp4 -i logo.png -filter_complex "[0:v][1:v]overlay=x='if(lt(mod(t,10),5),1,W-w-10)':y='if(lt(mod(t,10),5),5,H-h-200)'" -c:a copy output_1.mp4

I tried to combine all this together so that I didn't have to spend time processing the video twice, but I couldn't do it because you can't use the -vf and -filter_complex commands together.我试图将所有这些结合在一起,这样我就不必花时间处理两次视频,但我做不到,因为你不能同时使用 -vf 和 -filter_complex 命令。 How can this problem be solved?如何解决这个问题?

在将结果用作叠加输入之前,首先应用视频特定过滤器。

ffmpeg -i video.mp4 -i logo.png -filter_complex "[0:v]eq=saturation={rand_saturation},fade=in:st=0:d={rand_fade},hflip,noise=alls={rand_noise}:allf=t[vid];[vid][1:v]overlay=x='if(lt(mod(t,10),5),1,Ww-10)':y='if(lt(mod(t,10),5),5,Hh-200)'" -c:a copy output_1.mp4

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM