DREAM 4K IPTV · FROM USD $8.99 / 1 MONTHInstall your player. Request a one-day trial
Worldwide viewing guides
Dream 4K · technical

HLS byte-range segments

Understand how several HLS segments can occupy different byte ranges of one HTTP resource.

HLS byte-range segments — illustrated reference table
In this guideLength and offset have different meaningsThe HTTP response supplies another layer of evidencePreserve context before reporting a failure

HLS can describe a media segment as a byte range inside a resource instead of assigning every segment a separate file. EXT-X-BYTERANGE supplies the range length and, where present, its offset. A player then retrieves the appropriate portion through HTTP range mechanisms.

This packaging means repeated requests to one filename can represent different segments. Counting unique URLs is therefore not a reliable way to count playable segments.

Length and offset have different meanings

A range length says how many bytes belong to the segment. An offset says where that range begins. When the offset is omitted, HLS defines a continuation relationship subject to its rules; it is not a general instruction to start at byte zero.

An original hypothetical range has length 1,000 bytes and starts at offset 2,000. Its inclusive byte positions are 2,000 through 2,999. The ending index is offset plus length minus one. Confusing a length with an ending index is a common arithmetic error when reading logs.

The HTTP response supplies another layer of evidence

A successful single-range response commonly uses 206 Partial Content and a Content-Range field. The status is expected behavior for a partial request, not an indication that the server sent a damaged fraction of a complete video by mistake. The exact response must still match the request semantics.

A server can respond differently when it ignores a range or when a requested range cannot be satisfied. Diagnose from the request headers, response status and range metadata together; a media filename alone cannot explain what happened.

HLS conceptHTTP-facing question
Resource URIWhich object is addressed?
Byte offsetWhere does this segment begin?
Byte lengthHow much data belongs to it?
Response rangeDid the response correspond to the requested portion?

Preserve context before reporting a failure

Keep the relevant BYTERANGE line, its resource URI role and the Range/Content-Range values if available. Redact secret query parameters and authorization fields. One failed range may identify a packaging or delivery problem even when another range in the same resource succeeds. Replacing the URL with a new filename does not repair inconsistent offsets or resource contents.

READY FOR YOUR FIRST SCREEN?

Your device.
A clear next step.

Confirm the device and player first. Once the appropriate app is installed, request the one-day free trial.