Início / Conhecimento / Avançado
HLS Encryption and DRM: The Security Layer in Your Playlist
Este artigo está disponível em chinês e inglês; a tradução para português está a caminho.
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.