This article describes how to set up and use Wowza DRM with EZDRM PlayReady.
Download and install the EZDRM plugin for Wowza media server
Create and configure an EZDRM DRM key file Configure the EZDRM module in Wowza Streaming Engine Manager
Add and configure the EZDRM module
(Optional) XML configuration of the EZDRM module
Download and install the EZDRM plugin for Wowza media server
To use EZDRM with Wowza media servers, you must first download the EZDRM Wowza Module plugin and install it on your Wowza media server.
- Download the EZDRM Wowza Module Java DRM Plugin.
- Copy and paste the downloaded EzdrmWowzaModule.jar file into [wowza-install-dir]/lib.
- Restart the media server for your change to take effect.
Create and configure an EZDRM DRM key file
For each stream served by the Wowza media server software, the EZDRM Wowza plugin calls the DRM key(s) that correspond to the ContentID. Before you want to stream, create DRM key set (ContentID) entries in the EZDRM DRM-as-a-Service Kay API for each stream. This is well suited to adaptive bitrate streaming.
Generate an EZDRM DRM key
There are two ways to create DRM key files: the EZDRM Web Service or a scripted curl web service call. In both cases you must provide the following information:
|U||Enter your EZDRM username.|
|P||Enter your EZDRM password.|
|C||(Optional) Enter a ContentID if you want to encrypt a stream with an existing ContentID. All streams that use the same ContentID will share one license.|
Request a DRM key with the EZDRM Web Service
- Open the EZDRM web service in a browser.
- Enter your EZDRM username (U), password (P), and (optional) ContentID (C). information, and then click Invoke.
Request a DRM key with a curl script
Run the following curl script, or another scripted web service call, to retrieve the DRM values from the EZDRM web service where [ezdrm-account-username] is replaced with your EZDRM username and [ezdrm-account-password] is replaced with the password associated with your EZDRM username. You can also specify the ContentID for the value of C; if you don't specify a ContentID, you must use double quotation marks ("") to pass a blank value, as shown in the example script below.
curl -v ‘http://wvm.ezdrm.com/ws/LicenseInfo.asmx/GenerateKeys?U=[ezdrm-account-username]&P=[ezdrm-account-password]&C= “”’
The following values in the EZDRM response must be used to create the key file and configure Wowza media server to use the EZDRM module: Widevine/ContentID, PlayReady/Key, PlayReady/KeyIDGUID, PlayReady/LAURL, and PlayReady/Checksum.
Create an EZDRM PlayReady key file
Key files are text files with a .key file extension stored in the Wowza Streaming Engine [install-dir]/keys directory. Key files must be named in the format of [streamName].key. For example, to protect the stream myStream.mp4, the key file would be [install-dir]/keys/myStream.mp4.key.
Each key file must contain the following:
smoothstreaming-playready-key-id: [KeyIDGuid] smoothstreaming-playready-license-url: [LAURL] smoothstreaming-playready-content-key: [Key] smoothstreaming-playready-checksum: [CheckSum] smoothstreaming-playready-algorithm: AESCTR
- [KeyIDGUID] is the media key ID (KeyIDGUID) value in the <PlayReady> section of the EZDRM response.
- [Key] is the base-64 encoded content encryption Key value in the <PlayReady> section of the EZDRM response.
- [LAURL] is the PlayReady license URL for encryption (LAURL) value in the <PlayReady> section of the EZDRM response.
- [Checksum] is the Checksum value in the <PlayReady> section of the EZDRM response. This is a special checksum of the key ID and is required to authenticate the player.
Use Wowza Streaming Engine Manager to configure the EZDRM module
Create and configure an application to ingest the source stream
Create a live or VOD application in Wowza Streaming Engine to ingest the source video and use the EZDRM module to protect the content.
- Use one of the following Tutorials to create an application:
- To set up VOD streaming, see How to set up video on demand streaming.
- To set up live streaming, see the tutorial below that applies to your specific encoder:
- To set up DVR streaming, follow the live streaming instructions and then see Wowza nDVR overview.
- Use the Test Players in Wowza Streaming Engine or the Wowza Test Players website to verify that you can play an unencrypted stream in the example Silverlight player. The following is an example of the playback URL structure:
Where [wowza-ip-address] is the IP address or domain of your Wowza media server, [application-name] is the name of your streaming application (either live or vod), and [stream-name] is the name of your stream (myStream).For nDVR, use the following playback URL structure:http://[wowza-ip-address]:1935/[application-name]/[stream-name]/Manifest?DVR
Add and configure the EZDRM module
After you have downloaded and installed the EZDRM module and created a Wowza media server application, you must add the module to the application and use custom properties to configure the module.
- Sign in to Wowza Streaming Engine Manager, click the Applications tab at the top of the page, and then click live in the contents panel.
Note: This article uses the live application that installs with Wowza Streaming Engine. If you want to use a different application, select it instead from the contents panel.
- On the application page Modules tab, click Edit, and then click Add Module.
- In the Add New Module dialog, enter the following information, and then click Add.
- Name: EZDRM
- Description: EZDRM
- Fully Qualified Class Name: com.ezdrm.wowza.EzdrmWowzaModule
- On the application page Properties tab, click Custom in the Quick Links bar.
- In the Custom section, click Edit.
- Click Add Custom Property, specify the following settings in the Add Custom Property dialog box, and then click Add:
Path Name Type Value /Root/Application username String Your EZDRM username. /Root/Application password String The password associated with the value provided for the username property. /Root/Application contentId String The ContentID returned in the EZDRM response. /Root/Application ezdrmUrl String Enter https://wvm.ezdrm.com/ws/LicenseInfo.asmx/GenerateKeys. This is the EZDRM Key API URL. /Root/Application debugFlag Boolean (Optional) Enables logging in the Wowza Streaming Engine logs for troubleshooting. Set to true to enable logging. The default value is false.
- Click Save and then restart the application to apply your changes.
(Optional) XML configuration
- Skip this section if you completed the steps in Use Wowza Streaming Engine Manager to configure the EZDRM module.
- Editing the XML file directly is the only way to configure Wowza Media Server. If you're using Wowza Streaming Engine 4.0 or later, we recommend using the Wowza Streaming Engine Manager to add and configure the module. However, the following instructions will also work.
- Edit [install-dir]/conf/[application-name]/Application.xml and add the following <Module> as the last entry in the <Modules> list:
<Module> <Name>EZDRM</Name> <Description>EZDRM</Description> <Class>com.ezdrm.wowza.EzdrmWowzaModule</Class> </Module>
- Edit [install-dir]/conf/[application-name/Application.xml and add the following properties to the application-level <Properties> container at the bottom of the file (be sure to get the correct <Properties> container - there are several in the Application.xml file):
<Property> <Name>username</Name> <Value>[ezdrm-account-username]</Value> <Type>String</Type> </Property> <Property> <Name>password</Name> <Value>[ezdrm-account-password]</Value> <Type>String</Type> </Property> <Property> <Name>contentId</Name> <Value>[ezdrm-contentID]</Value> <Type>String</Type> </Property> <Property> <Name>ezdrmUrl</Name> <Value>https://wvm.ezdrm.com/ws/LicenseInfo.asmx?op=GenerateKeys</Value> <Type>String</Type> </Property> <Property> <Name>debugFlag</Name> <Value>true</Value> <Type>Boolean</Type> </Property>
- If you're delivering a live stream, start the Wowza media server and send the stream from your encoder to the server.
Test the DRM configuration
Test playback with encryption
- Log in to the EZDRM website.
- In the Members Area, click PlayReady DRM Samples and Links. This provides information about creating a test player.
- On your test player webpage, enter the following URL into the Stream field and then click Connect:
Where [wowza-ip-address] is the IP address or domain of your Wowza media server, [application-name] is the name of your streaming application (either live or vod), and [stream-name] is the name of your stream (myStream).
For nDVR, use the following URL structure:
Verify the DRM configuration with logsWhen you've configured the setup correctly, you'll see messages similar to the following in the [install-dir]/logs/wowzastreamingengine_access.log file:
comment server INFO 200 - Wowza Streaming Engine is started! - - - 1.832 -
comment server INFO 200 - ModuleDRMEZDRM.onAppStart[vod/_definst_] - - - 26.339
comment server INFO 200 - ModuleDRMEZDRM.getPlayReadyLicense[vod/_definst_]: username:[your user name] keyId:[your key]
comment server INFO 200 - ModuleDRMEZDRM.onHTTPSmoothStreamingPlayReadyCreateVOD[vod/_definst_/sample.mp4]: Protect stream: keyId:[your key]
comment server INFO 200 - LiveStreamPacketizerSmoothStreaming.init[vod/_definst_/sample.mp4]: PlayReady encrypted AESCTR: keyId: [your key]
Download the Manifest XML data in a web browser. When the stream is encrypted, you'll see the following at the end of the Manifest:
<Protection> <ProtectionHeader SystemID=[System ID]/ProtectionHeader> </Protection>
Special instructions for using nDVR with DRM
There are several unique instructions required to successfully use the Wowza nDVR feature with DRM for Microsoft Smooth Streaming. For more information, see Special instructions for nDVR.
If you see a message similar to the following in [install-dir]/logs/wowzastreamingengine_access.log, check that your EZDRM username and password information has been set correctly in Application.xml.
comment server WARN 200 - ModuleDRMEZDRM.getPlayreadyLicense[vod/_definst_]: EZDRM content key is not set.
comment server WARN 200 - ModuleDRMEZDRM.onHTTPSmoothStreamingPlayReadyCreateVOD[vod/_definst_/sample.mp4]: Key request failed. ifFailFakeKey:false
If you're having problems or want to discuss this article, post in our forum.