shaka-player
shaka-player copied to clipboard
HLS live stream chunklist has to have more than 3 chunks
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
It's already documented in the description of the defaultPresentationDelay
configuration.
A default
presentationDelay
value. For DASH, it's a defaultpresentationDelay
value ifsuggestedPresentationDelay
is missing in the MPEG DASH manifest. The default value is1.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
I suppose we could also add it to the FAQ, which is probably more visible to developers than the description of a configuration value.
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.