从 Linux 命令行为视频添加水印

发布于 2024-09-29 03:46:37 字数 90 浏览 0 评论 0原文

有谁知道如何使用简单的工具从 Linux 命令行为视频添加水印?

当前版本不支持 ffmpeg 中的水印,需要自定义编译。

最大限度。

does anyone know how to watermark video from the Linux command line using a simple tool?

Watermarking in ffmpeg isn't supported in the current version, and requires a custom compile.

Max.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

故乡的云 2024-10-06 03:46:37
ffmpeg -y -i 'inputFile.mpg' -vhook '/usr/lib/vhook/watermark.so -f /home/user/logo.gif'

记下“-vhook”参数; watermark.so 路径可能会有所不同。

ffmpeg -y -i 'inputFile.mpg' -vhook '/usr/lib/vhook/watermark.so -f /home/user/logo.gif'

Make note of the "-vhook" parameter; watermark.so path may vary.

时常饿 2024-10-06 03:46:37

另一种简单的方法是将 ffmpeg 更新到最新版本并添加 叠加层视频过滤器:

ffmpeg -y -i video.mp4 -i watermark.png -filter_complex "overlay=(main_w-overlay_w):(main_h-overlay_h)" watermark.mp4

这也为您提供了更多关于放置水印的位置的选项。例如,如果您想将水印放置在视频的中心,您可以使用:

-filter_complex "overlay=(main_w-overlay_w/2):(main_h-overlay_h/2)"

Another simple way to do this is updating ffmpeg to the newest version and adding the overlay video filter:

ffmpeg -y -i video.mp4 -i watermark.png -filter_complex "overlay=(main_w-overlay_w):(main_h-overlay_h)" watermark.mp4

This also gives you more options on where to place the watermark as well. For example, if you wanted to place the watermark in the center of the video you would use:

-filter_complex "overlay=(main_w-overlay_w/2):(main_h-overlay_h/2)"
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文