-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Restrict ABR choices based on video element size #565
Comments
Any comments on this? |
Sorry for the delay. The bug where you seek to 0.1 is likely caused by Chrome's mixup of DTS/PTS. If the higher res streams use more b-frames, it's possible that this bug in Chrome would affect those streams, but not the lower-res or lower-profile ones. A solution to #555 could be an effective workaround for this Chrome bug.
Restricting all streams should be an error. There is no reason to restrict all streams, and no reason to expect playback if all streams are restricted. Before we go too far into redesigning Restrictions, let me give you some history. The reason we created the Restrictions object was to allow apps to give us hints about things we can't know. For example, say your content has a policy that forbids HD playback on a certain device. Your license server may be able to communicate to your application that it does not meet the requirements for HD. If there's no other indication that the HD streams are not playable (key statuses, etc), then your application needs to tell the library to forbid those HD streams. If they are selected, playback will definitely fail. Not only should they not be selected by AbrManager, the user should not be able to select them, either. That is what Restrictions was originally designed for: app-communicated, DRM-based restrictions. The first extension of Restrictions beyond that was by @sanbornhnewyyz in #32 to add maxBandwidth. @sanbornhnewyyz, what is the high-level purpose of this parameter for you? Are you trying to limit data usage for mobile users? @niklaskorz, here are my suggestions. These options don't break the concept of serious, DRM-based restrictions:
@niklaskorz, @sanbornhnewyyz, thoughts on these options? @sanbornhnewyyz, am I guessing correctly that you want to limit mobile data usage? |
Thanks for your response, @joeyparrish :) |
Hi @joeyparrish , |
We will update the guide for v2.1. In v2.1, we will support HLS, where we don't know the individual bandwidth requirements of video and audio. Instead, we will only be able to use the bandwidth of the variant (video+audio combination). The addition of a second restrictions object will only be available in v2.1 and will not be backported to v2.0.x. I apologize for the inconvenience. |
Hi @joeyparrish I think adding restrictions to the AbrManager is good idea. I was looking into a way how to change BANDWIDTH_UPGRADE_TARGET_ in SimpleAbrManager to value I think fits best to my streams specifics. I have a few design restrictions and implementing custom abrManager is not an option for me. Just a few questions:
Thank you in advance! |
@joeyparrish thank you very much! |
@joeyparrish I liked your suggestion number 2.
I was browsing through the docs looking for something similar but I didn't find it, the only thing I found was to restrict statically the Btw, HLS.js also has this feature under the config For sure HLS.js also needs to query the size from time to time. |
Current situation:
Shaka player offers a restriction configuration, the interesting fields in this case being
maxWidth
andmaxHeight
.Behavior of current situation:
The list of available video streams, for ABR and for the user, will be filtered by the restrictions set in the configuration.
Problem with current situation:
Solutions:
maxWidth
andmaxHeight
more flexible, choosing the first video stream that at least fits the viewport (stream.width >= maxWidth || stream.height >= maxHeight
) as the maximum size.Possible implementation:
https://github.com/alugha/shaka-player/tree/feature-abr-resolution
Issues with my possible implementation:
I am experiencing a bug where a specific video is not playable if the ABR manager chooses, based on the viewport, the second best resolution in Google Chrome. In this case, and only for this video, the buffering starts at
0.04
instead of0.00
, therefore making it impossible to start playback from the beginning. Seeking to0.1
or changing the video stream works.In comparison, dash.js has no issues playing this video with setLimitBitrateToPortal set to
true
.The text was updated successfully, but these errors were encountered: