在视频FFmpeg上添加图像叠加

问题描述:

我有一个视频 test.mp4 和一个图像 test.png

I have a video, test.mp4, and an image, test.png.

test.png 是一个黑色图像,中心有一个透明的洞。

test.png is a black image with a transparent "hole" in the center.

我想使用FFmpeg:

I would like, using FFmpeg:


  • 显示 test.png 在视频中,所以我只能看到一个视频圈

  • 如果可能,要调整 test.png 的大小的视频,所以它涵盖了整个事情

  • To display test.png over the video so I can only see a circle of video
  • If possible, to resize test.png to the size of the video so it covers the whole thing

这是可能吗?

尝试这样:

ffmpeg -i test.mp4 -framerate 30000/1001 -loop 1 -i test.png -filter_complex "[1:v] fade=out:st=30:d=1:alpha=1 [ov]; [0:v][ov] overlay=10:10 [v]" -map "[v]" -map 0:a -c:v libx264 -c:a copy -shortest out.mp4