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

feat(DASH): Handle mixed-codec variants. #5950

Merged
merged 12 commits into from Dec 1, 2023

Conversation

theodab
Copy link
Collaborator

@theodab theodab commented Nov 29, 2023

With the addition of the changeType API for MediaSource, it is theoretically possible for a variant to change between multiple codecs for a given buffer, over the course of playback.
This adds support for the DASH player to stitch together periods which have such multi-codec variants, but only as a last resort. For example, if one period only has audio in aac, and another period only has opus audio, the player will now stitch those periods together as one, but if there is a throughline that does not involve changing codecs it will go for that instead.

Closes #5961

With the addition of the changeType API for MediaSource, it is
theoretically possible for a variant to change between multiple codecs
for a given buffer, over the course of playback.
This adds support for the DASH player to stitch together periods which
have such multi-codec variants, but only as a last resort. For example, if
one period only has audio in aac, and another period only has opus audio,
the player will now stitch those periods together as one, but if there is
a throughline that does not involve changing codecs it will go for that
instead.
@theodab theodab added type: enhancement New feature or request component: DASH The issue involves the MPEG DASH manifest format labels Nov 29, 2023
@theodab theodab requested a review from avelad November 29, 2023 08:14
@theodab theodab marked this pull request as draft November 29, 2023 08:14
lib/util/periods.js Outdated Show resolved Hide resolved
lib/util/periods.js Outdated Show resolved Hide resolved
lib/media/streaming_engine.js Outdated Show resolved Hide resolved
lib/util/stream_utils.js Outdated Show resolved Hide resolved
@avelad avelad added the priority: P3 Useful but not urgent label Nov 29, 2023
@avelad avelad added this to the v5.0 milestone Nov 29, 2023
README.md Outdated Show resolved Hide resolved
@shaka-bot
Copy link
Collaborator

shaka-bot commented Nov 29, 2023

Incremental code coverage: 92.57%

@theodab theodab marked this pull request as ready for review November 30, 2023 08:36
@theodab
Copy link
Collaborator Author

theodab commented Dec 1, 2023

Ok, I did a manual test run with this latest version, and the only test failures were UI tests having too low of a similarity value (0.949 instead of 0.95, etc). This change hasn't touched the UI at all, and I've found those tests to be flakey on local test runs anyway, so I think that means this is working.

I did discover that this system is incompatible with muxed content. I wonder if there are enough caveats, at this point, that multiTypeVariantsAllowed should be false by default.

Copy link
Collaborator

@avelad avelad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@theodab theodab merged commit 24e3255 into shaka-project:main Dec 1, 2023
3 checks passed
@theodab theodab deleted the audioIssueBranch branch December 1, 2023 08:37
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Jan 30, 2024
@shaka-project shaka-project locked as resolved and limited conversation to collaborators Jan 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component: DASH The issue involves the MPEG DASH manifest format priority: P3 Useful but not urgent status: archived Archived and locked; will not be updated type: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle mixed-codec and mixed-mimeType variants.
3 participants