是否可以一次应用3个过滤器?
步骤1:
ffmpeg -i "input_01.mp4" -y -s 1280x720 -b 3000k -acodec copy "output_01.mp4"
第2步:
ffmpeg -i "bg.mp4" -i "output_01.mp4" -y -filter_complex "overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2:shortest=1[out]" -b 3000k -map [out] -map 1:a -c:a copy "output_02.mp4"
第3步:
ffmpeg -i "output_02.mp4" -i logo.png -y -filter_complex overlay="(main_w/2)-(overlay_w/2):(main_h/2)-(overlay_h)/2" -b 3000k -codec:a copy "output_03.mp4"
这是可能的还是我必须运行FFmpeg三次?
答案 0 :(得分:1)
是的,它们可以像这样组合起来
ffmpeg -i "bg.mp4" -i "input_01.mp4" -i logo.png -y -filter_complex "[1:v]scale=1280x720[1v];[0:v][1v]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2:shortest=1[01v];[01v][2:v]overlay="(main_w/2)-(overlay_w/2):(main_h/2)-(overlay_h)/2[out]" -b:v 3000k -map [out] -map 1:a -c:a copy "output_02.mp4"