shaka-player icon indicating copy to clipboard operation
shaka-player copied to clipboard

HLS live stream chunklist has to have more than 3 chunks

Open Andekas opened this issue 6 months ago • 3 comments

Have you read the FAQ and checked for duplicate open issues? Yes

Is your feature request related to a problem? Please describe.

Kind of. We discovered that when using HLS live stream, there has to be more than 3 chunks in the chunklist. With 3 chunks, the buffer stays empty and the next chunk is loaded pretty much at the last second, causing small buffering between chunks.

If chunklist contains more chunks, then there is always one extra in buffer and playback is smooth.

Describe the solution you'd like

I guess that this info should be added to FAQ/Tutorials doc

Describe alternatives you've considered

Additional context

Andekas avatar Feb 07 '24 12:02 Andekas

It's already documented in the description of the defaultPresentationDelay configuration.

A default presentationDelay value. For DASH, it's a default presentationDelay value if suggestedPresentationDelay is missing in the MPEG DASH manifest. The default value is 1.5 * minBufferTime if not configured or set as 0. For HLS, the default value is 3 segments duration if not configured or set as 0.

https://shaka-player-demo.appspot.com/docs/api/shaka.extern.html#.ManifestConfiguration

absidue avatar Feb 07 '24 17:02 absidue

I suppose we could also add it to the FAQ, which is probably more visible to developers than the description of a configuration value.

theodab avatar Feb 08 '24 08:02 theodab

I agree with @theodab . Now that you mentioned it, yes I can see that it is documented. But it is hard to find, if you don't know what you are looking for. The symptom is live stream lagging; buffer visualizer shows that chunks are not buffered / are requested at last second. What's the reason? I ended up comparing our stream with some Akamai test stream; same player conf; found out that Akamai chunklist is a lot larger. Tested and verified that this was the case.

But if there would be something like this in the FAQ, it would of made finding the issue a lot easier:

Q: My player keeps buffering after each chunk when streaming live. A: It is reccomended to have more than 3 chunks in your chunklist. If this is not possible, then you have to change the presentationDelay value. Read more about manifest configuration here.

Andekas avatar Feb 08 '24 10:02 Andekas