In this guide
Sequence and resource name are separateUse the timeline for time arithmeticSequence context improves a failure reportEXT-X-MEDIA-SEQUENCE gives the media sequence number of the first segment listed in an HLS media playlist. Following segments receive consecutive numbers within that playlist. When older segments leave a live window, the first listed sequence usually advances.
The number identifies position in that playlist’s sequence. It is not a channel number, a count of viewers, an encoded time of day or a universal identifier shared by every rendition.
Sequence and resource name are separate
A segment URI does not have to contain its media sequence number. One publisher might use numbered filenames, another might use opaque identifiers, and byte-range delivery may reuse a resource URL. Reading a filename as a timestamp without evidence is therefore unreliable.
An original hypothetical snapshot begins at sequence 700 and contains five segments. Their assigned numbers are 700 through 704, even if their resource names are apple.ts, birch.ts and other unrelated words. If the next snapshot begins at 702, that identifies a changed first listed position; it does not say that two seconds elapsed.
Use the timeline for time arithmetic
To estimate the media span removed between snapshots, sum the relevant segment durations rather than subtracting sequence values and treating the result as seconds. If segment durations vary, a difference of two numbers may represent different amounts of media time in different presentations.
Similarly, matching media sequence values across video and audio playlists is not enough to establish exact sample alignment. Track timestamps and the presentation’s synchronization rules matter. The protocol warns clients against assuming equivalence solely from matching numbers.
Sequence context improves a failure report
A failed segment report becomes clearer when it includes the media playlist’s first sequence, the failed item’s relative position and the retrieval time. This helps distinguish a resource referenced by the current window from one left over in an old client snapshot.
Unexpected sequence behavior can be evidence of a publishing transition, a stale response or a new presentation, but the number alone does not determine the cause. Preserve surrounding tags such as discontinuities and finalization indicators. Avoid rewriting the sequence to force a player onward; that changes the meaning of the saved evidence without repairing missing resources or timestamps.
