-
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
HLS AES-128 Live mode not working on Chromecast #5278
Comments
@keyaavoja can you share a HLS-AES-128 live stream to test it? Thanks! |
Trying to find working stream url.
|
@avelad I spoke with @keyaavoja and he told that you couldn't reproduce the problem in main. I tested it with https://router.euddn.net/95b879fc5407bb2fc4ae3a1c74d69466/smil:live1.smil/playlist.m3u8?c=8000 both in demo app and main branch and in both cases, video stops after first chunk on Chromecast. I used out-of-the box demo apps, without any custom config. Everything works well if we turn off HLS-AES-128 on the same stream. |
What Chromecast device are you using? I used Chromecast 1st gen to test it. |
I used 4th gen, Chromecast with Google TV. |
@theodab can you review it? |
Tested with gen 2 also, doesn't work with that either. |
I tried to reproduce your issue, but I get a 404 error for the content. |
I'm trying now with https://storage.googleapis.com/shaka-demo-assets/sintel-fmp4-aes/master.m3u8, which is public and which we own. |
The AES-128 HLS content I have at hand plays fine on both Chrome and on a Chromecast Ultra in our lab. There was a recent release of the Cast Application Framework (CAF) that updates the default Shaka Player version to v4.3.4. The latest release of Shaka Player is v4.3.7. By default, CAF does not use Shaka Player for HLS, but you can opt-in by following the directions in this document: https://developers.google.com/cast/docs/web_receiver/shaka_migration?hl=en Does this help? |
@joeyparrish Sorry, the stream ( https://router.euddn.net/95b879fc5407bb2fc4ae3a1c74d69466/smil:live1.smil/playlist.m3u8?c=8000 ) has been restarted and works again. The problem occurs with live streams; https://storage.googleapis.com/shaka-demo-assets/sintel-fmp4-aes/master.m3u8 is VOD. This works for me also. To clarify:
|
☝️ we're experiencing the same issue (with useShakaForHls enabled), @joeyparrish do you need us to provide a stream to reproduce or is the one provided by @Andekas enough? |
Can you check if the problem persists with 4.7.8? Thanks! |
@avelad Tested with 4.7.8, problem still persists. Connects and plays first chunk, then stops. Using debug player, I get following error on console: log.js:140 Uncaught exception in event handler TypeError: Cannot read properties of undefined (reading 'length') |
I can still access the live stream from @Andekas, so I will take a look now. |
I tested this in our lab with My results:
This is bogus. Somewhere along the way, someone changed
Going back to error 3014, running the test again with We can assume that the segment was either not decrypted or was decrypted with the wrong key. I'll add some more debug logging to find out which. Comparing this against A snippet of the log from Chromecast:
The same section from ChromeLinux:
On Chromecast, we see that there is a seek because it takes so long to start playback. This could indicate that the trigger isn't Chromecast at all, but seeking. |
I made a quick hack in the test to avoid the seek on Chromecast: player.configure('streaming.bufferBehind', 180);
player.configure('manifest.availabilityWindowOverride', 600); Because the content should stay available, there is no need to catch up to the seek range. But I still get the same failure without the seek:
|
With a ton of extra logging, I can see that on both ChromeLinux and ChromecastUltra, we are fetching the same URIs and getting the same key. We're using the same cipher block mode, as well. I decided I wanted to log the segment data, both before and after decryption, on both devices for comparison. If there was a problem with decryption, I wanted to see it. What I found was that this was impossible with the live stream, since the segments kept changing. I couldn't get the two test runs to happen on the same segments. So I captured a snapshot of the live stream and hosted it myself: master playlist, the lowest-resolution media playlist, and the key. Using that content, however, I found that I couldn't reproduce the error. Next I decided to test if the decryption is working correctly. I dumped full segments, their keys, their sequence numbers, and their decrypted versions. I then separately decrypted each segment using OpenSSL from the command-line to compare results. All decryptions matched. The contents are also parseable as TS segments in https://thumb.co.il/ Of note is the fact that the segment that kills playback on Chromecast is not structured like the others. It has a Finally I noticed that there is a big difference between Chromecast and Chrome. Chromecast devices "support" TS content directly, so we are not forced to transmux the content. Rejecting TS content for Chromecast forces transmuxing and fixes playback. |
Although Chromecast natively supports TS content, it does not work in all cases. In particular, we have some sample live streams where some TS segments can be parsed by external tools as valid TS, but cause the Chromecast to throw a parsing error. We should reject TS content on Chromecast, and allow the builtin transmuxer to take over parsing. This also removes the use of cast.__platform__.canDisplayType to patch MediaSource.isTypeSupported on Chromecast. Current versions of Shaka Player are doing very rough filtering with isTypeSupported before calling MediaCapabilities.decodingInfo. And our MediaCapabilities polyfill calls cast.__platform__.canDisplayType directly, bypassing any polyfill we might install on isTypeSupported. So there is no longer any purpose to canDisplayType in isTypeSupported. Closes shaka-project#5278
Although Chromecast natively supports TS content, it does not work in all cases. In particular, we have some sample live streams where some TS segments can be parsed by external tools as valid TS, but cause the Chromecast to throw a parsing error. We should reject TS content on Chromecast, and allow the builtin transmuxer to take over parsing. This also removes the use of `cast.__platform__.canDisplayType` to patch MediaSource.isTypeSupported on Chromecast. Current versions of Shaka Player are doing very rough filtering with isTypeSupported before calling MediaCapabilities.decodingInfo. And our MediaCapabilities polyfill calls `cast.__platform__.canDisplayType` directly, bypassing any polyfill we might install on isTypeSupported. So there is no longer any purpose to canDisplayType in isTypeSupported. Closes #5278
Although Chromecast natively supports TS content, it does not work in all cases. In particular, we have some sample live streams where some TS segments can be parsed by external tools as valid TS, but cause the Chromecast to throw a parsing error. We should reject TS content on Chromecast, and allow the builtin transmuxer to take over parsing. This also removes the use of `cast.__platform__.canDisplayType` to patch MediaSource.isTypeSupported on Chromecast. Current versions of Shaka Player are doing very rough filtering with isTypeSupported before calling MediaCapabilities.decodingInfo. And our MediaCapabilities polyfill calls `cast.__platform__.canDisplayType` directly, bypassing any polyfill we might install on isTypeSupported. So there is no longer any purpose to canDisplayType in isTypeSupported. Closes #5278
Although Chromecast natively supports TS content, it does not work in all cases. In particular, we have some sample live streams where some TS segments can be parsed by external tools as valid TS, but cause the Chromecast to throw a parsing error. We should reject TS content on Chromecast, and allow the builtin transmuxer to take over parsing. This also removes the use of `cast.__platform__.canDisplayType` to patch MediaSource.isTypeSupported on Chromecast. Current versions of Shaka Player are doing very rough filtering with isTypeSupported before calling MediaCapabilities.decodingInfo. And our MediaCapabilities polyfill calls `cast.__platform__.canDisplayType` directly, bypassing any polyfill we might install on isTypeSupported. So there is no longer any purpose to canDisplayType in isTypeSupported. Closes #5278
Although Chromecast natively supports TS content, it does not work in all cases. In particular, we have some sample live streams where some TS segments can be parsed by external tools as valid TS, but cause the Chromecast to throw a parsing error. We should reject TS content on Chromecast, and allow the builtin transmuxer to take over parsing. This also removes the use of `cast.__platform__.canDisplayType` to patch MediaSource.isTypeSupported on Chromecast. Current versions of Shaka Player are doing very rough filtering with isTypeSupported before calling MediaCapabilities.decodingInfo. And our MediaCapabilities polyfill calls `cast.__platform__.canDisplayType` directly, bypassing any polyfill we might install on isTypeSupported. So there is no longer any purpose to canDisplayType in isTypeSupported. Closes #5278
Have you read the FAQ and checked for duplicate open issues?
Yes
What version of Shaka Player are you using?
Demo version on the Shaka official Demo page.
Can you reproduce the issue with our latest release version?
Yes
Can you reproduce the issue with the latest code from
main
?Yes
Are you using the demo app or your own custom app?
Demo app.
If custom app, can you reproduce the issue using our demo app?
Yes
What browser and OS are you using?
Windows, Chrome
For embedded devices (smart TVs, etc.), what model and firmware version are you using?
Google TV 4K, FW: STTE.230319.008.R1
What are the manifest and license server URIs?
Any Live HLS using AES-128 encryption will fail using Chromecast.
What configuration are you using? What is the output of
player.getConfiguration()
?Demo app.
What did you do?
Just try to play HLS AES-128 encrypted Live stream using Chromecast..
What did you expect to happen?
I assumed, it would work.
What actually happened?
Plays only one chunk and then it stops.
The text was updated successfully, but these errors were encountered: