Different EXT-X-DISCONTINUITY between audio and video

I have a live presentation where the encoder was not sending data for different times for audio and video. For example:

Audio: 1, 2, 3, -, -, 6, -, -, 9
Video: 1, 2, 3, -, -, -, -, -, 9

Should the packager emit 2 discontinuity tags for audio or just discard timestamp 6 and merge them into 1 discontinuity?

Section 8.15 of the HLS authoring spec says:
"All variants and renditions MUST have discontinuities at the same points in time."

Does this mean that for audio/video and text variants all need to align?

However the documentation for EXT-X-DISCONTINUITY-SEQUENCE seems to imply that a/v may not necessarily have the same count of discontinuities. Please clarify which is correct and how the packager should have emitted the discontinuity tags above.

Thanks!

Replies

As far as I understand it, HLS expects that all media playlists should present the same durations of content between discontinuities.

For example, if the playlist for video A has 20 seconds of content, a discontinuity, 190 seconds of content, a discontinuity, and 30 seconds of content; then any other parallel playlist must have the same pattern of domains and durations. The durations need not be exactly precise, but should be close.

More importantly, the time stamps in the content should match up. That is, each discontinuity domain should start with the same timestamp as every corresponding domain.

If you have missing content from your contribution feed, the best approach is to fill the missing regions with dummy segments that are marked with the EXT-X-GAP tag. This will tell the player to avoid those regions of those bitrates (switching down if it has to) or playing silence / no video if it cannot avoid them, until it reaches non-gap segments again. EXT-X-GAP tags do not have to be aligns across renditions.

Thank you for your answers above.

What are the restriction and limitations for the EXT-X-GAP tag that we should be aware of? Do latest iOS and MacOS platforms support it? We are still seeing stalls on iOS playback using the EXT-X-GAP tag.

We also found that other HLS players do not deal with the GAP tag gracefully and would stall playback as well.