Syntax
Attributes
| Attribute | Value | Required | What it means |
|---|---|---|---|
| BANDWIDTH | Bits per second, such as 5400000 | Yes | The peak bit rate of the variant, including any audio or other renditions it combines with. |
| AVERAGE-BANDWIDTH | Bits per second | No | The average bit rate of the variant. Closer to the real file size than BANDWIDTH. |
| CODECS | RFC 6381 codec list, such as "avc1.640028,mp4a.40.2" | No, but should be present | Every media format used by the variant, so players can skip variants they cannot decode. |
| RESOLUTION | WIDTHxHEIGHT, such as 1920x1080 | No, recommended for video | The best pixel size at which to display the video. |
| FRAME-RATE | Frames per second, up to three decimals, such as 29.970 | No, recommended for video | The maximum frame rate of the video. Should be present if any video exceeds 30 frames per second. |
| HDCP-LEVEL | TYPE-0 or NONE | No | Whether 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. |
| AUDIO | GROUP-ID of an AUDIO group | No | The group of EXT-X-MEDIA audio renditions to use with this variant. |
| VIDEO | GROUP-ID of a VIDEO group | No | The group of alternative video renditions, such as camera angles, for this variant. |
| SUBTITLES | GROUP-ID of a SUBTITLES group | No | The group of subtitle renditions that can be used with this variant. |
| CLOSED-CAPTIONS | GROUP-ID of a CLOSED-CAPTIONS group, or NONE | No | The closed-caption group for this variant. NONE means no variant has captions, and then every variant must say NONE. |
| SCORE | Positive number; higher is better | No | The playlist author's ranking of variants by quality of experience. If one variant has it, all should. Added in the RFC 8216bis draft. |
| SUPPLEMENTAL-CODECS | Codec list, such as "dvh1.08.07/db4h" | No | Enhancement layers, such as Dolby Vision, carried on top of a base codec listed in CODECS. Added in the RFC 8216bis draft. |
| VIDEO-RANGE | SDR, HLG or PQ Default: SDR | No | Whether the video is standard dynamic range or uses an HDR transfer function. Added in the RFC 8216bis draft. |
| ALLOWED-CPC | KEYFORMAT followed by : and labels, such as "com.example.drm1:SMART-TV/PC" | No | Limits an encrypted variant to devices with a given level of content protection. Added in the RFC 8216bis draft. |
| STABLE-VARIANT-ID | Letters, digits and + / = . - _ | No | A 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-ID | Pathway name Default: "." | No | The 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:
BANDWIDTHis required. It is the peak bit rate in bits per second; for finished content, the highest combined rate of any playable combination of renditions. An inaccurate value can cause stalls or stop the variant from playing.AVERAGE-BANDWIDTHis optional and gives the average rate.CODECSshould always be present. When it is, it must list every media format in every rendition the variant can use, including audio from separate groups.RESOLUTIONis recommended for video.FRAME-RATEis recommended for video and should be present if any video exceeds 30 frames per second.AUDIO,VIDEO,SUBTITLESandCLOSED-CAPTIONSmust match theGROUP-IDof anEXT-X-MEDIAgroup of the right type. If any variant usesCLOSED-CAPTIONS=NONE, all of them must.- Every playable combination of renditions must fit within
BANDWIDTH. - All variants must present the same content with matching timestamps, matching discontinuities and the same target duration, so players can switch between them.
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
BANDWIDTHset to the average. Players then pick a variant the connection cannot sustain at its peaks, and playback stalls.- Missing
CODECS. Players have to guess, or download a segment first, and some skip a variant they cannot confirm they can play. - The audio codec left out of
CODECSwhen the audio comes from a separate group. - A
RESOLUTIONthat does not match the video. Players and tools label qualities from it, so a wrong value means a wrong label.
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.m3u8Three 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.
Related tags
Check the tags in any playlist
Open the m3u8 inspector