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

Improve abandon request rule #3840

Closed
5 tasks done
bbert opened this issue Jan 3, 2022 · 6 comments
Closed
5 tasks done

Improve abandon request rule #3840

bbert opened this issue Jan 3, 2022 · 6 comments
Assignees
Milestone

Comments

@bbert
Copy link
Contributor

bbert commented Jan 3, 2022

Environment
Steps to reproduce
  1. Please provide clear steps to reproduce your problem

  2. open reference test page

  3. Open options and enable AbandonRequestsRule

  4. Load the content on netwrok with high bandwith

  5. wait for buffer to be full at highest quality

  6. open browser dev tools and limit network for example to 500kb/s

  7. If the bug is intermittent, give a rough frequency if possible

Observed behavior

Once a segment is abandonned, next segment will still be downloaded at the highest quality
=> the measured bandwith of the abandonned segment is not considered when determining next quality

Console output
[74282][StreamProcessor][video] OnFragmentLoadingCompleted for stream id defaultId_0 and media type video - Url: https://media.axprod.net/TestVectors/v7-MultiDRM-SingleKey/5/0021.m4s  
14:45:09.334 Debug.js:169 [74289][BufferController][video] Buffered range: 40 - 83.999999, currentTime =  59.883171 
14:45:09.335 Debug.js:169 [74289][ScheduleController][video] Appended bytes for video and stream id defaultId_0 
14:45:09.339 Debug.js:169 [74294][ScheduleController][video] Media segment needed for video and stream id defaultId_0 
14:45:09.339 Debug.js:169 [74294][StreamProcessor][video] Next fragment request url for stream id defaultId_0 and media type video is https://media.axprod.net/TestVectors/v7-MultiDRM-SingleKey/5/0022.m4s 
14:45:17.965 Debug.js:169 [82920][BufferController][video] video: Removing buffer from: 0 to 48.514618999999996 
14:45:17.966 Debug.js:169 [82921][BufferController][video] onRemoved buffer from: 0 to 48.514618999999996 
14:45:17.966 Debug.js:169 [82921][BufferController][video] Buffered range: 50 - 83.999999, currentTime =  68.516421 
14:45:32.600 Debug.js:169 [97555][AbandonRequestsRule] [video] frag id 21  is asking to abandon and switch to quality to  0  measured bandwidth was 522 
14:45:32.601 Debug.js:169 [97556][FragmentModel][video] abort requests 
14:45:32.601 Debug.js:169 [97556][StreamProcessor][video] onFragmentLoadingAbandoned request: https://media.axprod.net/TestVectors/v7-MultiDRM-SingleKey/5/0022.m4s has been aborted 
14:45:32.601 Debug.js:169 [97556][StreamProcessor][video] onFragmentLoadingAbandoned request: https://media.axprod.net/TestVectors/v7-MultiDRM-SingleKey/5/0022.m4s has to be downloaded again, origin is not seeking process or switch track call 
14:45:32.602 Debug.js:169 [97557][AbrController] Stream ID: defaultId_0 [video] switch from 4 to 0/4 (buffer: 7.728) {"name":"AbandonRequestsRule","throughput":522,"fragmentID":21} 
14:45:32.602 Debug.js:169 [97557][StreamProcessor][video] Preparing quality switch for type video 
14:45:32.606 Debug.js:169 [97561][FragmentModel][video] abort requests 
14:45:32.618 Debug.js:169 [97573][AbrController] Stream ID: defaultId_0 [video] switch from 0 to 4/4 (buffer: 7.728) {"state":2,"throughput":12765.6,"latency":533.75,"bufferLevel":7.728,"placeholderBuffer":17.41315032676972,"delay":0} 
14:45:32.618 Debug.js:169 [97573][StreamProcessor][video] Preparing quality switch for type video 
14:45:32.625 Debug.js:169 [97580][FragmentModel][video] abort requests 
14:45:32.629 Debug.js:169 [97584][AbrController] [video] switching from buffer occupancy to throughput ABR rule (buffer: 0.822). 
14:45:32.635 Debug.js:169 [97590][ScheduleController][video] Media segment needed for video and stream id defaultId_0 
14:45:32.636 Debug.js:169 [97591][DashHandler][video] Index for time 86 is 21 
14:45:32.636 Debug.js:169 [97591][StreamProcessor][video] Next fragment request url for stream id defaultId_0 and media type video is https://media.axprod.net/TestVectors/v7-MultiDRM-SingleKey/5/0022.m4s 
14:45:33.222 Debug.js:169 [98177][StreamProcessor][video] Buffer is empty! Stalling! 
14:45:33.223 Debug.js:169 [98178][BufferController][video] Waiting for more buffer before starting playback 
14:45:34.764 Debug.js:169 [99719][BufferController][video] video: Removing buffer from: 0 to 65.313832 
14:45:34.769 Debug.js:169 [99724][BufferController][video] onRemoved buffer from: 0 to 65.313832 
14:45:34.769 Debug.js:169 [99724][BufferController][video] Buffered range: 66 - 83.999999, currentTime =  85.31889 
14:45:44.765 Debug.js:169 [109720][BufferController][video] video: Removing buffer from: 0 to 66.380672 
14:45:44.767 Debug.js:169 [109722][BufferController][video] onRemoved buffer from: 0 to 66.380672 
14:45:44.767 Debug.js:169 [109722][BufferController][video] Buffered range: 68 - 83.999999, currentTime =  86.380672 
14:45:59.870 Debug.js:169 [124825][StreamProcessor][video] OnFragmentLoadingCompleted for stream id defaultId_0 and media type video - Url: https://media.axprod.net/TestVectors/v7-MultiDRM-SingleKey/5/0022.m4s  
Expected behavior

If a segment is abandonned, next segment shall be downloaded at a lower (or at the lowest?) quality

@bbert bbert added the Bug label Jan 3, 2022
@bbert
Copy link
Contributor Author

bbert commented Jan 3, 2022

Additional comment:
AbandonRequestRule is considering and counting the download progress steps only if buffer level is lower than stable buffer size (12sec by default).
It may be better to count all the progress steps whatever the buffer size, and then considering abandon request only if buffer is lower than stable buffer size.
If a request download is started just before the buffer goes below stable buffer size, then if the download is too slow and takes more than 12sec it will never be abandonned.

@tuantranthai
Copy link

I got the same observation in another test compared to yours.

@dsilhavy
Copy link
Collaborator

Some initial changes and fixes here: #3944

@stale
Copy link

stale bot commented Oct 9, 2022

This issue has been automatically marked as stale because it has not had recent activity. However, it might still be relevant so please leave a short comment if it should remain open. Otherwise the issue will be closed automatically after two weeks. Thank you for your contributions.

@stale stale bot added the stale To be used by automatic issue staling and closing to indicate that this issue is about to be closed label Oct 9, 2022
@stale
Copy link

stale bot commented Oct 24, 2022

This issue has been automatically closed because no further activity occurred. If you think this issue is still relevant please reopen it or contact @dsilhavy. Thank you for your contributions.

@stale stale bot closed this as completed Oct 24, 2022
@dsilhavy dsilhavy reopened this Oct 24, 2022
@stale stale bot removed the stale To be used by automatic issue staling and closing to indicate that this issue is about to be closed label Oct 24, 2022
@dsilhavy dsilhavy added this to the 5.0.0 milestone Nov 15, 2023
@dsilhavy dsilhavy self-assigned this Nov 15, 2023
dsilhavy added a commit that referenced this issue Jan 24, 2024
@dsilhavy
Copy link
Collaborator

Addressed in #4369

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

3 participants