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(DASH): Ensure variants are created for unique video codec bases #6835

Conversation

willdharris
Copy link
Contributor

Resolves #6820.

Copy link

google-cla bot commented Jun 14, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@shaka-bot
Copy link
Collaborator

Incremental code coverage: 100.00%

@avelad avelad added type: bug Something isn't working correctly priority: P1 Big impact or workaround impractical; resolve before feature release component: DASH The issue involves the MPEG DASH manifest format labels Jun 17, 2024
@avelad avelad added this to the v4.10 milestone Jun 17, 2024
@@ -734,6 +735,24 @@ shaka.util.PeriodCombiner = class {
used = false;
}
}
// In cases where we have the same video codec but different
// codec bases in matched representations across periods
// (e.g. HEVC as hev and hvc), we don't want to delete the matched stream
Copy link
Member

Choose a reason for hiding this comment

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

I might be misunderstanding, but it seems like the solution could be just to normalize video codecs in streams before processing periods and in configs before applying preferences. If they all said hev or all said hvc, problem solved, correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That could work, but I think would still result in confusion in some cases, like we are finding with manifests returned from Google DAI.

For example, we have HEVC content encoded in a hvc format. When requesting a stitched manifest from DAI, with DAI pre-rolls and our original content, the HEVC pre-roll representations from DAI are encoding in a hev format. As a content owner, I know there are hvc representations in my manifest but may not know DAI has used a different format for pre-rolls. If Shaka Player "converts" hvc to hev, then when no hvc variants exist it's confusing as to why those aren't available.

Outside the scope of this change but related: In the same manifest we also have content encoded as dvhe. DAI does not encode ads in DVHE. Shaka Player matches the content period dvhe streams with the pre-roll hev streams. dvhe variants are still created even though DVHE streams aren't available in pre-rolls. For conformity with that behavior, I think it makes sense to create unique variants for each codec base.

@dsparacio Any additional thoughts here?

Copy link
Member

Choose a reason for hiding this comment

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

I'm going on leave, so @theodab and @avelad should make a decision about this without waiting for me.

Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't we go in the direction @joeyparrish suggested? I guess it would help in majority of cases. I'm afraid with the proposed solution we might end up with plenty of almost-duplicated variants and it can be confusing for devs.

Copy link
Member

Choose a reason for hiding this comment

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

I agree! @theodab what do you think?

Copy link
Member

Choose a reason for hiding this comment

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

@willdharris any update?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We were curious to hear @theodab's thoughts on this before moving forward. If the consensus is to go with Joey's suggestion of normalizing codecs earlier, we can start looking at that.

Copy link
Member

Choose a reason for hiding this comment

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

@theodab is busy, but I confirm that the entire maintainer team wants this solution, please continue with the development.

Copy link
Member

Choose a reason for hiding this comment

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

@willdharris any update? Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@avelad Sorry for the delay on this; it was deprioritized on our side for a bit. We do plan on submitting another fix.

lib/util/periods.js Show resolved Hide resolved
@avelad avelad changed the title fix: ensure variants are created for unique video codec bases fix(DASH): Ensure variants are created for unique video codec bases Jun 24, 2024
@avelad avelad modified the milestones: v4.10, v4.11 Jul 1, 2024
@avelad avelad added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Sep 3, 2024
@shaka-bot
Copy link
Collaborator

Closing due to inactivity. If the author would like to continue this PR, they can reopen it (preferred) or start a new one (if needed).

@shaka-bot shaka-bot closed this Sep 10, 2024
@shaka-bot shaka-bot removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: DASH The issue involves the MPEG DASH manifest format priority: P1 Big impact or workaround impractical; resolve before feature release type: bug Something isn't working correctly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing variants in Multi-period DASH VOD with mixed codecs
6 participants