I'm inspecting about #EXT-X-DISCONTINUITY-SEQUENCE
tag in m3u8 file of HLS.
(https://datatracker.ietf.org/doc/html/draft-pantos-http-live-streaming-23#section-4.3.3.3)
Does somebody can explain the working way of it?
For example, let's suppose that m3u8 file is made for live streaming like below,
After 2 seconds segment1.060.ts, file.000.ts will be gone from list and #EXT-X-DISCONTINUITY tag too.
after all file.001.ts is going to be first media segment in the list.
At this state, what sequence number should be in #EXT-X-MEDIA-SEQUENCE
, #EXT-X-DISCONTINUITY-SEQUENCE
?
#EXT-X-DISCONTINUITY
should be put in front of file.001.ts line again?
#EXTM3U
#EXT-X-VERSION:6
#EXT-X-MEDIA-SEQUENCE:60
#EXT-X-DISCONTINUITY-SEQUENCE:0
#EXT-X-ALLOW-CACHE:NO
#EXT-X-TARGETDURATION:2
#EXTINF:0.933600,
segment1.060.ts
#EXT-X-DISCONTINUITY
#EXTINF:0.966911,
file.000.ts
#EXTINF:1.000489,
file.001.ts
Best Answer
The reason why
EXT-X-DISCONTINUITY-SEQUENCE
must be used for synchronization across variants is explained in the standard:and
Back to your question:
EXT-X-DISCONTINUITY
marks a discontinuity between two consecutive segments. Your discontinuity is betweensegment1.060.ts
andfile.000.ts
. There is no discontinuity betweenfile.000.ts
andfile.001.ts
so no need to re-insert the tagEXT-X-DISCONTINUITY
from the playlist you must increment theEXT-X-DISCONTINUITY-SEQUENCE
EXT-X-MEDIA-SEQUENCE