问题描述
我想在HTML5视频(EME)中实施DRM。我知道它在现代浏览器中受到支持:我知道我可以使用的工具和服务:
我想提供这样的例子:
我必须使用服务,或者我可以实现客户端和服务器端服务器,在我自己的服务器端?如果我可以实现客户端和服务器端,我怎样才能做到这一点?
我在服务器端使用PHP(laravel)。
我希望能够在我的服务器上(通过任何工具)加密我的视频,并在浏览器想要播放它时阻止它解密如果你想支持主要的常用DRM,那么在这个时候Widevine,PlayReady或者FairPlay那么那么你需要一个多重DRM服务器或服务。
如果你只是想要基本的保护,你可以使用AES加密或者使用DASH。
$ b
这些并不安全,但有时足够满足某些需求。
您可以使用ffmpeg和openssl创建AES加密HLS流 - ffmpeg文档()包括这个e xample script:
$ b
#!/ 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()创建基本的清除DASH加密:
drm info包含在drm_file.xml中,并在上面的链接中解释。
I want to implement DRM in HTML5 video (EME). I know it is supported in modern browsers:
And I know there are tools and services that I can use:
- https://support.uplynk.com/tut_embedding_the_uplynk_player_3.html
- https://www.wowza.com/products/capabilities/streaming-content-security
- https://www.intertrust.com/products/drm-system/livestream/
- https://bitmovin.com/cenc-widevine-drm/
- https://www.html5rocks.com/en/tutorials/eme/basics/
I want to provide like this example:
- https://demo.castlabs.com/ (play big buck bunny smooth streaming : that can't be downloaded and the url is one-time usable)
Do I have to use a service or I can implement client-side and server-side both on my own server? If I can implement client-side and server-side both, how could I do that?
I use PHP (laravel) in server-side.
Update #1
I want to be able to encrypt my videos on my server (via any tool) and decrypt it when browser want to play it and prevent it to be downloaded by normal users.
If you want to support the major commonly used DRM's, at this time Widevine, PlayReady or FairPlay then you do need either a multi-DRM server or service.
If you just want basic protection the you could use AES encryption or clearly with DASH.
These are not as secure but are sometimes good enough for certain needs.
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
You can also use mp4Box (https://gpac.wp.imt.fr/mp4box/encryption/common-encryption/) to create basic clear DASH encryptions:
The drm info is included in the drm_file.xml and is explained at the link above.
这篇关于如何在HTML5中实现DRM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!