Skip to main content

Unified Streaming

Unified Streaming VOD packaging enables seamless, efficient, and scalable workflows for delivering video content to audiences globally. By leveraging CMAF for adaptive streaming and integrating robust DRM solutions like Axinom, content providers can achieve secure and high-performance distribution for their Video-on-Demand offerings.

This document outlines the principles and implementation steps for VOD static packaging using CMAF with Axinom DRM.

Prerequisites​

To use Axinom DRM:​

  • Register on the Axinom Portal
  • Start a free trial
  • Go to My Mosaic / DRM and acquire credentials
  • You will need the following information:
  • Once you are ready to go to production, upgrade your Axinom account to a paid plan.

To use Unified Streaming​

Configuration​

  1. You will need a CPIX document to pass the key details to the Unified Streaming packager. Send a request to the Axinom Key Server SPEKE endpoint to get a CPIX response document..

    1. You can use Axinom Speke Tool.

      • Set your Key Service Tenant ID.

      • Add your Key Service Management key.

      • Select the SPEKE endpoint as Axinom Prod API SPEKE 2.0(https://key-server-management.axprod.net/api/SpekeV2).

      • Add CPIX document as the request body. Below is a sample request cpix document.

        <?xml version="1.0" encoding="UTF-8"?>
        <cpix:CPIX contentId="bd99b041-4353-4b7a-9533-f36ee752b735" version="2.3"
        xmlns:cpix="urn:dashif:org:cpix" xmlns:pskc="urn:ietf:params:xml:ns:keyprov:pskc" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:enc="http://www.w3.org/2001/04/xmlenc#">
        <cpix:ContentKeyList>
        <cpix:ContentKey kid="e7ac7cd3-59fb-4f2b-b4c5-9643e32bd8fb" commonEncryptionScheme="cenc"/>
        <cpix:ContentKey kid="52e3fd49-97b1-4aa2-8408-9758c9037ddd" commonEncryptionScheme="cenc"/>
        </cpix:ContentKeyList>
        <cpix:DRMSystemList>
        <cpix:DRMSystem kid="e7ac7cd3-59fb-4f2b-b4c5-9643e32bd8fb" systemId="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed">
        <cpix:PSSH/>
        <cpix:ContentProtectionData/>
        <cpix:HLSSignalingData playlist="media"/>
        <cpix:HLSSignalingData playlist="master"/>
        </cpix:DRMSystem>
        <cpix:DRMSystem kid="52e3fd49-97b1-4aa2-8408-9758c9037ddd" systemId="edef8ba9-79d6-4ace-a3c8-27dcd51d21ed">
        <cpix:PSSH/>
        <cpix:ContentProtectionData/>
        <cpix:HLSSignalingData playlist="media"/>
        <cpix:HLSSignalingData playlist="master"/>
        </cpix:DRMSystem>
        </cpix:DRMSystemList>
        <cpix:ContentKeyUsageRuleList>
        <cpix:ContentKeyUsageRule kid="e7ac7cd3-59fb-4f2b-b4c5-9643e32bd8fb" intendedTrackType="VIDEO">

        <cpix:VideoFilter/>
        </cpix:ContentKeyUsageRule>
        <cpix:ContentKeyUsageRule kid="52e3fd49-97b1-4aa2-8408-9758c9037ddd" intendedTrackType="AUDIO">
        <cpix:AudioFilter/>
        </cpix:ContentKeyUsageRule>
        </cpix:ContentKeyUsageRuleList>
        </cpix:CPIX>

      Then send the request. You will get a reponse and you can save it locally. we'll call the response cpix as response.cpix in next steps.

    2. You can send a curl request.

      #!/bin/bash

      curl 'https://key-server-management.axprod.net/api/SpekeV2' \
      -v \
      -H 'Authorization: Basic <Credentials>' \
      -H "Content-Type: application/xml" \
      -H "X-Speke-Version: 2.0" \
      --data "@request.cpix" \
      > response.cpix
      • Credentials : Base64 value of <tenant ID>:<Key service management key>. You can use Base64 convertion tool to generate this value.
      • @request.cpix : This refers to the sample CPIX document shown above.
  2. Once you have the response.cpix by calling the Axinom Key Server, you can start the docker cammands provided by Unified Streaming at the registration. Here are the sample cammands:

    • This command will repackage your already encoded content to CMAF, encrypting it at the same time.

      NOTE: This content used is the same content provided by Unified streaming.

      export UspLicenseKey=<Your Unified Streaming License key>;

      docker run --rm -e UspLicenseKey -v $PWD:/data unifiedstreaming/mp4split:latest \
      -o Promo_Learning-aac-128k.cmfa \
      --cpix response.cpix \
      --fragment_duration 96/25 \
      https://usp-vod2live.s3.amazonaws.com/Promo_Learning-aac-128k.mp4

      This will create a CMAF file in the current directory.

    • Now we can create HLS media playlist for the above created cmaf file.

      docker run --rm -e UspLicenseKey -v $PWD:/data unifiedstreaming/mp4split:latest \
      -o Promo_Learning-aac-128k.m3u8 \
      --cpix response.cpix \
      --fragment_duration 96/25 \
      Promo_Learning-aac-128k.cmfa
    • Now create the HLS main manifest that will pull the above playlist.

      docker run --rm -e UspLicenseKey -v $PWD:/data unifiedstreaming/mp4split:latest \
      -o Promo_Learning.m3u8 \
      Promo_Learning-aac-128k.m3u8

      This generates a complete HLS package.

    • If you want to use the same media files to serve DASH clients, use the below command.

      docker run --rm -e UspLicenseKey -v $PWD:/data unifiedstreaming/mp4split:latest \
      -o Promo_Learning.mpd \
      --cpix response.cpix \
      --mpd.inline_drm \
      Promo_Learning-aac-128k.cmfa

Testing Playback​

Once you have produced a DRM-protected video, you can upload the files to a web server with valid HTTPS.

You can test the playback using Axinom’s DRM Video Playback tool. Hints for filling out the form:

  • Video Source URL: the URL of the generated main manifest file(Dash/HLS).
  • Content Key ID : You can refer to the manifest file to find the KID used to encrypt the content.
  • Communication Key and Communication Key ID: The values you received from Axinom DRM configuration (see the prerequisites above)
  • License Service: keep defaults (or enter the value you received from Axinom DRM configuration)
  • Player: pick any

See also​