Protect live streams using Widevine and FairPlay DRM encryption by uploading certificates, configuring KMS keys, and enabling encryption in transcoding templates.
DRM encryption is being phased out and no longer accepts new users. Existing users are unaffected. The retirement date will be announced separately.
Prerequisites
-
ApsaraVideo Live is activated with domain names added and associated. Get started with ApsaraVideo Live.
-
A KMS instance is purchased and enabled. Purchase and enable a KMS instance.
-
(iOS only) A FairPlay Streaming certificate is obtained. The certificate, private key, passphrase, and ASK are stored securely. Apply for a FairPlay Streaming certificate.
Background
DRM (Digital Rights Management) protects live streams with Widevine and FairPlay encryption. DRM encryption.
Limitations
|
Category |
Description |
|
Management method |
Console only. API configuration is not supported. |
|
Live center |
Supported live centers are listed in Service regions. |
|
Activation method |
If this is the first time you enable DRM for a domain name, submit a ticket to activate the feature. |
|
Player version |
Requires ApsaraVideo Player V5.3.4 or later. |
Console configuration
Upload a certificate, create and add a KMS key, and configure a transcoding template.
-
Upload Certificate
NoteApple requires a FairPlay Streaming certificate for FairPlay encryption. Apply for the certificate, then upload it here.
-
Log on to the ApsaraVideo Live console.
-
In the left-side navigation pane, choose Feature Management > DRM Management to go to the DRM Management page.
-
Click Certificates, and on the Certificates tab, click Upload Certificate to start the upload.
In the Upload Certificate dialog box, enter a Certificate Name (2–128 characters: letters, digits, underscores, hyphens), upload the certificate (.cer) and private key (.pem) files, enter the passphrase and ASK (both 1–32 characters: letters and digits), and click OK.
-
Click OK to complete the upload.
-
-
Create a key in the KMS console. Manage keys.
After you create the key, copy its value.
-
Add the key.
-
Return to the ApsaraVideo Live console.
-
In the left-side navigation pane, choose Feature Management > DRM Management to go to the DRM Management page.
-
Click the Keys tab, and then click the Edit icon.
The Key status defaults to Unconfigured. Create a key in KMS, then enter it here. Keys cannot be modified or deleted once added. To update a key, submit a ticket.
-
In the Enter Key dialog box, paste the key that you copied.
The live center region must match your KMS instance region. The key is permanent once entered.
-
Click OK.
-
-
Configure a transcoding template
-
Return to the ApsaraVideo Live console.
-
In the left-side navigation pane, choose Feature Management > Transcoding to go to the Transcoding page.
-
Select the streaming domain that you want to configure, and then click the Custom Transcoding tab.
-
Click Add to configure a Custom Transcoding template, and then turn on Video Encryption.
-
Configure custom transcoding covers other transcoding settings. The Video Encryption switch is in Advanced Settings. Enable it and click Add.
-
Enable the service
If this is the first time you enable DRM encryption for a domain name, submit a ticket to activate it.
Submit a separate ticket for each new DRM-enabled domain.
Obtain a DRM playback URL
A DRM playback URL uses the following format:
http://demo.aliyundoc.com/liveApp****/liveStream****?auth_key=12345****
-
Set Appname, Streamname, and groupid for your use case. Generate ingest and streaming URLs.
-
auth_keyis the authentication string. signed ingest and streaming URLs.
Obtain a playback URL using one of these methods:
-
Manually construct the URL based on the specified format.
-
Go to the URL Generators, select the relevant transcoding template group, and generate the playback URL. Generate ingest and streaming URLs.
-
Go to the Streams page to view the playback URL. Stream management.
Configure ApsaraVideo Player
DRM encryption requires ApsaraVideo Player.
-
FairPlay is supported on iOS and Widevine on Android. Minimum version: V5.3.4.
-
On Android, we recommend using a SurfaceView for playback to ensure correct playback of high-security content.
-
On iOS, call
setFairPlayCertIDon AliPlayerGlobalSettings once at global scope. Find the certificate ID in the ApsaraVideo Live console under .
High-security content does not support screen rotation, mirroring, or screenshots.
Related documentation