-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
AC-3 audio configuration for requestMediaKeySystemAccess() is not supported on Tizen, but it is playing #2989
Comments
Code for test:
Output in console on Tizen:
|
This could be an issue with the MediaKeys implementation in Tizen. (It wouldn't be the first.) I wrote a quick test to get us some more information from your particular device. Can you please load this URL on your Tizen device and send us a screenshot of the results? https://storage.googleapis.com/shaka-demo-assets/_bugs/2989/ec3-test.html Thanks! |
@joeyparrish From Tizen 5.5 |
If this is the case, I don't see how DrmEngine would have rejected the AC-3 stream or failed to get a CDM instance. The manifest has: <Representation audioSamplingRate="48000"
mimeType="audio/mp4" codecs="ac-3"
id="1" bandwidth="448000"> I'll see if I can test this remotely with the Tizen TV in our lab. |
Using |
My Tizen 3 device reports slightly different results, so the playback failure actually makes sense here: {
"com.widevine.alpha": {
"audio/mp4; codecs=\"ac-3\"": false,
"audio/mp4; codecs=\"mp4a.40.2\"": true,
"audio/mp4; codecs=\"ec-3\"": true,
"audio/mp4; codecs=\"mp4a.a5\"": true,
"audio/mp4; codecs=\"mp4a.a6\"": true
},
"com.microsoft.playready": {
"audio/mp4; codecs=\"ac-3\"": false,
"audio/mp4; codecs=\"mp4a.40.2\"": true,
"audio/mp4; codecs=\"ec-3\"": true,
"audio/mp4; codecs=\"mp4a.a5\"": true,
"audio/mp4; codecs=\"mp4a.a6\"": true
},
"clear": {
"audio/mp4; codecs=\"mp4a.40.2\"": true,
"audio/mp4; codecs=\"ac-3\"": true,
"audio/mp4; codecs=\"ec-3\"": true,
"audio/mp4; codecs=\"mp4a.a5\"": true,
"audio/mp4; codecs=\"mp4a.a6\"": true
}
} Our device claims support for both AC-3 and EC-3 in clear content, but both Widevine and PlayReady reject AC-3 content and permit EC-3 content, which seems strange. But at least in the case of our device, error 6001 ( |
It is very strange that it supports ec-3 but not ac-3, if you force it to support ac-3 with a pollyfill, does the content work and you can hear it? |
Right, but if you do not pass audioCapabilities with AC-3 to requestMediaKeySystemAccess() and modify shaka.media.DrmEngine.willSupport() follows as:
then the stream will play successfully. I want to say that there is some problem in the Tizen platform. Method requestMediaKeySystemAccess() rejects the AC-3 codec, but despite this Tizen plays it successfully. |
To verify that AC-3 truly does work (and since my device is Tizen 3, I want to double-check), I tried adding I'm not physically present in the lab to verify if audio played. Initially, playback made it to time 13 after 30 seconds of playing. I increased the timeout in that phase of the automated playback test to 60 seconds, and it was able to play all the way 20. So it's moving slow, and I can't verify that the audio is actually played, but playback doesn't hang. I would assume it's actually playing the encrypted AC-3 audio on this device. What I don't understand is why either of you see this specific error if MediaKeys does report AC-3 support on your devices. On my device, it does not. And though that report seems to be false, at least the error code is the correct response when the platform claims not to support a necessary codec. |
I'm trying to Google whether or not all Tizen TVs support AC-3, because if so, the workaround could be pretty simple. However, the first search result in Google for "tizen ac-3" is this issue. 🤣 |
Perfect, thanks! According to the data from Samsung, Tizen TVs all the way back to 2015 models all support AC-3. None of those tables mention EC-3 support, even the one for my model which reports EC-3 support. So I will assume that EC-3 support implies AC-3, and that Samsung just doesn't mention it in their docs. That means we should be able to assume AC-3 will work so long as EC-3 will work. |
By querying EC-3 every time we query AC-3, and assuming that EC-3 support implies AC-3 support after that, it does seem to play on our Tizen 3 device. I'm going to put my fix up for code review now. |
You're only going to do this for Tizen right? I don't want any other platform to break ... |
I have Tizen3, Tizen4, Tizen5 TVs. Test result with 'my workaround': Tizen3 - no error, stream is playing, no sound (there may be some other error, since earlier on Tizen there were already problems with sound #1610) |
The workaround will be limited to Tizen, but I am also creating some infrastructure in DrmEngine for doing fallbacks and overrides for this sort of thing. It should be fairly easy to tweak if we make mistakes or if it needs to be adjusted or expanded for other platforms or codecs. |
I will test throughout the week and tell you the results. |
@joeyparrish, I tested the fix ba4763a. The result is the same as here: #2989 (comment). Thanks! |
Some Tizen devices seem to misreport AC-3 support. This works around the issue by falling back to EC-3, which seems to be supported on the same devices and be correctly reported in all cases we have observed. Closes #2989 Change-Id: I80f20ba796df29858728b19f8a9f6c1712c9556d
Some Tizen devices seem to misreport AC-3 support. This works around the issue by falling back to EC-3, which seems to be supported on the same devices and be correctly reported in all cases we have observed. Closes #2989 Backported to v2.5.x Change-Id: I80f20ba796df29858728b19f8a9f6c1712c9556d
Have you read the FAQ and checked for duplicate open issues?
Yes
What version of Shaka Player are you using?
2.5.17, 3.0.5
Can you reproduce the issue with our latest release version?
Yes
Can you reproduce the issue with the latest code from
master
?Yes
Are you using the demo app or your own custom app?
Custom app
If custom app, can you reproduce the issue using our demo app?
Yes
What browser and OS are you using?
Tizen
For embedded devices (smart TVs, etc.), what model and firmware version are you using?
Tizen3, Tizen4, Tizen5
What are the manifest and license server URIs?
https://support.smartlabs.tv/udrm/wvfta/license
https://support.smartlabs.tv/DTE_DASH_AUTO/TESTCONTENT/TOS_AC3_ENC/playlist.mpd
What did you do?
Start playing
What did you expect to happen?
Playing is started
What actually happened?
Error in log:
But if I remove AC-3 codec from MediaKeySystemConfiguration.audioCapabilities and shaka.media.DrmEngine.willSupport() return is true, then no error occurs and shaka successfully plays this stream.
The text was updated successfully, but these errors were encountered: