-
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
Support new Periods adding new encryption info #1360
Comments
This looks similar to #1094. |
It looks exactly like #1094 actually. I hadn't noticed that issue as it was closed. If I read that issue correctly, a fix was applied to setup the EME if license server config suggested that protected content would be provided. I do have license servers setup in the player config, so the provided fix should fix my issue? The EME log does show some activity when I start during an unencrypted ad period, but still no license is requested when the protected period shows up. I update master just this morning to ensure I had everything. So I have the code that is supposed to provide the fix, yet this issue persists. eme_start_on_drm_protected_asset.log |
Just checked out the v2.3.x branch and verified the same issue occurs there also. Perhaps any new license is a problem. I create a new test live stream that starts with encrypted content and then every 3 minutes a new period with new encryption keys starts. This would require a new license to be requested. I am watching the network pane, and I am sure that never happens. Because of this playback dies at the period boundary. It basically looks the same as when the live stream starts on a unencrypted period. So perhaps this has nothing specifically to do with starting on a unencrypted period, just a failure to request new licenses as they are required.
|
The problem is that we currently only support key rotation when there are no |
@TheModMaker is this ticket a duplicate of #1107 now? |
The PSSH data on these streams only exists in the manifest, and not in the init segments at all. So in that sense it is slightly different than what seems to be describe in #1107. Taking the PSSH data out of the manifest wouldn't solve anything as appears to be the case with 1107. Other than that, it does look like it would be a very similar issue. |
We will look into supporting new init data from manifest updates. Sorry for the trouble! |
Is this on the radar anywhere? Scheduled to be looked at for any particular targeted release, etc? |
@TheJohnBowers This is scheduled for v2.5, which will be our next feature release. We will be working on this soon, but no one is working on it right now. |
So -- I just pulled from master and built this morning, but It doesn't seem to be working quite right -- When the key change comes up I do see this in the console log: But video hangs at the point the key change occurs. Interestingly if I wait for a bit the audio does start playing again (when the playhead is moved to the back of the TSB), but video never recovers. Is it possible that only the audio key was peroperly rotated? This is the stream I tested it on this morning. Key rotates every 3 minutes: https://content.uplynk.com/channel/3ff06a21737f40bd9f0e3bc342a4ca6b.mpd?prettydash=1 |
Thanks, @TheJohnBowers. We'll take another look. |
Closes #1360 Backported to v2.4.x Change-Id: I7499926805729bb4ce1e7cbbf39802756d19372b
The work we've done so far was cherry-picked to v2.4.5. I said v2.5.0 before, but I wasn't reading my own notes when I was cherry-picking things. Whoops. Enjoy! |
So, I was able to create a couple of test streams that demonstrate adding new encryption info successfully and unsuccessfully when moving from unencrypted to encrypted in Shaka player. I figured you guys would be interested in seeing it, as it has been hit and miss for me whether this transition works: These streams are the same live stream, but I start with a different preroll sample ad (unencrypted) in each case. With one specific sample ad I see Shaka report manifest URL: https://content.uplynk.com/channel/3c367669a83b4cdab20cceefac253684.mpd?ad=koolaid&drm_optional=1&ad.preroll=1&prettydash=1 license URL: https://content.uplynk.com/wv Now If I just start with a different ad: manifest URL: https://content.uplynk.com/channel/3c367669a83b4cdab20cceefac253684.mpd?ad=onead&drm_optional=1&ad.preroll=1&prettydash=1 license URL: https://content.uplynk.com/wv Starting with this ad does almost the same thing when the first encrypted period shows up:
Why is Shaka dropping variants when moving from unencrypted to encrypted periods, and why does it sometimes leave some variants when it moves from unencrypted to encrypted? This seems relevant to this particular bug, so I thought I would post this info here, but perhaps it deserves a different bug. One note on the test streams -- These streams have random ad breaks in them, so if you happen to start with a preroll ad in an ad break you will see the ad twice in a row. If you see the sample ad twice in a row you need to restart playback to duplicate the issue. I have no way to ensure that you aren't in an ad break when you start, so occasionally you won't be able to replicate - Just be aware. |
The first manifest you provided changes codecs between periods. Notably, the two periods have no video codecs in common. This causes problems with our drm engine, which at the moment cannot add new codecs to its list of supported codecs after initialization. We have an issue for this, #1567. Also, switching between different codecs isn't possible on most platforms. There's a new |
I feel like different avc1 codecs strings wouldn't count as codec switching for the MSE just as joey mentioned here that different mp4a codecs strings wouldn't count. It isn't like we are switching from avc1 to hevc or something. The issue does seem to be covered by #1567 though. |
So I am not seeing the problem I saw when I first tested your fix. The problem of video hanging where the key change occurred. I have tested this in 2.5 and 2.4, and I think it is fixed. The other issue I thought might have been related appears to have its own bug #1567. I think this one can be closed as fixed. |
Have you read the FAQ and checked for duplicate open issues?:
Yes, I didn't see anything that looked like a duplicate issue
What version of Shaka Player are you using?:
2.3 built from master
Can you reproduce the issue with our latest release version?:
It also occurs when building 2.3 from the v2.3.x branch
Can you reproduce the issue with the latest code from
master
?: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?:
NA
What browser and OS are you using?:
Chrome 64 on Mac OS -- Also Firefox Quantum 58.02 on MacOS
What are the manifest and license server URIs?:
What did you do? / What did you expect to happen? / What actually happened?
The above test stream is running a sample ad that is 116 seconds in length every 5 minutes. If the live stream is joined during the drm protected content portion of the stream, everything works fine. Playback transitions into and out of the unencrypted ad portion perfectly over and over again.
IF however I just happen to join the stream during the ad portion when the manifest contains no drm protected period, playback stalls when a period eventually pops into the live window with widevine content protection. Playback seems to proceed to the end of the unencrypted period, and then hang. A few segments of the new period seem to be downloaded an buffered, but playback doesn't proceed.
Firefox actually gives a nasty decoder error and stops, while chrome just kind of sits there. Here is the firefox error:
The network pane doesn't show any attempt to request the widevine license when the protected content shows up in the live window, or at any other time during playback in this scenario. If I reload the stream once the live window again advertises protected content, playback works fine.
This is an important scenario to work if someone wants to use unencrypted/unprotected content for ads as you cannot be sure when viewers will join a live event.
I am not seeing this issue with ExoPlayer
The text was updated successfully, but these errors were encountered: