Easily secure your live and on-demand content with the all-new DRM Plugin for Ant Media Server. Our plugin integrates seamlessly with industry-standard DRM systems to ensure your streams are accessible only to authorized users—keeping your content secure and compliant.
What is the DRM Plugin?
The DRM Plugin adds Digital Rights Management (DRM) capabilities to Ant Media Server using the CPIX (Content Protection Information Exchange) API. It enables protected content delivery over HLS and DASH by supporting popular DRM systems like:
- Widevine (Google)
- FairPlay (Apple)
- PlayReady (Microsoft)
Whether you’re streaming to browsers, mobile apps, or smart TVs—this plugin ensures your media is encrypted and access-controlled.
Key Features
- Multi-DRM Support: Compatible with Widevine, FairPlay, and PlayReady
- DASH & HLS Output: Smooth playback across all major devices
- CPIX API Integration: Standards-based DRM key exchange
- Flexible Configuration: Easily manage DRM settings per application
- Live & VOD Support: Protect live broadcasts and on-demand assets
DRM Plugin Settings
The following fields can be set in plugin.drm-plugin
settings under customSettings
of the application:
- keyManagementServerURL: (Mandatory) This is the key management server URL field that is used to get the keys via CPIX API
enabledDRMSystems
: (Mandatory) List of enabled DRM systems. It’s a JSON array. It can include: Widevine, PlayReady, FairPlay.encryptionScheme
: Encryption scheme value: “cbcs” or “cenc”. Default is “cbcs”. “cenc” is not supported by FairPlay.hlsPlayListType
: VOD, LIVE, EVENT (default: LIVE)segmentDurationSecs
: Default value: 2
timeShiftBufferDepthSecs
: Default value: 60segmentsOutsideLiveWindow
: Default value: 5 (set to 0 to disable removal)
Installation Guide: DRM Plugin for Ant Media Server
Get started in just a few steps to secure your live and VOD streams with industry-standard DRM.
In this guide, you’ll play the stream with Multi-DRM at the end.
Step 1: Enter credentials for Ant Media Server
- Login to PallyCon Web Panel & go to Multi-DRM > DRM Settings
- Copy the KMS Token
- Build
keyManagementServerURL
:- PallyCon KMS URL: https://kms.pallycon.com/v2/cpix/pallycon/getKey/
- Append your KMS Token
- Final URL: https://kms.pallycon.com/v2/cpix/pallycon/getKey/{REPLACE_WITH_YOUR_KMS_TOKEN}
- Add “Widevine” to your
enabledDRMSystems
JSON array - In Ant Media Server, go to your application > Settings > Advanced mode
- Add the following in customSettings:
"plugin.drm-plugin": {
"enabledDRMSystems": [
"Widevine"
],
"keyManagementServerURL": "https://kms.pallycon.com/v2/cpix/pallycon/getKey/{REPLACE_WITH_YOUR_KMS_TOKEN}"
}
- Click Save to apply settings
Step 2: Make the VideoJS Player Ready
- Clone the PallyCon HTML5 sample repository:
git clone https://github.com/inka-pallycon/html5-player-drm-samples
cd html5-player-drm-samples
sudo cp videojs-pallycon-sample.html /usr/local/antmedia/webapps/live/
sudo cp js/videojs-sample.js /usr/local/antmedia/webapps/live/js/
sudo cp js/pallycon-sample-helper.js /usr/local/antmedia/webapps/live/js/
sudo cp css/* /usr/local/antmedia/webapps/live/css/
Step 3: Publish a Live Stream with WebRTC
- Open: https://{YOUR_ANTMEDIA_SERVER}:5443/live?id=stream123
- Use stream123 as the ID
- Click “Start Publishing” and confirm it’s live
- Check directory: /usr/local/antmedia/webapps/live/streams/drm/stream123/
- Check for files: master.mpd and master.m3u8
URLs:
- https://{YOUR_ANTMEDIA_SERVER}:5443/live/streams/stream123/master.mpd
- https://{YOUR_ANTMEDIA_SERVER}:5443/live/streams/stream123/master.m3u8
Step 4: Get Widevine Token
- Go to: PallyCon Token Generator
- Fill required fields:
- SITE ID
- SITE Key
- ACCESS Key
- DRM Type: Widevine
- CID: stream123
- USER ID
- Timestamp: Click refresh
- Click “Generate Token” and copy the result
- Edit
pallycon-sample-helper.js
:- Replace
dashUri
with: https://{YOUR_ANTMEDIA_SERVER}:5443/live/streams/drm/stream123/master.mpd - Replace
widevineToken
with your copied token
- Replace
Step 5: Play the Stream in Chrome
- Open: https://{YOUR_ANTMEDIA_SERVER}:5443/live/videojs-pallycon-sample.html
- Click the play button
- If the video plays—Congratulations! Your stream is DRM protected
Try It Yourself: DRM Streaming with PallyCon
- Get DRM Credentials from PallyCon
- Integrate DRM via Ant Media customSettings
- Publish a Live WebRTC Stream
- Use the VideoJS DRM Sample Player
- Test Playback in Chrome with Widevine
See full step-by-step guide in our documentation.
Why Choose Our DRM Plugin?
- Easy to install & configure
- Supports major DRM platforms
- Ideal for Live & VOD
- Integrated with top DRM providers (e.g., PallyCon)
- Tested with modern players like VideoJS, Shaka, etc.
Documentation & Support
Visit our Documentation Page or Contact Us for support.
Get Started Today
Secure your video streams in minutes. Download the DRM Plugin now or try our Free Trial today.