Use BuyDRM KeyOS MultiPack with Wowza Streaming Engine

This article provides instructions for integrating Wowza Streaming Engine™ media server software with BuyDRM's KeyOS MultiPack Wowza module. With the KeyOS MultiPack Wowza module, Wowza Streaming Engine can protect HLS and MPEG-DASH live and video-on-demand streams using Apple Fairplay, Microsoft PlayReady, and Google Widevine encryption.

Download and install the BuyDRM KeyOS Multipack Wowza module


  1. Sign up for the BuyDRM KeyOS service at BuyDRM.com.
  2. Sign in to BuyDRM.com and download the KeyOS MultiPack Wowza Module.
  3. Unzip the archive and copy the contents to [install-dir]/lib.

Add the BuyDRM KeyOS Multipack Wowza module in Wowza Streaming Engine Manager


Note: Access to the Modules and Properties tabs requires an administrator user with advanced permissions. For more information, see Enable access to advanced administrative settings.
  1. In Wowza Streaming Engine Manager, click the Applications tab at the top of the page and select your application in the contents panel.
  2. In the contents panel, click DRM. Ensure BuyDRM isn't enabled. If BuyDRM is enabled, the KeyOS MultiPack Wowza module won't work properly.
  3. In the contents panel, click the name of your application, then click the Modules tab at the top of the page.
  4. On the Modules page, click Edit, click Add Module, specify the following values for the module, and then click Add.
    • Name - Enter KeyOS MultiPack Wowza Module.
    • Description - Enter KeyOS MultiPack Wowza Module.
    • Fully Qualified Class Name - Enter com.keyos.wse.buydrm.KeyOSMultiPack.
  5. Click Save, and then restart the application to apply the changes.
  6. Click the Properties tab, and then click Custom in the Quick Links bar.
  7. Under Custom, click Edit, and then click Add Custom Property.
  8. On the Add Custom Property dialog box, specify the following settings, and then click Add.
    Path Name Type Value

    /Root/Application

    drmBuyDRMContentKeyApiUrl

    String

    Set to https://packager.licensekeyserver.com/pck/. This is the URL of the KeyOS Encryption Key API from which Wowza Streaming Engine gets the content protection keys.

    /Root/Application

    drmBuyDRMUuidRandomizer

    String

    Specifies the unique UUID encryption value that is used to make keys random across Wowza Streaming Engine installations.

    This value is used by the BuyDRM KeyOS MultiPack Wowza Module as a namespace to generate unique, but repeatable Key ID values (UUID version 3 as defined in RFC 4122). If you know the namespace and name, you can authenticate XML linking to a specific Key ID.

    Note: You must provide a unique UUID for each application.

    /Root/Application

    drmBuyDRMUserKey

    String

    Specifies the unique User/Packaging key that you can get from the KeyOS Console Account Management menu.

    /Root/Application

    drmBuyDRMProtectMpegDashStreaming

    Boolean

    Specifies whether MPEG-DASH output is protected.

    /Root/Application

    drmBuyDRMProtectHlsStreaming

    Boolean

    Specifies whether HLS output is protected. If set to true, then cupertinoEncryptionAPIBased must also be set to true.

    /Root/Application

    cupertinoEncryptionAPIBased

    Boolean

    Specifies whether the KeyOS MultiPack module uses additional Wowza Streaming Engine Java API encryption methods to protect HLS output. This property must be set to true if drmBuyDRMProtectHlsStreaming is also set to true.

    /Root/Application

    drmBuyDRMStreamNameMapFile

    String

    Specifies the path to the buydrmstreammap.txt map file.

  9. Click Save, and then restart the application to apply the changes.
  10. Using a text editor, create a file named buydrmstreammap.txt in the [install-dir]/conf/[application] directory.
  11. Add BuyDRM mapping entries in the buydrmstreammap.txt file for each stream you’re protecting. For more information about map files, see Use BuyDRM map files to protect live and video-on-demand streams

Add the BuyDRM KeyOS Multipack Wowza module using XML


Alternatively, you can add and configure the BuyDRM KeyOS Multipack Wowza module by editing the Application.xml configuration file in a text editor. If you configured the module in Wowza Streaming Engine Manager, skip this section.

  1. Navigate to [install-dir]/conf/[application] and open Application.xml in a text editor.
  2. Add the following <Module> block as the last entry in the <Modules> container element:
    <Module>
        <Name>KeyOS MultiPack Wowza Module</Name>
        <Description>KeyOS MultiPack Wowza Module</Description>
        <Class>com.keyos.wse.buydrm.KeyOSMultiPack</Class>
    </Module>
  3. Add the following properties to the <Properties> container element at the bottom of the Application.xml file (be sure to get the correct <Properties> container element as there are several in the file):
          <!-- Properties defined here will be added to the IApplication.getProperties() and IApplicationInstance.getProperties() collections -->
          <Properties>
             <!-- Enable HLS processing by the module. -->
             <Property>
                <Name>cupertinoEncryptionAPIBased</Name>
                <Value>true</Value>
                <Type>Boolean</Type>
             </Property>
             <!-- KeyOS Encryption Key API URL. Must use SSL in production -->
             <Property>
                <Name>drmBuyDRMContentKeyApiUrl</Name>
                <Value>https://packager.licensekeyserver.com/pck/</Value>
                <Type>String</Type>
             </Property>
             <!-- Random value that ensures that your instance of the app will be generating random KeyIDs. -->
             <Property>
                <Name>drmBuyDRMUuidRandomizer</Name>
                <Value>[unique UUID value]</Value>
                <Type>String</Type>
             </Property>
             <!-- User Key/Packaging Key -->
             <Property>
                <Name>drmBuyDRMUserKey</Name>
                <Value>[user key]</Value>
                <Type>String</Type>
             </Property>
             <!-- Global flags that define whether app should apply DRM to the output. If not set, the module will make best effort to encrypt the content and will fail only if it encountered an error that prevents it from protecting the stream. -->
             <Property>
                <Name>drmBuyDRMProtectMpegDashStreaming</Name>
                <Value>true</Value>
                <Type>Boolean</Type>
             </Property>
             <Property>
                <Name>drmBuyDRMProtectHlsStreaming</Name>
                <Value>true</Value>
                <Type>Boolean</Type>
             </Property>
             <!-- Mapping file for your application. The path may be different if you have specified it in a different location. -->
             <Property>
                <Name>drmBuyDRMStreamNameMapFile</Name>
                <Value>${com.wowza.wms.context.VHostConfigHome}/conf/${com.wowza.wms.context.Application}/buydrmstreammap.txt</Value>
             </Property>
  4. Save your changes and restart Wowza Streaming Engine.
  5. Using a text editor, create a file named buydrmstreammap.txt in the [install-dir]/conf/[application] directory.
  6. Add BuyDRM mapping entries in the buydrmstreammap.txt file for each stream you’re protecting. For more information about map files, see Use BuyDRM map files to protect live and video-on-demand streams