This link provides a detailed explanation of creating various Transform Manager job templates using built in task definitions, but not including “PlayReady Protection” task definition. The goal of this blog is to detail the steps on how to include “PlayReady Protection” task definition in a job template.

Out of box installation of IIS Transform Manager has PlayReady Protection task definition disabled. To enable PlayReady Protection task definition, add license server URL to the corresponding task definition file.

To do this, select "Job Templates" and edit "Smooth Streams to encrypted Smooth Streams" job template. Then edit the "PlayReady Protection" task definition. Add the PlayReady license URL into licenseAcquisitionUrl property.

Open C:\ProgramData\Microsoft\IIS\Transform Manager\Configuration\Task Definitions\PlayReady Protection.xml file, and make sure that license acquisition URL to the following node has been added.

To unhide ProgramData folder, use Control Panel\Folder Options\View Tab\check Show hidden files, folders, and drives.

Next we go over how to use a PlayReady Protection task definition in a job template. Let’s use an example to illustrate how to use PlayReady Protection task definition. Suppose we need to create a job template to do the following three things:

  1. Encode a media source file to smooth streaming;
  2. Encrypt the smooth streaming (the output of step 1) using PlayReady;
  3. Copy PlayReady protected smooth streaming (output of step 2) to a destination folder.

Each of the above three steps maps to a task definition already included in Transform Manager.

The setup procedures for a job template and its corresponding watch folder are basically the same.

To add a PlayReady Protection task definition, you need to add the following information through its Edit Properties dialog:

  1. licenseAcquisitionUrl;
  2. keySeedValue;
  3. keyId.

In addition, under Task Chaining section, we need to select EE4Output under “Input folder name” since EE4Ouput is the output folder of the previous step.

The complete settings are shown below:

Since the output folder name of task 2 is “Protected”, the command line parameter in task 3 should be

Robocopy.exe "Protected" "C:\Workspace\Destination\{DateTime UTC(yyyyMMdd)}\{Job ID}" *

Key ID and Key Seed Override

In the above, we have “hard-coded” key ID and key seed in PlayReady Protection task definition. This is not practical in reality. In practice, key ID may change with VOD assets while key seed may or may not change. We do not put in key ID or key seed in PlayReady Protection task definition in Transform Manager.  Instead, we use manifest or playlist file in SMIL 2.0 format to accompany a video asset to be dropped into a watch folder. In the manifest file, we include key ID and key seed which are used to override the key ID and key seed settings, if any, in the PlayReady Protection task definition.

To illustrate this, let’s create a simple job template and its watch folder using two task definitions:

  1. MP4 to Smooth Streams
  2. PlayReady Protection

The PlayReady Protection property page looks as below:

The input folder named “SmoothStreams” is the output folder of the prior task. Notice that key ID and key seed are left blank.

Here is a sample manifest (SMIL) file:

<?xml version="1.0" encoding="utf-8"?>

<smil xmlns="http://www.w3.org/2001/SMIL20/Language">

  <head>

    <metadata id="meta-rdf">

      <rdf:RDF xmlns:iisms=http://schemas.microsoft.com/iis/media/v4/TM# 

                     xmlns:sd="http://schemas.microsoft.com/iis/media/v4/SharedData#"

                     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 

                    xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">

      <iisms:task rdf:about="guid:9A3BFEAC-F8AE-41CA-87FA-D639E4D1C753" >

        <!--id defined in C:\ProgramData\Microsoft\IIS\Transform Manager\Configuration\Task Definitions\PlayReady Protection.xml -->

        <iisms:id>9A3BFEAC-F8AE-41CA-87FA-D639E4D1C753</iisms:id>

        <sd:keyId>b6e16839-eebd-4ff6-ab76-8d482d8d2b6a</sd:keyId>

        <sd:keySeedValue>XVBovsmzhP9gRIZxWfFta3VVRPzVEWmJsazEJ46I</sd:keySeedValue>

      </iisms:task>

      </rdf:RDF>

    </metadata>

  </head>

  <body>

    <seq>

      <video src="Transformers3_CineplexEntertainment_-MP4_High.mp4" />

      <video src="Transformers3_CineplexEntertainment_-MP4_Medium.mp4" />

      <audio src="Transformers3_CineplexEntertainment_-MP4_High.mp4" systemLanguage="eng" />

    </seq>

  </body>

</smil>

The id value in the manifest file is from the PlayReady Protection task definition file located at C:\ProgramData\Microsoft\IIS\Transform Manager\Configuration\Task Definitions\PlayReady Protection.xml

Notice that, in this particular case, since audio tracks are included in the video files, we use one of the video files for audio source. If audio node is missing, the audio track will also be missing from the output Smooth Streams but video tracks work fine.

Just drop both the manifest file and the referenced MP4 video files into the watch folder, the resulting PlayReady protected Smooth Streams will be in the Finished\Protected\ folder under the watch folder. You can then test the asset in a Silverlight player application against a PlayReady license server.

Now what if you already have a set of smooth streaming assets and you just want to protect them with PlayReady?

You can simply use PlayReady Protection task definition to perform PlayReady protection on the smooth streaming assets. The corresponding job template and watch folder are very similar to what is provided above. The only difference is the manifest file since now we need to include not only .ismv and .isma files, but also .ism and .ismc files in the manifest.

Here is an example of manifest file:

<?xml version="1.0" encoding="utf-8"?>

<smil xmlns="http://www.w3.org/2001/SMIL20/Language">

  <head>

    <metadata id="meta-rdf">

      <rdf:RDF xmlns:iisms="http://schemas.microsoft.com/iis/media/v4/TM#" 

               xmlns:sd=http://schemas.microsoft.com/iis/media/v4/SharedData#

               xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 

               xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">

      <iisms:task rdf:about="guid:9A3BFEAC-F8AE-41CA-87FA-D639E4D1C753" >

        <!--id defined in C:\ProgramData\Microsoft\IIS\Transform Manager\Configuration\Task Definitions\PlayReady Protection.xml -->

        <iisms:id>9A3BFEAC-F8AE-41CA-87FA-D639E4D1C753</iisms:id>

        <sd:keyId>b6e16839-eebd-4ff6-ab76-8d482d8d2b6a</sd:keyId>

        <sd:keySeedValue>XVBovsmzhP9gRIZxWfFta3VVRPzVEWmJsazEJ46I</sd:keySeedValue>

      </iisms:task>

      </rdf:RDF>

    </metadata>

  </head>

  <body>

    <seq>

      <ref src="Transformers3.ism" xmlns="" />

      <ref src="Transformers3.ismc" xmlns="" />

      <video src="Transformers3_583k.ismv" />

      <video src="Transformers3_1162k.ismv" />

      <audio src="Transformers3_77kaud-eng.isma" systemLanguage="eng" />

    </seq>

  </body>

</smil>

 NOTES:

  1. Remember to stop and restart the watch folder mapped to the job template to make the settings effective. Before stopping and restarting a watch folder, we should make sure all jobs are finished (no more running or queued jobs).

  2. Since we are using PlayReady Protection task definition as part of a job template, we are not using PlayReady Protection watch folder. In other words, you can safely leave the PlayReady Protection watch folder in a disabled state, as shown below.

           

 

Acknowledgment: The author is grateful to John Deutscher and Mario Doiron of Microsoft for their great insight and help.