Skip to content

Restrict ABR choices based on video element size #565

Closed
@niklaskorz

Description

@niklaskorz

Current situation:
Shaka player offers a restriction configuration, the interesting fields in this case being maxWidth and maxHeight.

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:

  1. If no stream matches the configured restrictions, the user will be presented a black screen with audio.
  2. Streams that do not pass the filter will no longer be selectable by the user, although this is required if the user knows that the viewport size will change and therefore wants to pre-buffer the desired resolution.

Solutions:

  1. A more user-friendly behavior would be to make maxWidth and maxHeight more flexible, choosing the first video stream that at least fits the viewport (stream.width >= maxWidth || stream.height >= maxHeight) as the maximum size.
  2. Only apply the restrictions on the stream set passed to the ABR manager. Do not filter the track list that's exposed and selectable by shaka-player.

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 of 0.00, therefore making it impossible to start playback from the beginning. Seeking to 0.1 or changing the video stream works.
In comparison, dash.js has no issues playing this video with setLimitBitrateToPortal set to true.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions