在视频FFmpeg上添加图像叠加 [英] Add image overlay on video FFmpeg

查看:708
本文介绍了在视频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

这篇关于在视频FFmpeg上添加图像叠加的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆