HLS Tools - hlsreport critical error cause

Hi,

I'm currently experiencing issues with HLS streams created by FFmpeg running on Safari.

When I pass the stream to the mediastreamvalidator tool and then run hlsreport on the output, I get a critical error reported:

Media Entry discontinuity value does not match previous playlist for MEDIA-SEQUENCE 1

If I let the stream finish (it's a live stream from an IoT device) and then perform the stream validation again I no longer receive the critical error. My assumption is that this critical error is contributing to the HLS stall on iOS.

I have also noticed that if I let the stream continue and then re-load the video control in Safari the stream starts

Is there a resource with explanations or remediation paths relevant to the possible output of the hlsreport?

My m3u8 output looks like this (I have redacted the server host)

#EXTM3U
#EXT-X-VERSION:6
#EXT-X-TARGETDURATION:2
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-PLAYLIST-TYPE:EVENT
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-DISCONTINUITY
#EXTINF:2.000000,
https://redacted.com/segment-00001.ts
#EXTINF:2.000011,
https://redacted.com/segment-00002.ts
#EXTINF:2.000011,
https://redacted.com/segment-00003.ts
#EXTINF:2.000011,
https://redacted.com/segment-00004.ts
#EXTINF:2.000011,
#EXT-X-ENDLIST

Thanks for any advice or guidance possible - if I can provide isolated code snippets I will do.

Andy

Please use Apple's feedback assistant to report this issue. It is recommended to specify the version of the HLS tools you are using and include the output of mediastreamvalidator (.json).

let inspect the playlist history, not only the final .m3u8.

The validator message:

Media Entry discontinuity value does not match previous playlist
for MEDIA-SEQUENCE 1

suggests that the discontinuity state associated with the same media sequence changed between playlist reloads.

Your playlist contains:

#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-DISCONTINUITY

but the example does not include #EXT-X-DISCONTINUITY-SEQUENCE.

For live content that uses EXT-X-DISCONTINUITY, the discontinuity sequence needs to remain consistent as the playlist evolves. I would capture several consecutive playlist responses and compare:

MEDIA-SEQUENCE
DISCONTINUITY-SEQUENCE
position of EXT-X-DISCONTINUITY

for the same media sequence numbers.

Also verify whether the initial EXT-X-DISCONTINUITY is actually required. It should represent a real encoding/timestamp discontinuity, not simply mark the beginning of the event.

A useful A/B test would be:

A. Current playlist
B. Remove the initial DISCONTINUITY if it is unnecessary
C. Explicitly maintain DISCONTINUITY-SEQUENCE across playlist updates

Then run mediastreamvalidator while the event is live.

The final static playlist may validate successfully even if one of the intermediate live playlist snapshots was inconsistent. For live HLS, validating the evolution of the playlist is as important as validating the final manifest.

HLS Tools - hlsreport critical error cause
 
 
Q