-
Notifications
You must be signed in to change notification settings - Fork 7
DRM and Encryption
Beyond ECCP (DASH-IF Enchanced ClearKey Content Protection), livesim2 can also encrypt content to based on licenses from commercial DRM systems such as Widevine and PlayReady, where the relevant information is provided by a CPIX document, together with a config file with license aquisition URLs.
As an example, a CPIX-based key and license system from EZDRM has been integrated in the public instance. It has been tested successfully with Widevine and dash.js, but it should also work with PlayReady.
The License Acquisition URL is provided in the MPD using the DASH-IF LaURL element for both ECCP and other DRM systems. For some clients, that URL may be fed into the player with some other means.
The configuration of external DRMs is done via an extra configuration file. Its path must be specified on the command line, or as an environment variable.
For example --drmcfgfile /etc/livesim2/drm_config.json
.
This file should specify a number of "packages", where each package should have the data:
- name - a name to be used in the livesim2 URL to choose DRM package
- desc - a description to be shown in the "urlgen" page
- cpixFile - a path to a CPIX file with DRM information
- licenseURLs - a list of URLs with DRM names as keys
An example configuration is shown below:
{
"version": "0.5",
"packages":
[
{
"name": "EZDRM-1-key-cbcs",
"desc": "EZDRM-provided DRM setup with one key CBCS encryption for livesim2 public test server",
"cpixFile": "cpix_1key_cbcs.xml",
"licenseURLs": {
"widevine": {
"laURL": "https://widevine-dash.ezdrm.com/proxy?pX=3B0669"
},
"playready": {
"laURL": "https://playready.ezdrm.com/cency/preauth.asp?pX=274FF4"
}
}
},
{
"name": "EZDRM-2-keys-cbcs",
"desc": "EZDRM-provided DRM setup with separate video and audio keys for livesim2 public test server",
"cpixFile": "cpix_2keys_cbcs.xml",
"licenseURLs": {
"widevine": {
"laURL": "https://widevine-dash.ezdrm.com/widevine-php/widevine-foreignkey.php?pX=3B0669"
},
"playready": {
"laURL": "https://playready.ezdrm.com/cency/preauth.aspx?pX=274FF4"
}
}
}
]
}
From the CPIX files, the following fields are extracted
- contentId
- explicitIV, kid, commonEncryptionScheme, key
- DRMSystem, systemID, PSSH
- SmoothStreamingProtectionHeaderData
- UsageRules and mapping to AUDIO or VIDEO if present
Currently, at most 2 keys are used, where one is for audio and one for video. One can also use the same key for both media types.
See livesim2/pkg/drm/testdata for examples, and the public configuration for what is used on the public server.
You can create a URL with encryption and/or DRM using the urlgen page page.
The options should looks something like