EXT-X-STREAM-INF

Defines one variant stream, usually a quality level, and points to its media playlist on the next line.

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

Syntax

#EXT-X-STREAM-INF:<attribute-list> <URI>

Attributes

AttributeValueRequiredWhat it means
BANDWIDTHBits per second, such as 5400000YesThe peak bit rate of the variant, including any audio or other renditions it combines with.
AVERAGE-BANDWIDTHBits per secondNoThe average bit rate of the variant. Closer to the real file size than BANDWIDTH.
CODECSRFC 6381 codec list, such as "avc1.640028,mp4a.40.2"No, but should be presentEvery media format used by the variant, so players can skip variants they cannot decode.
RESOLUTIONWIDTHxHEIGHT, such as 1920x1080No, recommended for videoThe best pixel size at which to display the video.
FRAME-RATEFrames per second, up to three decimals, such as 29.970No, recommended for videoThe maximum frame rate of the video. Should be present if any video exceeds 30 frames per second.
HDCP-LEVELTYPE-0 or NONENoWhether the variant may fail to play without HDCP output protection. Players without it should skip variants unless the value is NONE. Added in the RFC 8216bis draft: the TYPE-1 value.
AUDIOGROUP-ID of an AUDIO groupNoThe group of EXT-X-MEDIA audio renditions to use with this variant.
VIDEOGROUP-ID of a VIDEO groupNoThe group of alternative video renditions, such as camera angles, for this variant.
SUBTITLESGROUP-ID of a SUBTITLES groupNoThe group of subtitle renditions that can be used with this variant.
CLOSED-CAPTIONSGROUP-ID of a CLOSED-CAPTIONS group, or NONENoThe closed-caption group for this variant. NONE means no variant has captions, and then every variant must say NONE.
SCOREPositive number; higher is betterNoThe playlist author's ranking of variants by quality of experience. If one variant has it, all should. Added in the RFC 8216bis draft.
SUPPLEMENTAL-CODECSCodec list, such as "dvh1.08.07/db4h"NoEnhancement layers, such as Dolby Vision, carried on top of a base codec listed in CODECS. Added in the RFC 8216bis draft.
VIDEO-RANGESDR, HLG or PQ
Default: SDR
NoWhether the video is standard dynamic range or uses an HDR transfer function. Added in the RFC 8216bis draft.
ALLOWED-CPCKEYFORMAT followed by : and labels, such as "com.example.drm1:SMART-TV/PC"NoLimits an encrypted variant to devices with a given level of content protection. Added in the RFC 8216bis draft.
STABLE-VARIANT-IDLetters, digits and + / = . - _NoA stable identifier for the variant that stays the same even if its URI changes between downloads of the master playlist. Added in the RFC 8216bis draft.
PATHWAY-IDPathway name
Default: "."
NoThe Content Steering pathway, such as a particular CDN, that the variant belongs to. Added in the RFC 8216bis draft.

What EXT-X-STREAM-INF means

EXT-X-STREAM-INF defines a variant stream: one complete version of the presentation, usually one quality level such as 1080p or 480p. Its attributes describe the variant, and the URI on the next line points to that variant's media playlist. A master playlist with five EXT-X-STREAM-INF tags offers five variants.

Where it goes

Master playlists only, one tag per variant. The URI line that follows the tag is required. A relative URI is resolved against the address of the master playlist.

Rules from RFC 8216

Section 4.3.4.2 and section 6.2.4 set these rules:

Older playlists may carry PROGRAM-ID=1. That attribute was removed in protocol version 6, and current players ignore it. The RFC 8216bis draft adds several attributes, listed below, such as VIDEO-RANGE for HDR video and SCORE for ranking variants.

Common mistakes

How players treat it

Players first drop variants they cannot play, based on attributes such as CODECS and HDCP-LEVEL. They then measure the connection and pick the best variant whose BANDWIDTH fits, switching up or down as conditions change. This is adaptive bitrate streaming. Where a player has a quality menu, its labels usually come from RESOLUTION.

Example

#EXTM3U
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-STREAM-INF:BANDWIDTH=5400000,AVERAGE-BANDWIDTH=4800000,RESOLUTION=1920x1080,FRAME-RATE=29.970,CODECS="avc1.640028,mp4a.40.2"
1080p/index.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2900000,AVERAGE-BANDWIDTH=2500000,RESOLUTION=1280x720,FRAME-RATE=29.970,CODECS="avc1.64001f,mp4a.40.2"
720p/index.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1200000,AVERAGE-BANDWIDTH=1000000,RESOLUTION=854x480,FRAME-RATE=29.970,CODECS="avc1.4d401e,mp4a.40.2"
480p/index.m3u8

Three variant streams of the same video; the URI line under each tag points to that quality's media playlist.

How m3u8.cloud handles it

Each EXT-X-STREAM-INF becomes a quality option in m3u8.cloud. RESOLUTION gives the label, for example 1080p, and AVERAGE-BANDWIDTH, or BANDWIDTH when there is no average, gives the estimated file size.

Because BANDWIDTH is a peak value, estimates based on it tend to come out larger than the real file.

Check the tags in any playlist

Open the m3u8 inspector