EXT-X-BYTERANGE

Says the next media segment is a range of bytes inside a larger file, rather than the whole file at its URI.

Media segment tagNeeds protocol version 4In: Media playlistRFC 8216, section 4.3.2.2

Syntax

#EXT-X-BYTERANGE:<n>[@<o>]

What EXT-X-BYTERANGE means

EXT-X-BYTERANGE says that a media segment is only part of the file at its URI. Instead of storing hundreds of small segment files, a server can keep one large file and describe each segment as a range of bytes inside it. Players then fetch each segment with an HTTP Range request.

The format is #EXT-X-BYTERANGE:<n>[@<o>]:

n
The length of the range, in bytes.
o
Optional. The offset where the range starts, counted in bytes from the start of the file. Without it, the range starts at the byte right after the previous segment's range.

A range of n bytes at offset o covers bytes o to o+n-1. For 1000@0, the HTTP request header is Range: bytes=0-999.

Where it goes

Media playlists only. It applies to the next URI line and nothing else, so each segment that is a range needs its own tag. A segment without the tag is the whole file at its URI.

Rules from RFC 8216

Section 4.3.2.2 sets these rules:

Common mistakes

How players treat it

Players that support byte ranges send one Range request per segment. Ranges are common in I-frame playlists, which point at frames inside the regular segments, and in on-demand streams stored as a single file. Every cache and content delivery network between the player and the server must pass Range requests through correctly for this to work.

Example

#EXTM3U
#EXT-X-VERSION:4
#EXT-X-TARGETDURATION:6
#EXTINF:6.000,
#EXT-X-BYTERANGE:752000@0
lecture.ts
#EXTINF:6.000,
#EXT-X-BYTERANGE:730440
lecture.ts
#EXTINF:4.500,
#EXT-X-BYTERANGE:541440
lecture.ts
#EXT-X-ENDLIST

All three segments live in one file, lecture.ts; the first starts at byte 0 and each later range starts where the previous one ended.

How m3u8.cloud handles it

Supported. When a playlist uses EXT-X-BYTERANGE, m3u8.cloud fetches each piece as a byte range of the larger file instead of downloading the whole file for every piece.

Check the tags in any playlist

Open the m3u8 inspector