Content protection in OTT is a contractual requirement before it is a technical decision. Studios and content owners mandate specific DRM systems, robustness levels, and output protection rules as conditions of their licensing agreements. If your platform cannot enforce these requirements, you do not get the content. The technical challenge is implementing content security that satisfies rights holders while being invisible to legitimate viewers.
This guide covers the modern DRM and token-based content protection architecture for OTT services, including the practical implementation details that matter when shipping to connected TV platforms.
Multi-DRM architecture
No single DRM system covers all devices. The standard multi-DRM approach uses:
- Widevine for Chrome, Android, Android TV/Google TV, Chromecast, and most smart TV browsers
- FairPlay for Safari, iOS, iPadOS, tvOS, and macOS
- PlayReady for Windows Edge, Xbox, and some smart TV platforms (including Samsung Tizen and LG webOS alongside Widevine)
Common encryption (CENC and CBCS)
The key to multi-DRM is encrypting content once and serving it with multiple DRM systems. Two encryption schemes handle this:
CENC (CTR mode): the original common encryption scheme. Encrypts full samples using AES-128 in CTR mode. Supported by Widevine and PlayReady. Not supported by FairPlay.
CBCS (CBC mode with subsample encryption): the newer scheme. Encrypts subsample patterns using AES-128 in CBC mode. Supported by Widevine, FairPlay, and PlayReady. This is the recommended scheme for new services because it covers all three DRM systems from a single encryption pass.
If you are building a new service in 2026, use CBCS. If you have existing CENC-encrypted content and need FairPlay, you will need to re-encrypt or maintain a separate FairPlay-encrypted asset.
License server architecture
The DRM license server receives a license challenge from the client, validates the request, and returns a license containing the content decryption key(s). The validation step is where your business logic lives:
- Client sends license challenge to your license proxy (not directly to the DRM provider)
- License proxy validates the request: checks authentication token, verifies entitlement, checks device limits, applies business rules
- License proxy forwards the challenge to the DRM provider (e.g., BuyDRM, PallyCon, Axinom, or your own key server)
- DRM provider returns the license
- License proxy passes the license back to the client
The license proxy is critical. Without it, any client that has the license server URL can request a key. The proxy enforces who gets keys and under what conditions.
Robustness levels
DRM systems define robustness levels that indicate how securely the content is processed:
- Widevine L1: hardware-backed decryption and decoding. Required for HD and 4K content by most content owners. Available on most modern smart TVs and Android devices with secure hardware.
- Widevine L3: software-only decryption. Only suitable for SD content under most studio agreements. Used as fallback when hardware DRM is not available.
- FairPlay: Apple controls the entire hardware pipeline. FairPlay on Apple devices is inherently hardware-backed.
- PlayReady SL3000/SL2000: hardware and software security levels, analogous to Widevine L1/L3.
Your license proxy should check the reported security level and restrict content quality accordingly. A Widevine L3 client should not receive keys for 4K content if your content agreements require L1 for that quality level.
For detailed testing approaches across DRM systems and devices, see our guide on testing DRM playback across devices.
Token-based content authentication
DRM protects the content encryption keys. Token-based authentication protects access to the content streams themselves — the manifest and segment URLs. The two work together: tokens prevent unauthorised access to the stream, and DRM prevents decryption of the content even if someone bypasses the token.
Signed URL tokens
The most common approach: generate time-limited, path-scoped tokens that are appended to manifest and segment URLs. The CDN validates the token on each request and rejects expired or invalid tokens.
Token parameters typically include:
- Expiration time: the token is valid for a fixed window (e.g., 4 hours from issuance)
- Path scope: the token is valid only for a specific content path or path prefix
- IP binding (optional): the token is valid only from the originating IP address. This prevents token sharing but can break legitimate use cases (mobile IP changes, VPN)
- Session ID: ties the token to a specific playback session for tracking and revocation
Token rotation for long sessions
A 4-hour token expiration works for most movies and shows. But for live streams that run for hours, the token may expire mid-session. Solutions:
- Embed token refresh in the player. When a segment request returns 403 (expired token), the player requests a new token from your backend and retries.
- Use longer-lived tokens for live. Accept the slightly higher security risk of an 8-12 hour token for live content, or scope the token to the specific live stream path.
- Session-level tokens. Issue a session token at playback start that remains valid for the entire session duration, validated by the CDN against a session store.
CDN token validation
Major CDNs (Cloudflare, Akamai, Fastly, CloudFront) all support token-based authentication at the edge. The validation happens at the CDN edge, so invalid requests never reach your origin.
Configure the CDN to:
- Validate the token signature (using a shared secret or public key)
- Check token expiration
- Verify path scope
- Return 403 for invalid tokens
- Pass valid requests through to cache or origin
Session management and concurrency control
Content owners often limit the number of concurrent streams per account. Implementing this requires server-side session tracking.
Heartbeat-based session management
The player sends periodic heartbeats to your session service during playback. Each heartbeat refreshes the session’s last-active timestamp. The session service tracks active sessions per account and enforces the concurrency limit.
Implementation:
- Session start: player requests a session token before playback. Session service checks concurrency limit. If under limit, creates a session and returns a token. If at limit, returns an error.
- Heartbeat: player sends a heartbeat every 30-60 seconds. Session service updates the session’s last-active time.
- Session end: player sends an explicit session-end signal when playback stops. If the player crashes or the user closes the app without a clean stop, the session times out after missing 2-3 heartbeats.
Handling stale sessions
Not all playback sessions end cleanly. Network drops, app crashes, and power-off events can leave stale sessions. Set a session timeout of 2-5 minutes (3-5 missed heartbeats) and clean up stale sessions automatically. Do not let stale sessions permanently block users from starting new streams.
Forensic watermarking
For premium content (first-run movies, live sports with exclusive rights), content owners may require forensic watermarking: invisible marks embedded in the video that can trace a pirated copy back to the specific account or device that leaked it.
Server-side watermarking
Two variants of the content are produced with slightly different, imperceptible modifications (e.g., pixel shifts, luma adjustments). The CDN or a proxy selects segments from variant A or B based on a session identifier, creating a unique combination that identifies the session.
This is the industry-standard approach (services like Nagra, Irdeto, and BuyDRM offer it) and does not require any client-side changes. The client plays the stream normally and does not know it is watermarked.
Client-side watermarking
An overlay is rendered on top of the video at the player level. This is cheaper to implement but easier to defeat (the overlay can be removed by recording the screen below the overlay layer).
Client-side watermarking is a deterrent, not a forensic tool. Use it when server-side watermarking is not practical or as an additional layer.
Practical implementation timeline
For a new OTT service implementing content security from scratch:
- Month 1: choose DRM provider and integrate multi-DRM (Widevine + FairPlay + PlayReady). Implement CBCS encryption in your encoding pipeline.
- Month 2: build license proxy with entitlement checking. Implement CDN token authentication.
- Month 3: implement session management with heartbeats and concurrency enforcement. Test DRM playback across all target devices.
- Month 4: integrate forensic watermarking (if required by content agreements). Run security audit and penetration testing.
Content security is not something you can bolt on after launch. The architecture decisions (encryption scheme, license flow, token format) are foundational and expensive to change later. Get them right during initial streaming app architecture design.