在浏览器中显示视频的任何方式都是安全的 [英] Is any way that is safe to display videos in a browser
问题描述
是否可以安全地在浏览器中显示视频,比如,他的安全事情之一,视频无法下载谢谢
Is any way that is safe to display videos in a browser, Like, one of his security things, the video cannot be downloaded thanks
推荐答案
我认为您的意思是您不想下载或复制您的视频?
I think you mean that you don't want your video to be downloaded or copied?
如果是这样,那么阻止人们下载视频或多或少是不可能的 - 即使从 YouTube 等大型提供商那里也有许多工具可供下载.
If so then it is more or less impossible to stop people downloading the video - there are many tools available to download even from big providers like YouTube.
所以最常用的方法是对视频进行加密,并使用 HTML5 的加密媒体扩展 (EME) 来处理安全播放 - 基本上支持视频的 DRM.
So the approach most take is to encrypt the video and use HTML5's Encrypted Media Extension (EME) to handle secure playback - basically support DRM on the video.
如果您只是想设置一个基本障碍来阻止临时用户复制视频,那么 MPEG DASHclearkey"加密或 HLS AES 加密可能足以满足您的需求 - 大多数大型内容所有者认为这些并不可靠,但可能简单使用就可以了.
If you just want to put a basic barrier to stop casual users copying the video then MPEG DASH 'clearkey' encryption or HLS AES encryption may be sufficient for your needs - these are not considered robust by most large content owners, but may be fine for simple use.
您可以使用 ffmpeg 和 openssl 来创建 AES 加密的 HLS 流 - ffmpeg 文档 (http://ffmpeg.org/ffmpeg-all.html#Options-34) 包含此示例脚本:
You can use ffmpeg and openssl to create an AES encrypted HLS stream - the ffmpeg documentation (http://ffmpeg.org/ffmpeg-all.html#Options-34) includes this example script:
#!/bin/sh
BASE_URL=${1:-'.'}
openssl rand 16 > file.key
echo $BASE_URL/file.key > file.keyinfo
echo file.key >> file.keyinfo
echo $(openssl rand -hex 16) >> file.keyinfo
ffmpeg -f lavfi -re -i testsrc -c:v h264 -hls_flags delete_segments
-hls_key_info_file file.keyinfo out.m3u8
您也可以使用 mp4Box (https://gpac.wp.imt.fr/mp4box/encryption/common-encryption/) 创建基本的 DASH 加密:
You can also use mp4Box (https://gpac.wp.imt.fr/mp4box/encryption/common-encryption/) to create basic clear DASH encryptions:
MP4Box -crypt drm_file.xml movie.mp4 -out movie_encrypted.mp4
MP4Box -crypt drm_file.xml movie.mp4 -out movie_encrypted.mp4
drm 信息包含在 drm_file.xml 中,并在上面的链接中进行了说明.
The drm info is included in the drm_file.xml and is explained at the link above.
这篇关于在浏览器中显示视频的任何方式都是安全的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!