Your segments may have discontinuities between them. If so you will need to enter the tag
#EXT-X-DISCONTINUITYbetween them. The HLS spec specifies that you need to mark discontinuities in the following scenarios:
- file format
- number, type, and identifiers of tracks
- timestamp sequence
See Section 22.214.171.124: https://tools.ietf.org/html/rfc8216
What it reports for segment duration is the difference between the start time stamp of this segment and the start time stamp of the next segment.
So a negative means that the time stamp jumps back.
I have duration issue too, but with invalid positive duration.
Could you please give more explanation, which time stamps are used? Is it only video frames PTSs or audio frames counts too? Should a frame be keyframe or not?
mediastreamvalidator is looking at PTS (or PCR?) in the actual segment file and matchign it to playlist metadata. There is not standard for this but the EXTINF section kind of impiies it should be reasonably accurate.
If it's under some percentage value (Apple please share this!!!) Mediastreamvalidator reports these as "SHOULD Fix". Clearly negative is not, and will cause many players to fail.