Streaming & media
What Is DRM and How to Use It to Protect Your Video Content
How Widevine, FairPlay and PlayReady protect streams, what a DRM workflow looks like from packager to player, and what DRM cannot stop.
1. What DRM does
Digital rights management (DRM) encrypts video and audio and controls who can obtain the key to decrypt them. The key is delivered inside a license, which also carries rules: how long playback is allowed, whether it can continue offline, which outputs are permitted and which minimum security level the device must meet.
Decryption happens inside a Content Decryption Module (CDM) built into the browser, operating system or device. The key is never exposed to the web page or the app, which is the main difference from simpler protection methods. In browsers, the player talks to the CDM through the W3C Encrypted Media Extensions (EME) API.
2. DRM compared with other protection methods
Several controls are called content protection. They solve different problems and are usually combined.
| Method | What it protects | Limitation |
|---|---|---|
| Token-authenticated URLs | Stops hotlinking and reuse of stream URLs beyond a set time | Content is not encrypted; anyone with a valid URL can save the segments |
| Geo-blocking | Restricts access by country, as many sports and film rights require | Based on IP location, so VPNs and proxies need extra detection |
| HLS AES-128 encryption | Encrypts segments with a key fetched over HTTPS | The key reaches the player in the clear; a user with a valid session can extract it |
| DRM | Encrypts content and keeps the key inside the device’s CDM, under license rules | Cannot stop a camera pointed at the screen, or a paying subscriber restreaming |
| Forensic watermarking | Identifies the session or account a leaked copy came from | Detects leaks after they happen; works best combined with DRM |
3. Widevine, FairPlay and PlayReady
No single DRM system covers every device, so a service offered on browsers, phones and TVs normally supports all three.
| System | Owner | Main platforms |
|---|---|---|
| Widevine | Chrome, Firefox, Android, Android TV and Google TV, Chromecast, many smart TVs | |
| FairPlay Streaming | Apple | Safari and apps on iOS, iPadOS, tvOS and macOS |
| PlayReady | Microsoft | Edge on Windows, Xbox, many smart TVs and set-top boxes |
Each system defines security levels. Widevine L1 and PlayReady SL3000, for example, keep decryption and decoding in hardware, while Widevine L3 runs in software. Studios and sports rights holders often require hardware security for HD and UHD and allow software security only for SD.
4. Encrypt once for all three: CENC and cbcs
Common Encryption (CENC, ISO/IEC 23001-7) lets several DRM systems decrypt the same encrypted file. It defines two main schemes: cenc, which uses AES-CTR, and cbcs, which uses AES-CBC with a pattern that typically encrypts one in every ten 16-byte blocks of video data. FairPlay requires cbcs. Current Widevine and PlayReady clients also support cbcs, so fragmented MP4 (CMAF) segments encrypted once with cbcs can serve all three systems from a single set of files on the CDN.
Older devices may support only cenc for Widevine or PlayReady. If they matter to your audience, you may need a second encrypted copy, which doubles packaging and storage. Test the actual device list before deciding.
Brightcove: understanding DRM and producing protected content
5. How a DRM workflow fits together
A typical live or on-demand workflow has five parts:
- Key server: generates content keys and key IDs, often as part of a multi-DRM service such as EZDRM.
- Packager: requests keys through an exchange format such as CPIX, encrypts the segments and writes DRM signalling into the HLS playlist or DASH manifest.
- Player: reads the signalling, has the CDM generate a license request and sends it to the license server.
- Entitlement service: your own backend checks that the viewer is logged in, has access to this content and is in an allowed region, then issues a short-lived token for the license request.
- License server: validates the token and returns a license with the content key and the rules for this viewer.
6. What the signalling looks like in HLS
The fragment below is a media playlist for cbcs-encrypted CMAF segments with FairPlay signalling. A multi-DRM playlist adds a similar EXT-X-KEY line for each system, and the player uses the one its CDM supports.
#EXTM3U
#EXT-X-VERSION:6
#EXT-X-TARGETDURATION:6
#EXT-X-MEDIA-SEQUENCE:1024
#EXT-X-MAP:URI="init.mp4"
#EXT-X-KEY:METHOD=SAMPLE-AES,URI="skd://asset-1234",KEYFORMAT="com.apple.streamingkeydelivery",KEYFORMATVERSIONS="1"
#EXTINF:6.000,
segment-1024.m4s
#EXTINF:6.000,
segment-1025.m4s
The skd:// URI identifies the key for the FairPlay license request; the key itself is never in the playlist. DASH carries the same information in ContentProtection elements with PSSH data. The license server must refuse requests without a valid entitlement token, otherwise anyone who can read the playlist can request a license.
7. Set license rules per content type
Rights agreements usually decide the rules. Translate them into license policy before building the workflow:
- Use separate keys for SD, HD and UHD tracks, so a device with only software security receives the lower renditions.
- Require HDCP on external outputs for premium content, and decide what happens on devices that cannot provide it.
- Rotate keys during long live events, so a key obtained once does not unlock the entire broadcast.
- Limit license duration and offline persistence for rentals, and allow longer rules for subscribers.
- Enforce concurrent stream limits in the entitlement service. DRM alone does not stop account sharing.
8. Treat license delivery as critical infrastructure
Every viewer needs a license before the first frame plays, so the license service sits in the playback path. If it slows down or fails at kick-off, viewers see errors even though the CDN and origin are healthy. Load-test the license and entitlement endpoints at your expected peak concurrency, including the surge when a live event starts.
The license request also adds time to startup. Measure time to first frame with DRM enabled on each platform, and choose key rotation intervals that do not force frequent new license requests.
DRM protects the file and the key. It cannot prevent someone from filming a screen, and a paying subscriber can still capture and restream a live event. For high-value sports and premieres, combine DRM with forensic watermarking, token-authenticated URLs and monitoring for illegal restreams.
9. Before launch
Test on real devices rather than emulators, because security levels and codec support differ by model and firmware.
- Playback works on every target browser, phone, smart TV and set-top box, at the expected security level.
- Viewers without access, in blocked regions or over the stream limit get a clear error message, not a blank player.
- Where the rights require it, HD and UHD renditions are unavailable to devices with only software security.
- Key rotation during a live event causes no visible interruption.
- License and entitlement services stay within their latency target under peak load.