Widevine sample media and license requests

1,074 views
Skip to first unread message

Brad Stone

unread,
Apr 9, 2017, 5:53:05 PM4/9/17
to Shaka Player Users
Hi,

New shaka/eme user here.

I am looking at the Widevine SD "Tears of Steel" sample at https://storage.googleapis.com/wvmedia/cenc/h264/tears/tears_sd.mpd
This video adaptation set has two representations for the 240p and 480p videos. The video adaptation set has a single push that corresponds to the 240p video key.
The key ids are: 
MA== for audio, 
NQ== for 240p video, 
MQ== for 480p video

Playing this using the integration player works, but what I notice is that in the two license requests for the keys listed in the sd manifest for audio (MA==) and 240p (NQ==), the actual licenses contain all the keys for all of the resolutions (eight or nine keys in all).

On the other hand, if the license server just returns the two keys that are asked for in the first two requests, the video stops playing as soon as it switches to the 480p stream.

My question is: shouldn't the player notice the new key id when it switches to 480p and generate a license request? Or is it expected that the license server return all of the keys for all of the resolutions that the client is allowed to view?

Thanks.

Alex Lee

unread,
Apr 9, 2017, 7:19:46 PM4/9/17
to shaka-pla...@googlegroups.com
The Widevine test content is configured at the proxy to always return all keys for test content, regardless of how many tracks are being played - for uniform operation across all client platforms (especially Android).


--
You received this message because you are subscribed to the Google Groups "Shaka Player Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-player-users+unsub...@googlegroups.com.
To post to this group, send email to shaka-player-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shaka-player-users/2947bf14-6e8d-4b88-b660-852689670b07%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Brad Stone

unread,
Apr 9, 2017, 8:54:22 PM4/9/17
to Shaka Player Users
Thanks Alex. I get that the integration proxy makes a policy decision to return all the keys in a license.

My question is more about whether, if only the two keys mentioned in the MPD are delivered in licenses, the player should notice that one of the representations being transitioned to uses a different key id and ask for it. 

Or, given that the adaptation set specifies one key, should both representations in that adaptation set be using the same key?

Or something else entirely? 


On Monday, April 10, 2017 at 11:19:46 AM UTC+12, Alex Lee wrote:
The Widevine test content is configured at the proxy to always return all keys for test content, regardless of how many tracks are being played - for uniform operation across all client platforms (especially Android).
On Sun, Apr 9, 2017 at 2:53 PM, Brad Stone <king...@gmail.com> wrote:
Hi,

New shaka/eme user here.

I am looking at the Widevine SD "Tears of Steel" sample at https://storage.googleapis.com/wvmedia/cenc/h264/tears/tears_sd.mpd
This video adaptation set has two representations for the 240p and 480p videos. The video adaptation set has a single push that corresponds to the 240p video key.
The key ids are: 
MA== for audio, 
NQ== for 240p video, 
MQ== for 480p video

Playing this using the integration player works, but what I notice is that in the two license requests for the keys listed in the sd manifest for audio (MA==) and 240p (NQ==), the actual licenses contain all the keys for all of the resolutions (eight or nine keys in all).

On the other hand, if the license server just returns the two keys that are asked for in the first two requests, the video stops playing as soon as it switches to the 480p stream.

My question is: shouldn't the player notice the new key id when it switches to 480p and generate a license request? Or is it expected that the license server return all of the keys for all of the resolutions that the client is allowed to view?

Thanks.

--
You received this message because you are subscribed to the Google Groups "Shaka Player Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-player-users+unsub...@googlegroups.com.
To post to this group, send email to shaka-pla...@googlegroups.com.

Joey Parrish

unread,
Apr 9, 2017, 10:13:12 PM4/9/17
to Shaka Player Users
Hi Brad,

Shaka Player attempts to retrieve licenses for all keys upfront.  We do not request keys when we adapt, because that would introduce latency in adaptation, during which it would not be possible for playback to continue.

If there are PSSHs in the MPD, we will request one license per unique PSSH.  Since Widevine can deliver multiple keys in a single license, all Widevine PSSHs should (ideally) be the same to avoid any unnecessary license requests.

At the moment, we have no way at the player level to know exactly which keys will be delivered in a license, so unique PSSHs is the best approximation we have to guess how many licenses are needed.  Since we don't assume Widevine and we don't assume that we will only need one license, Shaka Player also works naturally for key systems that can only deliver one key at a time.

We expect that once we have requested licenses for all unique PSSHs and we have received licenses for each request, we will have all the keys will ever get. (Excluding live streams with key rotation, of course.)

If the licenses we have do not contain the key ID for a certain track, we will not switch to that track.  Before we have any licenses, we start streaming under the assumption that the key ID of the lowest resolution tracks will ultimately be available.

Does that help answer your question?

Thanks,
Joey


On Apr 9, 2017 17:54, "Brad Stone" <king...@gmail.com> wrote:
Thanks Alex. I get that the integration proxy makes a policy decision to return all the keys in a license.

My question is more about whether, if only the two keys mentioned in the MPD are delivered in licenses, the player should notice that one of the representations being transitioned to uses a different key id and ask for it. 

Or, given that the adaptation set specifies one key, should both representations in that adaptation set be using the same key?

Or something else entirely? 


On Monday, April 10, 2017 at 11:19:46 AM UTC+12, Alex Lee wrote:
The Widevine test content is configured at the proxy to always return all keys for test content, regardless of how many tracks are being played - for uniform operation across all client platforms (especially Android).
On Sun, Apr 9, 2017 at 2:53 PM, Brad Stone <king...@gmail.com> wrote:
Hi,

New shaka/eme user here.

I am looking at the Widevine SD "Tears of Steel" sample at https://storage.googleapis.com/wvmedia/cenc/h264/tears/tears_sd.mpd
This video adaptation set has two representations for the 240p and 480p videos. The video adaptation set has a single push that corresponds to the 240p video key.
The key ids are: 
MA== for audio, 
NQ== for 240p video, 
MQ== for 480p video

Playing this using the integration player works, but what I notice is that in the two license requests for the keys listed in the sd manifest for audio (MA==) and 240p (NQ==), the actual licenses contain all the keys for all of the resolutions (eight or nine keys in all).

On the other hand, if the license server just returns the two keys that are asked for in the first two requests, the video stops playing as soon as it switches to the 480p stream.

My question is: shouldn't the player notice the new key id when it switches to 480p and generate a license request? Or is it expected that the license server return all of the keys for all of the resolutions that the client is allowed to view?

Thanks.

--
You received this message because you are subscribed to the Google Groups "Shaka Player Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-player-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Shaka Player Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-player-users+unsub...@googlegroups.com.

Brad Stone

unread,
Apr 10, 2017, 12:22:52 AM4/10/17
to Shaka Player Users
Hi Joey,

I think I am getting closer. If I understand what you mean: The player checks the MPD and asks for a license for each unique pssh it finds there. The player does not check for PSSH in the media itself, so the DRMs need to provide all of the keys that will be needed for these representations in whatever licenses are returned (in the absence of key rotation).

The last point you made: "If the licenses we have do not contain the key ID for a certain track, we will not switch to that track." Does the knowledge whether you have a key for a track derive solely from the MPD? So that in the tears_sd.mpd example, the key referenced in the adaptation set is retrieved, and therefore the player believes it should be able to play the video in the representations of that adaptation set?

Thanks,
Brad
Joey


To unsubscribe from this group and stop receiving emails from it, send an email to shaka-player-users+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Shaka Player Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-player-users+unsub...@googlegroups.com.
To post to this group, send email to shaka-pla...@googlegroups.com.

Joey Parrish

unread,
May 11, 2017, 12:03:34 PM5/11/17
to Shaka Player Users
Hi Brad,

I apologize for the massive delay.  I lost track of this thread.

The player checks the MPD for PSSH & key IDs for each track.  If there is no PSSH in the manifest, we will then listen for events from the browser which contain the PSSH from the content itself.  If there is no key ID in the manifest, we will be unable to make decisions based on which key IDs we have/need.  There is no other easy source of this information.

So, yes, if we have the key corresponding to the key ID referenced in the AdaptationSet, we assume it is safe to attempt playback of that AdaptationSet.

Thanks,
Joey


Joey


To unsubscribe from this group and stop receiving emails from it, send an email to shaka-player-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Shaka Player Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-player-users+unsubscribe@googlegroups.com.

To post to this group, send email to shaka-pla...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Shaka Player Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shaka-player-users+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages