带有动态水印的安全流媒体视频
有哪些可扩展且安全的方法可以向接收者提供流媒体视频,并将接收者的名字作为水印覆盖?
What are some scalable and secure ways to provide a streaming video to a recipient with their name overlayed as a watermark?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这里的一些评论非常好。使用 libavfilter 可能是一个很好的起点。对每一帧加水印将非常昂贵,因为它需要为每个观看者解码和重新编码整个视频。
我想扩展的一个想法是仅对视频的一部分添加水印。我假设您正在使用 h.264 视频,与旧的编解码器相比,它需要更多的 CPU 周期来解码和编码。我认为每个 cpu 核心你可以实时标记 1 或 2 个流。如果您可以将要求减少到 10 秒(满分 100 秒),那么您所说的是每个核心 10-20 秒,因此每台服务器大约 100 秒。这可能不是您正在寻找的性能。
我认为有些公司向电视运营商出售水印硬件,但我怀疑它比服务器机架便宜,而且灵活性也低得多。
Some of the comments here are very good. Using libavfilter is probably a good place to start. Watermarking every frame is going to be very expensive because it requires decoding and re-encoding the entire video for each viewer.
One idea I'd like to expand upon is watermarking only portions of the video. I will assume you're working with h.264 video, which requires far more CPU cycles to decode and encode than older codecs. I think per cpu core you could mark 1 or 2 stream in real time. If you can reduce your requirements to 10 seconds marked out of 100, then you're talking about 10-20 per core, so about 100 per server. It's probably not the performance you're looking for.
I think some companies sell watermarking hardware for TV operators, but I doubt it's any cheaper than a rack of servers and far less flexible.
我想你想使用 ffmpeg libavfilter 库。基本上它允许您将图像叠加在视频之上。有一个示例显示如何在输入的左下角插入透明的 PNG 徽标。您可以通过 C++ 或基于命令行的 shell 与该库进行交互。
在旧版本的 ffmpeg 中,您将需要使用名为 watermark.so 的扩展库,通常位于 /usr/lib/vhook/watermark.so
根据您的内容,您可能还需要考虑使用不可见的数字水印。它将数字序列嵌入到您的视频中,而视觉上无法察觉。即使有人删除了可见水印,不可见水印仍然存在。如果用户要重新分发您的视频,隐形水印将指示重新分发的来源。
当然,也有一些公司提供视频内容管理,但我感觉你想自己做这件事。实时进行水印将非常消耗资源,特别是当您扩大规模时。我想做某种类型的预测水印。
I think you want to use the ffmpeg libavfilter library. Basically it allows you to overlay an image on top of a video. There is an example showing how to insert a transparent PNG logo in the bottom left corner of the input. You can interface with the library from C++ or from a shell on a command line basis.
In older versions of ffmpeg you will need to use a extension library called watermark.so, often located in /usr/lib/vhook/watermark.so
Depending on what your content is, you may want to consider using invisible digital watermarking as well. It embeds a digital sequence into your video which is not visually detectable. Even if someone were to remove the visible watermark, the invisible watermark would still remain. If a user were to redistribute your video, invisible watermarking would indicate the source of the redistribution.
Of course there are also companies which provide video content management, but I get the sense you want to do this yourself. Doing the watermarking real time is going to be very resource intensive, especialy as you scale up. I would look to do some type of predicitive watermarking.