• How to set up EZDRM PlayReady DRM (smoothstreaming)

    This article describes how to set up and use Wowza DRM with EZDRM PlayReady.

    Note: Wowza Media Server™ 3.5 or later is required.

    Contents


    Configuration

    Testing

    nDVR Instructions

    Troubleshooting

    More resources

    Configuration


    Streaming application configuration

    1. License and install the Wowza media server software.

    2. Set up video on demand (VOD) or live streaming by following the instructions in one of our Tutorials.

      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.

      Follow the tutorial instructions to make sure that you can play an unencrypted stream in the example Silverlight player webpage.

      URL: http://[wowza-ip-address]:1935/[application-name]/[stream-name]/Manifest

      Where [wowza-ip-address] is the IP address 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:

      URL: http://[wowza-ip-address]:1935/[application-name]/[stream-name]/Manifest?DVR

    EZDRM configuration

    1. Sign up for the Microsoft Silverlight DRM option at EZDRM.com.

      Note: You can try any EZDRM service free of charge for 30 days with no obligations. See 30-day Free Trial.
    2. Log in to the EZDRM website, and then do the following:

      1. In the Members Area, click View Silverlight Account Info and set the website name and IP address of the website that will host your video player. Only Silverlight players that are loaded from this IP address or domain can play content protected with Microsoft PlayReady.

      2. Copy the Silverlight example player webpage to your website (this is the player that will be used for testing playback with encryption):

        VOD: [install-dir]/examples/VideoOnDemandStreaming/SilverlightPlayer/player.html

        Live: [install-dir]/examples/LiveVideoStreaming/SilverlightPlayer/player.html

        DVR: [install-dir]/examples/LiveDVRStreaming/SilverlightPlayer/player.html

      3. In a text editor, edit the example player webpage and add the following below the <body> tag:
        <iframe src="http://playready.ezdrm.com/SiteAuth.aspx?SiteID=[SiteID]&p1=5&p2=%20&p3=" frameborder="0" width="1%" height="1%">
        </iframe>
        Where [SiteID] is your EZDRM account SiteID. You can get this value from the Setup Instructions page in the EZDRM Members Area.

    Wowza media server configuration

    1. Edit [install-dir]/conf/[application-name]/Application.xml and add the following <Module> as the last entry in the <Modules> list:
      <Module>
          <Name>ModuleDRMEZDRM</Name>
          <Description>ModuleDRMEZDRM</Description>
          <Class>com.wowza.wms.drm.module.ezdrm.ModuleDRMEZDRM</Class>
      </Module>
    2. 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>drmEZDRMUsername</Name>
          <Value>[ezdrm-account-username]</Value>
      </Property>
      <Property>
          <Name>drmEZDRMPassword</Name>
          <Value>[ezdrm-account-password]</Value>
      </Property>
      <Property>
          <Name>drmEZDRMIfFailFakeKey</Name>
          <Value>true</Value>
          <Type>Boolean</Type>
      </Property>
      <Property>
          <Name>drmEZDRMDebugLog</Name>
          <Value>true</Value>
          <Type>Boolean</Type>
      </Property>
      Where [ezdrm-account-username] is your EZDRM username and [ezdrm-account-password] is your EZDRM password.

      Note: By default the EZDRM module is configured so that if it can't communicate with the EZDRM key server to get an encryption key, then the stream will be published using a fake or random encryption key (the stream will not be playable). If you want to instruct the module to instead leave the stream unencrypted, then set the above drmEZDRMIfFailFakeKey property to false.
    3. If you're delivering a live stream, start the Wowza media server and send the stream from your encoder to the server.

    Testing


    Testing playback with encryption

    1. Navigate to the example player webpage that you configured previously. Make sure that you access the webpage using either the IP address or domain that you specified on the View Silverlight Account Info page on the EZDRM Members Area.

    2. In the example player webpage, enter the following URL into the Stream field and then click Connect:

      URL: http://[wowza-ip-address]:1935/[application-name]/[stream-name]/Manifest

      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:

      URL: http://[wowza-ip-address]:1935/[application-name]/[stream-name]/Manifest?DVR

    Using EZDRM log messages for verification

    When 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>

    nDVR Instructions


    nDVR Specific Instructions

    There are a couple unique instructions for DRM with nDVR.

    • The DRM module must be enabled during nDVR recording and playback.

    • When using nDVR in an origin-edge scenario, the DRM module must be enabled on both origin and edge.

    • In origin-edge mode, both origin and edges use a common shared secret string to encrypt data sent between instances. The dvrEncryptionSharedSecret or liveRepeaterEncryptionSharedSecret properties can be used to customize the shared secret that's used. See nDVR advanced configuration for specific uses of these properties.

    Troubleshooting


    Key-related errors in wowzastreamingengine_access.log

    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


    More resources


    EZDRM website

    Originally Published: 10-08-2011
    Updated: For Wowza Streaming Engine on 02-11-2014.

    If you're having problems or want to discuss this article, post in our forum.