-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
DASH + ad insertion: Uncaught exception in promise in 4.7.0 #6010
Comments
Thanks @avelad for the fix. Theme apart don't you think the name of that error is wrong? I think it should be changed in the next major release and, in the meantime, fix the documentation to say that it's not only related to HLS. |
This issue still occurs, and the HLS error message is very misleading when it occurs during DASH playback. |
@littlespex can you send a fix for it? Thanks! |
@littlespex can you share in which scenario and which Shaka's version is happening? For our case, the issue is no longer happening for version >=4.7.4. |
This change in v4.7.4 could explain an exception being fixed: |
This issue happens in all 4.7.x versions for us. This is an issue related to period flattening: The stream we are testing is a DAI generated manifest that has mixed video codecs across periods:
We are using to |
I'm working with @littlespex and @dsparacio on this issue. With our content, after the streams from all periods are combined, we end up with multiple video streams that include multiple codecs concatenated in the stream's Later on when the manifest is filtered for decoding configs and media capabilities, we hit the issue @littlespex described above. If We identified this became an issue for us with the addition of the shaka-player/lib/util/periods.js Lines 786 to 795 in 7fd99b7
I'm not sure I fully understand the intention here. Does a stream need to list both codecs for the mixed-codec feature to work properly? Are these codecs combined to say, "if the first codec is not available in a period but the second is, use the second"? But then with #6047, shaka-player/lib/util/periods.js Lines 725 to 760 in 4ae15c2
That fix works when concatenated codecs have the same codec base, i.e. avc and avc My outstanding questions regarding the approach we should take for a fix:
|
More context, our content carries hvc and dvhe. hev is inserted by DAI. Additionally, DAI is mixing color space when DVHE is selected as they do not plan to provide a DVHE adpod encode as of today. In 4.3.6, the mixed case was working with HEV and HVC but not HEV and DVHE. So this is why we looked into latest and found this new issue. If we remove DAI from the mix, 4.7.11 is working as expected regarding the codec selection and period flattening. We hope if we fix the mix codecs issue we should be able to get the expected outcome for period mixtures
We are working with the DAI team, asking for DVHE to be available in addition to hevc for other reasons beyond this issue. |
This was a fix for an issue from an internal client, who had multiperiod streams where some periods only had opus audio and some periods only had aac audio.
I think it might break the mixed-codec feature, yeah. Annoyingly the sample content I was given for the original issue is no longer hosted online, so to confirm this I would have to make new content.
I think this would be safe? I'd feel happier if I could test it on some real content though. Honestly, it'd probably be a good idea to make some content for reproducing the original issue that can be put into the Shaka Player demo anyway, so we can confirm that future changes don't break this feature. I'll hack something together tomorrow, and try those solutions out on it. |
@theodab Thanks for the response. Yeah I came across the code in getDecodingInfosForVariant_ where the concatenated codecs are each checked for support. So I see why both codecs should be there. The problem right now, is that with two video codecs, we don't reach that part of the code due to an earlier error in I have a fix in progress and will try to get a PR up today. |
I made a sample asset, and tested a basic solution along the lines of the second solution you mentioned. I think there is just a fundamental problem in how I wrote #5950. This is kind of a problem because we still might create these variants, even though we can't play them. Also because it means the documentation for I'll make a change to fix how the multi-type support handles streams that switch between mimeTypes. MediaSource can play such content, we just get confused when we try to determine if they are playable or not. I think this will involve reverting how codecs are stored in streams (so they won't be combined together anymore), and instead add a new value that just stores an array of the final full mimeTypes of each stream and uses that for compatibility checks. |
Thanks @theodab. There were still some issues with the fix I was working on last week, so I did not submit a PR. We'll defer to your changes and re-test when that's available. |
@theodab any idea on your timeline on this change. Just to feedback to the DAI team next Monday when we meet on this. |
A previous PR, shaka-project#5950, added support for variants that contain multiple different codecs. It was supposed to also add support for variants with multiple mimeTypes, but that part didn't work correctly. This reworks a lot of shaka-project#5950 and shaka-project#6047, to change how they handle such complicated variants. This has the side-effect of allowing the stream utils to differentiate between content that has multiple codecs because of type changes, and content that has multiple codecs because of being muxed video+audio. Issue shaka-project#6010
I have an experimental PR out for this now. I've tested it with the sample asset I made, and it seems to help, but it'd be nice to know if it solves the actual content you are having issues with. |
Thanks @theodab. I tested our content with your branch I'm also getting this error with other DRM content (not mixed codecs) in
We are working on getting shareable content that we can pass along. |
I think I found the cause of the |
A previous PR, shaka-project#5950, added support for variants that contain multiple different codecs. It was supposed to also add support for variants with multiple mimeTypes, but that part didn't work correctly. This reworks a lot of shaka-project#5950 and shaka-project#6047, to change how they handle such complicated variants. This has the side-effect of allowing the stream utils to differentiate between content that has multiple codecs because of type changes, and content that has multiple codecs because of being muxed video+audio. Issue shaka-project#6010
@theodab The last commit resolves the In this branch, I see 2 calls to I also found there may be a conflict with the Remove DOM Parser feature. If I revert that commit, and related commits (#6063, #6198, #6267) from your branch the issue is resolved. Not sure of the correlation yet. Still working on getting a shareable stream. Will send that over asap. |
@theodab I just emailed content URIs for our test content to the maintainers group. Again, the initial |
Tested the fix again today with our content and confirmed the The ad to content freeze appears to be due to the content period being Widevine L1 encrypted. There's no problem with playback on HW CDM devices. In previous versions of Shaka, on non-HW CDMs, the content falls back to SD variants and playback continues. Now playback just stalls with no error. But that is unrelated to this specific issue and we will open a separate issue if needed. |
There we go. Sorry it took so long to merge that! |
A previous PR, #5950, added support for variants that contain multiple different codecs. It was supposed to also add support for variants with multiple mimeTypes, but that part didn't work correctly. This reworks a lot of This has the side-effect of allowing the stream utils to differentiate between content that has multiple codecs because of type changes, and content that has multiple codecs because of being muxed video+audio. Fixes #6010 --------- Co-authored-by: Álvaro Velad Galván <ladvan91@hotmail.com>
Have you read the FAQ and checked for duplicate open issues?
yes
If the problem is related to FairPlay, have you read the tutorial?
What version of Shaka Player are you using?
4.6.3, 4.7.1
Can you reproduce the issue with our latest release version?
yes
Can you reproduce the issue with the latest code from
main
?n/a
Are you using the demo app or your own custom app?
custom
If custom app, can you reproduce the issue using our demo app?
yes
What browser and OS are you using?
Chrome/MacOS
For embedded devices (smart TVs, etc.), what model and firmware version are you using?
What are the manifest and license server URIs?
Can be provided in email if needed
What configuration are you using? What is the output of
player.getConfiguration()
?Default demo app
What did you do?
Play dash manifest with ad insertion, problem occurs when switching between content and ads
What did you expect to happen?
No uncaught exception in the console
What actually happened?
Error in the console:

The codecs in the array:

The error says
MANIFEST.HLS_COULD_NOT_GUESS_CODECS
but HLS is not involved.Content will continue playing, but the console will fill up with errors.
I didn't see the issue on 4.6.3, but I did see it in 4.7.0, perhaps this commit is a good place to start?
24e3255
The text was updated successfully, but these errors were encountered: