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

Define order of AdaptationSet preference #476

Closed
joeyparrish opened this issue Aug 7, 2016 · 0 comments
Closed

Define order of AdaptationSet preference #476

joeyparrish opened this issue Aug 7, 2016 · 0 comments
Assignees
Labels
status: archived Archived and locked; will not be updated type: enhancement New feature or request
Milestone

Comments

@joeyparrish
Copy link
Member

When a piece of content has multiple viable AdaptationSets with the same tuple of {contentType, language, role}, the first one is chosen arbitrarily. For example, there may be two AdaptationSets of {'video', null, null} (one H.264, one VP9) or two of {'audio', 'en-US', null} (one Vorbis, one AAC) or (conceivably, but not seen in the wild) two of {'text', 'fr', 'caption'} (one TTML, one WebVTT).

We should define some ordering of equivalent AdaptationSets for browsers that support multiple codecs and containers, such as Firefox and Chrome, both of whom support MP4 and WebM.

In Shaka Player's sample media, many assets contain both VP9 and H.264, with significant bandwidth savings in VP9. We should define a way to order AdaptationSets so that we prefer those which save bandwidth for equivalent resolutions.

Although we are discussing AdaptationSets for DASH at the moment, the problem is more general, and the solution should be applied outside any particular manifest parser after conversion to StreamSets. This ensures that the fix applies to future manifest parsers and does not interfere with any grouping caused by DASH's AdaptationSetSwitching properties.

Proposed order of preference when language and role are the same:

  1. StreamSet with highest top resolution (video only)
    • example: A at 480p, 720p, 1080p vs B at 480p, 720p, 1080p, 2160p (business logic may require the use of certain codecs for certain resolutions), choose B
    • example: A at 240p (old codec, very low bitrate, for certain devices with no other codecs) vs B at 480p (modern codec, higher bitrate and much higher quality, for all other devices), choose B
  2. StreamSet with lowest average bandwidth across all Streams (to prefer VP9 or H.265 over VP8 or H.264 without hard-coding preferences for any of them)
  3. StreamSet 0 (arbitrary choice)

This change would take place in shaka.util.StreamUtils.chooseStreamSets.

@joeyparrish joeyparrish added this to the v2.0.0 milestone Aug 7, 2016
@joeyparrish joeyparrish added the type: enhancement New feature or request label Aug 7, 2016
@ismena ismena self-assigned this Aug 9, 2016
@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: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants