Overview¶
We discuss here how to use ClearKey encryption in GPAC.
We assume that you are familiar with encrypting ISOBMFF files with MP4Box. If not, please read the Encryption wiki first.
ClearKey is a simple key distribution system for MPEG-DASH using plain text key exchange over https.
For more info, check https://github.com/Dash-Industry-Forum/ClearKey-Content-Protection
Fetching of keys through ClearKey is supported in GPAC decryptor and does not need to be configured.
DRM config file¶
ClearKey can be used with any scheme types defined in CENC, and does not need any specific info (e.g. PSSH).
Using MP4Box¶
You first need to encrypt your source:
You can then dash your source(s). If all streams share the same ClearKey licence server URL, specify ckurl
option of dasher:
If each source has its own licence URL:
MP4Box -dash 1000 cypted.mp4:#CKUrl=https://ck.gpac.io/GetLicence cypted2.mp4:#CKUrl=https://ck.gpac.io/GetLicence2 -out dash/manifest.mpd
Using gpac for single-pass encrypt and dash¶
If all streams share the same ClearKey licence server URL, specify ckurl
option of dasher:
Note that we use double colon separator, as the ClearKey URL also uses colons which will break parameter inheritance. One way to avoid this is to use:
If streams have different ClearKey licence server URL (we assume a single DRM.xml is needed here), specify CKUrl
pid property on sources: