EXT-X-SESSION-KEY

Announces in the master playlist an encryption key used by the media playlists, so players can fetch it early.

Master playlist tagAny protocol versionIn: Master playlistRFC 8216, section 4.3.4.5

Syntax

#EXT-X-SESSION-KEY:<attribute-list>

Attributes

AttributeValueRequiredWhat it means
METHODAES-128 or SAMPLE-AES (NONE is not allowed)YesHow 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.
URIURI of the keyYesWhere the key can be obtained. Required because the method can never be NONE.
IV128-bit number starting with 0xNoInitialization vector used with the key, as in EXT-X-KEY. Needs version 2.
KEYFORMAT"identity" or a key system identifier
Default: "identity"
NoHow the key is represented at the URI. DRM systems use their own values. Needs version 5.
KEYFORMATVERSIONSPositive integers separated by /, such as "1"
Default: "1"
NoWhich 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:

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

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.m3u8

Both 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.

Check the tags in any playlist

Open the m3u8 inspector