如何使用FFMPEG缩放水印?

发布于 2025-01-24 09:58:28 字数 292 浏览 3 评论 0原文

我正在使用FFMPEG更改视频的分辨率和类型(MP4),但我也想在它们上添加水印,但问题是我上传的每个视频中的水印大小都不同(在某些视频中,水印变小,在其他视频上变得更大)。

有没有办法为视频添加具有比例比例的水印,以便我没有不同的水印?

这是我的代码:

overlay_w):y =(main_h -h -overlay_h)

ffmpeg -i input_video.avi -i watermark.png -s 1280x720 -filter_complex覆盖= x = x =(main_w -

I am using ffmpeg to change the resolution and type(mp4) of my videos but I also want to add a watermark on them, but the problem is that the size of the watermark is different in every video I upload (on some videos the watermark becomes small and on other videos become bigger).

Is there a way to add a watermark with a proportional scale to the videos so I don't have different sizes of the watermark?

Here's my code:

ffmpeg -i input_video.avi -i watermark.png -s 1280x720 -filter_complex overlay=x=(main_w-overlay_w):y=(main_h-overlay_h) output_video.mp4

Thanks in advance :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文