Skip to content
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

Hiccups when clearing buffer #520

Closed
yairans opened this issue Sep 15, 2016 · 9 comments
Closed

Hiccups when clearing buffer #520

yairans opened this issue Sep 15, 2016 · 9 comments
Assignees
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@yairans
Copy link

yairans commented Sep 15, 2016

Hi,
I would like to tell shaka do not clear the buffer when it switches between the video track automatically (when adaptation is enabled). The buffer clearing causes hiccups on IE11.
Is there a way to configure this behaviour?

Yair

@dobrusev
Copy link

I'm using DASH with Widevine and I see the same behavior - hiccuping in chrome.
Sometimes I see glitches during playback as well.

When I compare I have a better performance without glitches on the old version of shaka.

I agree with Yair. It will be nice if there is a solution in the default configuration that can be made for better performance.

@joeyparrish
Copy link
Member

Hi Yair, Dobrin,

We are working on it and hope to release improvements in v2.0.1 as soon as feasible. Thanks!

@joeyparrish joeyparrish self-assigned this Sep 30, 2016
@joeyparrish
Copy link
Member

joeyparrish commented Sep 30, 2016

In a8ac314 we made buffer clearing explicit and more flexible for calls to selectTrack(). When the ABR manager is making the call, though, it still decides if/when/how to clear the buffer.

@dobrusev
Copy link

dobrusev commented Oct 3, 2016

That was fast!

Thanks Joey Parrish.
I will try it now and update you guys here.

@dobrusev
Copy link

dobrusev commented Oct 4, 2016

After retesting I don't see any hiccuping in chrome. And the switches between the video tracks is smooth.

Again thanks for the great work!

@joeyparrish
Copy link
Member

The thing that fixed it was probably when we switched from clearing 10 seconds ahead to clearing 2 segments ahead. Clearing based on segment size reflects the reality of how MediaSource works, while 10 seconds was only a guess at the segment size anyway.

@yairans, can you confirm that this has improved things for you as well?

@joeyparrish joeyparrish added the type: bug Something isn't working correctly label Oct 4, 2016
@joeyparrish joeyparrish changed the title Configure buffer clearing on bitrate switching Hiccups when clearing buffer Oct 4, 2016
@joeyparrish joeyparrish added this to the v2.1.0 milestone Oct 4, 2016
@joeyparrish joeyparrish added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Oct 5, 2016
@yairans
Copy link
Author

yairans commented Oct 6, 2016

@joeyparrish
It plays perfect now.
Thank you.

@joeyparrish joeyparrish removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Oct 6, 2016
@joeyparrish
Copy link
Member

Excellent! Thank you for retesting.

@joeyparrish
Copy link
Member

I'm now seeing hiccups on ChromeOS and Chrome Linux. The hiccup occurs when an upgrade decision is made, specifically caused by clearing content that is ahead of the playhead.

More testing is needed on other browsers/platforms.

shaka-bot pushed a commit that referenced this issue Oct 20, 2016
Clearing ahead of the playhead is causing hiccups in playback on the
following browsers:
 * Chrome (all platforms, inconsistent)
 * Edge

These browsers appear not to be affected:
 * IE 11
 * Firefox
 * Safari

This is a manual change that reverts almost all of:
 * a8ac314 - Make buffer clearing behavior explicit
 * 4593cf7 - Check position against null, fix bug in a8ac314
 * 10b3dd0 - Seek after clearing a buffer, workaround Chrome bug
 * 6daa7f3 - Allow AbrManager to clear ahead of the playhead

Clearing the buffer is now an all-or-nothing proposition because that
is the only way to get consistent playback quality across browsers.
This comes at a cost, because we can no longer count on the ability to
remove buffered data on upgrade without a stutter.

Issue #520

Change-Id: Ia6f8b2fcb223f9c50e9829b26d7003ae8f6efb8d
joeyparrish added a commit that referenced this issue Oct 25, 2016
This is a manual roll-up of the following commits from master:
 - Make buffer clearing behavior explicit
 - Check position against null, not zero
 - Seek after clearing a buffer. Workaround for a Chrome bug.
 - Stop clearing the buffer ahead of the playhead

The last of those commits obviates the earlier changes.  All four
together constitute a step forward in ABR quality.

Issue #520
joeyparrish added a commit that referenced this issue Oct 25, 2016
Since we no longer clear ahead of the playhead, the only way to assure
responsive visual upgrade is not to buffer too far ahead.  Therefore
our new default buffering goal is 10 seconds instead of 30 seconds.

Manual testing using Chrome's network throttling feature has shown
no increase in buffering rates, so 10 seconds seems to be enough for
stable connections.

For situations in which 10 seconds is not enough, the bufferingGoal
setting can still be customized by the application.

Closes #520

Change-Id: I248c1c93dd4cdd037e6e3ca12bb207ba54845836
@shaka-project shaka-project locked and limited conversation to collaborators Mar 22, 2018
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

4 participants