-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop using playback rate manipulation for buffer management #7602
Comments
We will leave the issue open for a week so that the community can give their opinion, if there are no opinions in a week we will implement solution 1! |
Hi all,
Happy to discuss this in the SVTA Players & Playback WG call if required. |
Sounds like at the very least we should decouple the usage of For removing the feature, any concerns for feature flagging it, at least in the interim? Or will that be the approach for removing it long term? I guess we probably would want it to be configurable at runtime as well, if we do. |
Keeping both options adds complexity and makes maintenance more complicated. I would prefer not to add both options. |
Would it be possible to implement option 1 and also supply an API for external buffer management? Allowing the consumer to intercept segments before they are fed to the source buffer |
Does that differ from the network response filters we have, where you can intercept network responses in an async callback and inspect and/or modify them before we consume them? |
I thought about it, but I'm not sure it's good to try to mix a potential buffer management API which might delay responses from resolving for a long time with network request/retry/timeout settings, but maybe those settings are no longer in use after the response filter has triggered. To keep things decoupled from the network intercept API, the buffer API could live closer to the SourceBuffer, allowing Shaka to process the resolved response before handing over to a potential BufferManager. It's probably more future proof, in case Shaka again wants to update how it handles buffering. |
Related to #7602 (comment) From 23009-1: The value of the minimum buffer time does not provide any instructions to the client on how long to buffer the media. The value however describes how much buffer a client should have under ideal network conditions. As such, MBT is not describing the burstiness or jitter in the network, it is describing the burstiness or jitter in the content encoding. Together with the BW value, it is a property of the content. Using the "leaky bucket" model, it is the size of the bucket that makes BW true, given the way the content is encoded
Have you read the FAQ and checked for duplicate open issues?
Yes
Is your feature request related to a problem? Please describe.
Currently shaka manipulates
playbackRate
to control the buffer, i.e. if we think player is starving, we're settingplaybackRate
to 0 to prevent playback until buffer is fulfilled. Unfortunately, this behavior causes some issues:playbackRate
prevents this issue.playbackRate=0
at all.I know there was already an attempt to stop manipulate playback rate and rely completely on media element events, but it has been reverted due to issues it caused around
rebufferingGoal
handling.Describe the solution you'd like
We're thinking about potential solutions and 2 comes to my mind for now:
rebufferingGoal
andminBufferTime
. It's harsh but relatively easy to implement. I think other JS players are working like that.SegmentPrefetch
for buffer management - push data only there untilrebufferingGoal
is reached, when it's ready move this data to SourceBuffers. We could keep our configs then, but implementation can be tricky.Describe alternatives you've considered
Additional context
In dash.js
minBufferTime
is used only to calculate presentation delay if there is nosuggestedPresentationDelay
set.For a
rebufferingGoal
equivalent, looking at config there's onlyinitialBufferLevel
(defaults toNaN
), that is used to wait for enough data in buffer to start playback. I think playback is prevented by not havingautoplay
attribute in video element and explicitly calledplay()
when buffer is fulfilled.Previous work in this area:
Are you planning send a PR to add it?
Yes, either me or one of my team mates are happy to work on it, once we agree on what solution is most suitable.
The text was updated successfully, but these errors were encountered: