BASSHLS stalls on a session-based live stream (discontinuity on every segment)

Started by ekstro,

ekstro

Hi,

A live HLS stream (Amperwave CDN, "hlsc2" profile) plays fine for ~30 s in BASSHLS and then keeps stalling/resuming every few seconds. Tested with BASS 2.4.18.3 + BASSHLS 2.4.5 (and older builds).

The stream:
- media playlist: VERSION 7, TARGETDURATION 10, MEDIA-SEQUENCE always 0 on reload, segments are plain AAC with ID3, each 4.85 s, every one preceded by EXT-X-DISCONTINUITY and PROGRAM-DATE-TIME
- session based (Set-Cookie with 60 s max-age, Connection: close); a new master request starts a new session with a ~29 s window
- PROGRAM-DATE-TIME of consecutive 4.85 s segments is ~10 s apart, so only ~4.85 s of audio appears per ~10 s

Measurements: BASSHLS consumed in real time gets 48.5 s of audio per 60 s (gaps every ~7 s after the first 40 s); BASS_CONFIG_HLS_DELAY doesn't help (window is only ~29 s). ffmpeg gets the same URL at 0.57x, so it may just be the source. Another stream from the same CDN ("hlsc3", 10 s segments, rare discontinuities) plays at 100%.

Questions:
1. With MEDIA-SEQUENCE never changing, how does BASSHLS detect new segments, and does it keep the session cookie across playlist reloads and segment requests?
2. Is there any option/reload strategy that could keep such a stream going, or is it simply an under-delivering source?

I can send the stream URL by PM.

Thanks!

Ian @ un4seen

Please PM me the URL to have look at.

Is it playing well for you in any other software, eg. in your browser? If you have access to another internet connection, you could also try it on that for comparison.