HLS Encryption and DRM: The Security Layer in Your Playlist

この記事は中文と英語で提供されています。日本語訳は準備中です。

Some M3U8 playlists contain a #EXT-X-KEY tag, which means the segments are encrypted. Understanding how it works explains a lot of "why won't it play" cases.

AES-128 encryption

HLS supports standard AES-128 encryption. The playlist declares the algorithm and a key URI; the player fetches the key before playback and decrypts each segment. The key itself is retrieved with a separate HTTP request, often requiring a token or source verification.

DRM systems

Stronger protection uses DRM such as FairPlay (Safari), Widevine (Chrome and others) and PlayReady. It is declared through the METHOD attribute of #EXT-X-KEY; keys are managed by the DRM system, and ordinary tools cannot decrypt the content.

Impact on playback and conversion

A web player can decrypt and play automatically if it can reach the key URI and CORS allows it; DRM-protected content must be viewed in a client that supports the corresponding DRM. Trying to bypass encryption or DRM is difficult and may be illegal — our tools are meant only for content you have the right to access.
← Understanding and Reducing HLS Live LatencySubtitles and Multiple Audio Tracks in HLS →