Unable to play MP4Box encrypted video using widevine crypt file.

1,467 views
Skip to first unread message

koustubh desai

unread,
May 24, 2016, 7:45:21 AM5/24/16
to Shaka Player Users
Hello Everybody,

I am not able to play MP4Box encrypted content in Shaka player. 
I used a crypt file(widevine.xml) to encrypt the content and then created audio and video separate init files.
All these details are in the out_cenc_widevine_dash.mpd file. 

Below are the error messages generated in browser console when tried to play the content.
No Period ID given for Period with start time 0, Assigning a default No license server configured for org.w3.clearkey It is recommended that a robustness level be specified. Not specifying the robustness level could result in unexpected behavior in the future, potentially including failure to play. Player error s…a.u…l.Error {category: 6, code: 6006, data: Array[1], message: "Shaka Error DRM.FAILED_TO_GENERATE_LICENSE_REQUEST (Rejected with system code (2))", stack: "Error: Shaka Error DRM.FAILED_TO_GENERATE_LICENSE_…8080/shaka-player/lib/media/drm_engine.js:718:19)"}category: 6code: 6006data: Array[1]message: "Shaka Error DRM.FAILED_TO_GENERATE_LICENSE_REQUEST (Rejected with system code (2))"stack: "Error: Shaka Error DRM.FAILED_TO_GENERATE_LICENSE_REQUEST (Rejected with system code (2))↵ at new shaka.util.Error (http://localhost:8080/shaka-player/lib/util/error.js:77:13)↵ at .<anonymous> (http://localhost:8080/shaka-player/lib/media/drm_engine.js:718:19)"__proto__: Object Player error s…a.u…l.Error {category: 6, code: 6006, data: Array[1], message: "Shaka Error DRM.FAILED_TO_GENERATE_LICENSE_REQUEST (Rejected with system code (2))", stack: "Error: Shaka Error DRM.FAILED_TO_GENERATE_LICENSE_…8080/shaka-player/lib/media/drm_engine.js:718:19)"}category: 6code: 6006data: Array[1]message: "Shaka Error DRM.FAILED_TO_GENERATE_LICENSE_REQUEST (Rejected with system code (2))"stack: "Error: Shaka Error DRM.FAILED_TO_GENERATE_LICENSE_REQUEST (Rejected with system code (2))↵ at new shaka.util.Error (http://localhost:8080/shaka-player/lib/util/error.js:77:13)↵ at .<anonymous> (http://localhost:8080/shaka-player/lib/media/drm_engine.js:718:19)"__proto__: Object Player error s…a.u…l.Error {category: 6, code: 6011, data: Array[0], message: "Shaka Error DRM.WRONG_KEYS ()", stack: "Error: Shaka Error DRM.WRONG_KEYS ()↵ at new sh…8080/shaka-player/lib/media/drm_engine.js:652:17)"}category: 6code: 6011data: Array[0]message: "Shaka Error DRM.WRONG_KEYS ()"stack: "Error: Shaka Error DRM.WRONG_KEYS ()↵ at new shaka.util.Error (http://localhost:8080/shaka-player/lib/util/error.js:77:13)↵ at shaka.media.DrmEngine.onWaitingForKey_ (http://localhost:8080/shaka-player/lib/media/drm_engine.js:652:17)"__proto__: Object

It would be great if someone help me figure out what is the actual problem here.

Thanks and Regards,
Koustubh
out_cenc_widevine_dash.mpd
widevine.xml

tdr...@google.com

unread,
May 24, 2016, 1:19:37 PM5/24/16
to Shaka Player Users
Hi,

If the keys are coming from an actual license server, you need to include the following ContentProtection element in your manifest:
<ContentProtection schemeIdUri="urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b" />
and specify a license server:
player.configure({
  drm: {
    servers: {
      'org.w3.clearkey': 'http://foo.bar/drm/clearkey'
    }
  }
});

Otherwise, you can specify the keys directly:
player.configure({
  drm: {
    clearKeys: {
      'deadbeefdeadbeefdeadbeefdeadbeef': '18675309186753091867530918675309',
      '02030507011013017019023029031037': '03050701302303204201080425098033'
    }
  }
});

Please see the DRM tutorial for more information.

Regards,
Tim

koustubh.des...@gmail.com

unread,
May 26, 2016, 8:16:38 AM5/26/16
to Shaka Player Users
Hey Tim,

Thanks for replying, this was helpful and was able to play the content with clearKeys. 
I am trying to play the same content by using the license server but the player is not hitting the server, instead 
giving following error

  1. "Shaka Error DRM.REQUESTED_KEY_SYSTEMS_UNAVAILABLE ()"
  2. stack:"Error: Shaka Error DRM.REQUESTED_KEY_SYSTEMS_UNAVAILABLE ()↵ at new shaka.util.Error (http://localhost:8080/shaka-player/lib/util/error.js:77:13)↵ at http://localhost:8080/shaka-player/lib/media/drm_engine.js:431:27"

Well this error says key systems are available and a key server and a license server URI is required. But I have actually added it. Please see below:

   drm:{servers:{'org.w3.clearkey':'http://localhost:8081/printres'}}

Here '/printres' is a simple servlet which respond with of two parameters appData and the license key used for encryption
{
    appDate: "SomeData",
    license: "ccc0f2b3b279926496a7f5d25da692f6"
}

But player does not hit the server. Did I miss something or is there something else to add?

I referred these :: 


Regards,
Koustubh

Joey Parrish

unread,
Jun 6, 2016, 7:24:48 PM6/6/16
to koustubh.des...@gmail.com, Shaka Player Users
It looks like we recently broke clearkey license server support.  I've filed #403 to track this.


--
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-us...@googlegroups.com.
To post to this group, send email to shaka-pla...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shaka-player-users/5fa1c3ce-9305-4380-b3c5-26333acb570b%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Vinix Wu

unread,
Aug 1, 2017, 2:58:10 AM8/1/17
to Shaka Player Users, koustubh.des...@gmail.com
So is this bug solved? I can not use this clearkey server, still.

Joey Parrish於 2016年6月7日星期二 UTC+8上午7時24分48秒寫道:
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,
Aug 1, 2017, 1:32:46 PM8/1/17
to Shaka Player Users, koustubh.des...@gmail.com
Yes, this was solved over a year ago.  Here's a demo from our latest release:


You can see the clearkey license request in the network panel of the JavaScript debugger.  There is a post to https://cwip-shaka-proxy.appspot.com/clearkey that returns this clearkey license:

{"keys": [{"k": "ABEiM0RVZneImaq7zN3u_w", "kty": "oct", "kid": "_u3wDe7erb7v8Lqt8A3QDQ"}], "type": "temporary"}

If the demo link above isn't working for you, you may be using a browser that doesn't support ClearKey.  I know that Chrome, Opera, and Firefox support it, but Safari, Edge, and IE didn't the last time I checked.

If the demo link is working for you, but your own clearkey server isn't, you may have a bug in your license server.  Or, you may be misconfiguring Shaka Player.  See the "Clear Key Licenses" section of this tutorial for configuration information: https://shaka-player-demo.appspot.com/docs/api/tutorial-drm-config.html

Does this help?
-Joey


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