Syntax
Attributes
| Attribute | Value | Required | What it means |
|---|---|---|---|
| METHOD | AES-128 or SAMPLE-AES (NONE is not allowed) | Yes | How the segments that use this key are encrypted. Must match the EXT-X-KEY tags with the same URI. Added in the RFC 8216bis draft: the optional methods SAMPLE-AES-CTR and AES-256-GCM. |
| URI | URI of the key | Yes | Where the key can be obtained. Required because the method can never be NONE. |
| IV | 128-bit number starting with 0x | No | Initialization vector used with the key, as in EXT-X-KEY. Needs version 2. |
| KEYFORMAT | "identity" or a key system identifier Default: "identity" | No | How the key is represented at the URI. DRM systems use their own values. Needs version 5. |
| KEYFORMATVERSIONS | Positive integers separated by /, such as "1" Default: "1" | No | Which versions of the key format the key works with. Needs version 5. |
What EXT-X-SESSION-KEY means
EXT-X-SESSION-KEY lets a master playlist announce the encryption keys used in its media playlists. A player can then start fetching keys, or a DRM license, before it loads any media playlist, which shortens the wait before playback starts.
It takes the same attributes as EXT-X-KEY: METHOD, URI, IV, KEYFORMAT and KEYFORMATVERSIONS.
Where it goes
Master playlists only. The tag is optional. It is not tied to any particular media playlist, and a master playlist can list several keys.
Rules from RFC 8216
Section 4.3.4.5 sets these rules:
METHODmust not beNONE. A session key always describes encryption.METHOD,KEYFORMATandKEYFORMATVERSIONSmust match anyEXT-X-KEYwith the sameURIin the media playlists.- Session keys should be added when several variants or renditions use the same keys and formats.
- A master playlist must not contain two session keys with the same
METHOD,URI,IV,KEYFORMATandKEYFORMATVERSIONS.
The tag does not replace EXT-X-KEY. RFC 8216 still requires every encrypted segment to have an EXT-X-KEY applied in its media playlist.
Common mistakes
- A session key that no longer matches the keys in the media playlists, for example after keys are rotated but the master playlist is not updated.
METHOD=NONE, which is not allowed here.- Relying on it alone. Players that do not use session keys still need the
EXT-X-KEYtags in each media playlist.
How players treat it
Players that support session keys request the key or license early and reuse it when they reach segments with a matching EXT-X-KEY. Players that do not support the tag skip it and get the keys from the media playlists. For a tool that saves video, a session key is a clear sign that the stream is encrypted.
Example
#EXTM3U
#EXT-X-SESSION-KEY:METHOD=AES-128,URI="https://example.com/keys/k1.bin"
#EXT-X-STREAM-INF:BANDWIDTH=2900000,RESOLUTION=1280x720,CODECS="avc1.64001f,mp4a.40.2"
720p/index.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1200000,RESOLUTION=854x480,CODECS="avc1.4d401e,mp4a.40.2"
480p/index.m3u8Both qualities use the same AES-128 key, so the master playlist announces it once; each media playlist still carries its own matching EXT-X-KEY tag.
How m3u8.cloud handles it
Any EXT-X-SESSION-KEY in a master playlist means the stream is encrypted, so m3u8.cloud refuses it and explains why. It never fetches keys and never decrypts.
Related tags
Check the tags in any playlist
Open the m3u8 inspector