Bitmovin Encoder Integration Guide
Overview
When using Bitmovin encoding service, multi DRM packaging is possible through CPIX or SPEKE API integration with PallyCon KMS(Key Management Server).
This document explains how to create DASH/HLS content with multi-DRM using examples written based on the Bitmovin Java SDK.
Requirements
- Commercial account of Bitmovin Encoding service: permission required for DRM API
- Use of Bitmovin Encoding Python SDK
- PallyCon Multi DRM service account: trial or commercial
If you want to integrate Bitmovin encoding service in language other than Python, refer to the Python example code below and use Bitmovin Encoding API in the relevant language.
Sample Download
You can download the Bitmovin encoding integration example (Python version) from the linked below.
Download sampleDRM Packaging Process
Using Bitmovin SPEKE API
If you use the SPEKE API supported by the Bitmovin encoder, DRM packaging is possible with a simple setup because the API integration with PallyCon KMS server is handled inside the Bitmovin encoder. However, the current Bitmovin encoder only supports the SPEKE API v1 specification, so multi-key packaging (supported by SPEKE v2) cannot be applied.
sequenceDiagram
participant A as Content Service Site
participant B as Bitmovin Encoding
participant C as PallyCon KMS
A -->> A: Configure packaging job (source content and output storage)
A ->> B: Create DRM packaging job using SpekeDrm object (with KMS URL and Content ID)
B ->> C: Request Key and Kid to PallyCon KMS via SPEKE API
C -->> C: Generate and store Key/Kid for the CID
C ->> B: Respond Key and Kid
B -->> B: Package DASH or HLS content with DRM encryption
B ->> A: Store the result in the output storage
Using PallyCon CPIX API
In case of CPIX API, the API communication with PallyCon KMS server is processed outside the Bitmovin encoder, and the results (KEY, KID, etc.) are input to the Bitmovin encoder to proceed with DRM packaging. If you use the Python version sample linked in this document, you don’t need to implement CPIX API request. If you use other programming languages, you need to implement the functions yourself by referring to Python samples and PallyCon CPIX API specifications.
sequenceDiagram
participant A as Content Service Site
participant B as Bitmovin Encoding
participant C as PallyCon KMS
A -->> A: Configure packaging job (source content and output storage)
A ->> C: Request Key and Kid (Key ID) via PallyCon CPIX API (with content ID)
C -->> C: Generate and store Key/Kid for the CID
C ->> A: Respond Key and Kid
A ->> B: Create DRM packaging job using CencDrm object (with Key and Kid)
B -->> B: Package DASH or HLS content with DRM encryption
B ->> A: Store the result in the output storage
Configurations by Integration Types
Type 1 - Using Bitmovin SPEKE API
This type of integration uses Bitmovin encoder’s SPEKE API instead of PallyCon CPIX API. This type is recommended unless multi-key support is required.
Fist add the below items to the environment configuration of Bitmovin.
//required
PALLYCON_KMS_URL=https://kms.pallycon.com/cpix/getKey?enc-token=
//required
PALLYCON_ENC_TOKEN= {{KMS token shown in PallyCon Console site}}
//required
CONTENT_ID= {{ unique ID of your content for the packaging }}
// FairPlay Required
DRM_FAIRPLAY_IV = {{ IV defined by PallyCon. Please contact us for it. }}
Configure the integration using the functions in the sample source.
Type 2 - Using PallyCon CPIX API
This type of integration uses the Python sample implemented with PallyCon CPIX specification.
First add the below items to the environment configuration of Bitmovin.
//required
PALLYCON_ENC_TOKEN= {{KMS token shown on PallyCon Console site}}
//required
PALLYCON_LICENSE_URL=https://license-global.pallycon.com/ri/licenseManager.do
//required
CONTENT_ID= {{ unique ID of your content for the packaging }}
Configure the integration using the functions in the sample source.