Closed nonth closed 8 months ago
The module supports two flows for encryption in HLS -
vod_drm_enabled
is set to on
.In both flows, you can have an external server serve the key, using the vod_hls_encryption_key_uri
directive.
When using option 2, you would set vod_secret_key
to combine some secret string with the id of the video. The external server would share the same secret, and perform the same calculation (using md5 hash).
In DASH, only option 1 is supported, there is a sample PHP script (test/dash_clear_key.php) that shows how to build the encryption/license responses.
Regarding the question about the IV -
Unfortunately, these flows are quite rigid here... in our live packager (https://github.com/kaltura/media-framework/tree/master/nginx-pckg-module) I implemented it in a more flexible manner. There, you can, for example, configure explicitly whether you want to return the IV or not.
Hello @erankor
Thanks for clarifying. Just a few more questions:
pckg_m3u8_enc_output_iv
, similar to the nginx-pckg-module for option 1? I can work on that.If the Media Initialization Section declared by an EXT-X-MAP tag is
encrypted with a METHOD of AES-128, the IV attribute of the EXT-X-KEY
tag that applies to the EXT-X-MAP is REQUIRED.
@erankor I've submitted PR #1514 regarding this issue. Could you please review it?
Thanks.
I am currently able to set up the nginx-vod-module to use HLS ClearKey by configuring the vod_secret_key and vod_hls_encryption_method as aes-128. but in production I'll have separate key server to store key and iv to encryption video.
Now, my questions are:
vod_secret_key
,vod_encryption_iv_seed
, andvod_hls_container_format
are set tofmp4
.