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

fix: Fix multi-period DASH with descriptive audio #4629

Merged
merged 27 commits into from
Oct 28, 2022

Conversation

littlespex
Copy link
Contributor

Perform the primary check after role check to improve period flattening on streams with both main and description audio tracks.

Resolves #4500

Comment on lines -1183 to -1191
// If the language doesn't match, but the candidate is the "primary"
// language, then that should be preferred as a fallback.
if (!best.primary && candidate.primary) {
return true;
}
if (best.primary && !candidate.primary) {
return false;
}

Copy link
Contributor Author

@littlespex littlespex Oct 27, 2022

Choose a reason for hiding this comment

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

@joeyparrish Removing this completely caused a number of issues, but moving it below the role check solves the issue.

test/util/periods_unit.js Outdated Show resolved Hide resolved
test/util/periods_unit.js Outdated Show resolved Hide resolved
test/util/periods_unit.js Outdated Show resolved Hide resolved
test/util/periods_unit.js Outdated Show resolved Hide resolved
@avelad avelad added type: bug Something isn't working correctly priority: P1 Big impact or workaround impractical; resolve before feature release labels Oct 27, 2022
@avelad avelad added this to the v4.3 milestone Oct 27, 2022
@@ -1141,14 +1149,163 @@ describe('PeriodCombiner', () => {
expect(audio2.originalId).toBe('stream2,stream4');
});

it('Matches streams with roles in common', async () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test simulates the stream that originally manifested the issue. It is a multi-period steam where all periods have the same number of video and audio adaptation sets, and the audio adaptations both have roles, one main and one description.

expect(audio4.originalId).toBe('stream2,stream2');
});

it('Matches streams with mismatched roles', async () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test simulates a similar stream to the one above, but this time with periods representing pre-roll and mid-roll ads that only have main audio tracks.

@github-actions
Copy link
Contributor

Incremental code coverage: 100.00%

Comment on lines 1278 to 1281
makeAVVariant(720, 'en'),
makeAVVariant(1080, 'en'),
makeAVVariant(720, 'en'),
makeAVVariant(1080, 'en'),
Copy link
Member

Choose a reason for hiding this comment

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

Could you add an optional roles argument to makeAVVariant? I think this part of the test would be clearer if we could see the expected roles here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@joeyparrish
Copy link
Member

This looks great overall. I'm excited to include it in the bugfix releases I've been preparing.

@joeyparrish joeyparrish changed the title fix: Descriptive audio period flattening bug fix: Fix multi-period DASH with descriptive audio Oct 27, 2022
@avelad avelad merged commit 81ccd5c into main Oct 28, 2022
@joeyparrish joeyparrish deleted the issue/4500-description-audio-fix branch October 28, 2022 17:57
joeyparrish pushed a commit that referenced this pull request Oct 28, 2022
Perform the `primary` check after `role` check to improve period
flattening on streams with both `main` and `description` audio tracks.

Resolves #4500

Co-authored-by: Dan Sparacio <daniel.sparacio@cbsinteractive.com>
joeyparrish pushed a commit that referenced this pull request Oct 28, 2022
Perform the `primary` check after `role` check to improve period
flattening on streams with both `main` and `description` audio tracks.

Resolves #4500

Co-authored-by: Dan Sparacio <daniel.sparacio@cbsinteractive.com>
joeyparrish pushed a commit that referenced this pull request Oct 28, 2022
Perform the `primary` check after `role` check to improve period
flattening on streams with both `main` and `description` audio tracks.

Resolves #4500

Co-authored-by: Dan Sparacio <daniel.sparacio@cbsinteractive.com>
joeyparrish pushed a commit that referenced this pull request Oct 28, 2022
Perform the `primary` check after `role` check to improve period
flattening on streams with both `main` and `description` audio tracks.

Resolves #4500

Co-authored-by: Dan Sparacio <daniel.sparacio@cbsinteractive.com>
joeyparrish pushed a commit that referenced this pull request Oct 29, 2022
Perform the `primary` check after `role` check to improve period
flattening on streams with both `main` and `description` audio tracks.

Resolves #4500

Co-authored-by: Dan Sparacio <daniel.sparacio@cbsinteractive.com>
joeyparrish pushed a commit that referenced this pull request Oct 29, 2022
Perform the `primary` check after `role` check to improve period
flattening on streams with both `main` and `description` audio tracks.

Resolves #4500

Co-authored-by: Dan Sparacio <daniel.sparacio@cbsinteractive.com>
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Jul 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
priority: P1 Big impact or workaround impractical; resolve before feature release status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Descriptive audio is not selectable when the adaptation has a role of main, and ABR is enabled
4 participants