Skip to content
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

Add Widevine asset that does not require proprietary codecs #540

Closed
magreenblatt opened this issue Oct 5, 2016 · 9 comments
Closed

Add Widevine asset that does not require proprietary codecs #540

magreenblatt opened this issue Oct 5, 2016 · 9 comments
Assignees
Labels
status: archived Archived and locked; will not be updated type: question A question from the community

Comments

@magreenblatt
Copy link

  • What version of Shaka Player are you using?

Current demo version at http://shaka-player-demo.appspot.com/demo/

  • What did you do?

Build a Chromium-derived product with Widevine support but without proprietary codecs support. This is a common configuration used by projects such as Chromium Embedded Framework (CEF): https://bitbucket.org/chromiumembedded/cef. There are a number of companies using CEF which are also Widevine licensees. Having a pre-existing option for Widevine playback without requiring proprietary codecs would make testing of Widevine support in CEF easier.

  • What did you expect to happen?

There should be an asset for testing Widevine playback that does not also require proprietary codecs.

  • What actually happened?

All Widevine assets are grayed out in the "Asset" select menu when Chromium is built without proprietary codecs support.

@joeyparrish joeyparrish added the type: question A question from the community label Oct 5, 2016
@joeyparrish joeyparrish self-assigned this Oct 5, 2016
@joeyparrish
Copy link
Member

@magreenblatt, proprietary codecs refers to MP4, as opposed to WebM. Chromium or CEF built without proprietary codec support should still be able to play WebM or multicodec (MP4 + WebM) content. We have many such assets in the demo app already.

The first asset in the list, "Angel One (multicodec, multilingual)" should be playable for you in CEF. Please confirm.

The second asset in the list, "Angel One (multicodec, multilingual, Widevine)" should be playable if you have a Widevine CDM, which you may not, depending on your Chromium build config. This is completely different from having support for proprietary codecs.

The third asset in the list, "Angel One (multicodec, multilingual, ClearKey server)" should be playable as long as you have ClearKey support. This is usually built into Chromium and should be available to you. Please confirm.

Finally, you should use https://shaka-player-demo.appspot.com/support.html to get a complete report of what is and isn't supported by your build of CEF. This breaks out support for various containers, codecs, and DRM systems. If you are having trouble getting playback in Shaka Player, a copy of this report is very valuable information for us and will help us direct you to the right fix in your CEF build.

Does this help?

@joeyparrish joeyparrish added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Oct 5, 2016
@magreenblatt
Copy link
Author

I'm testing using a local build of M53 on Windows (32-bit). In my local build with proprietary codecs enabled (GN settings of "proprietary_codecs=true ffmpeg_branding=Chrome") and Widevine disabled the "Angel One (multicodec, multilingual)" and "Angel One (multicodec, multilingual, ClearKey server)" assets play. In the same build when I enable loading of Widevine version 1.4.8.903 the "Angel One (multicodec, multilingual, Widevine)" asset also plays.

If I create the same build without proprietary codecs then only the "Angel One (multicodec, multilingual)" option is enabled irrespective of whether Widevine is loaded. You can see the same behavior with the binaries here: http://opensource.spotify.com/cefbuilds/index.html (download the "Sample Application"). The support.html page reports the following:

Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36
v2.0.0

{
  "manifest": {
    "application/dash+xml": true,
    "application/x-offline-manifest": true,
    "mpd": true,
    "application/x-mpegurl": false,
    "application/vnd.apple.mpegurl": false,
    "application/vnd.ms-sstr+xml": false,
    "m3u8": false,
    "ism": false
  },
  "media": {
    "video/mp4; codecs=\"avc1.42E01E\"": false,
    "video/mp4": false,
    "audio/mp4; codecs=\"mp4a.40.2\"": false,
    "audio/mp4": false,
    "video/webm; codecs=\"vp8\"": true,
    "video/webm": true,
    "video/webm; codecs=\"vp9\"": true,
    "audio/webm; codecs=\"vorbis\"": true,
    "audio/webm": true,
    "audio/webm; codecs=\"opus\"": true,
    "video/mp2t; codecs=\"avc1.42E01E\"": false,
    "video/mp2t": false,
    "video/mp2t; codecs=\"mp4a.40.2\"": false,
    "text/vtt": true,
    "application/mp4; codecs=\"wvtt\"": true,
    "application/mp4": true,
    "application/ttml+xml": true,
    "application/mp4; codecs=\"stpp\"": true
  },
  "drm": {
    "org.w3.clearkey": null,
    "com.widevine.alpha": null,
    "com.microsoft.playready": null,
    "com.apple.fps.2_0": null,
    "com.apple.fps.1_0": null,
    "com.apple.fps": null,
    "com.adobe.primetime": null
  },
  "offline": true
}

How is Shaka player detecting the "drm" state? It's possible that this is a bug in Chromium -- some portion of the CDM detection logic being incorrectly gated on proprietary codec support.

@joeyparrish joeyparrish removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Oct 6, 2016
@joeyparrish
Copy link
Member

We're filling out the "drm" section of the support page by using EME APIs such as navigator.requestMediaKeySystemAccess. The code is here, if you are curious:

https://github.com/google/shaka-player/blob/addece60/lib/media/drm_engine.js#L1187

Perhaps Chromium intends to enable DRM only with MP4 support, perhaps not. I wish I could say for certain, but I honestly don't know. If you think it's a bug, please file it at crbug.com so the Chromium team can give you an authoritative answer.

If you do file a chromium bug, please post a link to the bug report so that we can track it as well.

@ddorwin
Copy link

ddorwin commented Oct 6, 2016

The Angel One option appears to support VP9 and Vorbis, presumably in WebM, so it should work without proprietary codecs.

However, looking at the referenced probing code, basicVideoCapabilities only specifies 'video/mp4; codecs="avc1.42E01E"'. Thus, only implementations that support MP4 and H.264 will report that success. Adding { contentType: 'video/webm; codecs="vp9"' } to the sequence should fix this.

@magreenblatt
Copy link
Author

@ddorwin: Thanks for the suggestion. After making your suggested change clearkey now shows up in the drm list:

"drm": {
    "com.microsoft.playready": null,
    "com.apple.fps.2_0": null,
    "com.apple.fps.1_0": null,
    "com.apple.fps": null,
    "com.adobe.primetime": null,
    "org.w3.clearkey": {
      "persistentState": false
    },
    "com.widevine.alpha": null
  },

However, Widevine is still not detected.

@joeyparrish
Copy link
Member

Looks like we forgot to probe WebM in DrmEngine! We'll get that fixed soon.

If Widevine is still not showing up as supported, perhaps something is set up incorrectly in your CEF build or its runtime environment. I think the CEF and Chromium issue trackers are your best bet for further assistance getting the Widevine CDM working correctly in CEF3. Shaka Player ends at JavaScript, so we can't really do much more for you here.

@magreenblatt
Copy link
Author

Agreed, thanks for looking into this. I'll debug further in the native code and report back with my findings.

@magreenblatt
Copy link
Author

After resolving an error in my code both Widevine and Clearkey support are now reporting correctly with the above change (adding { contentType: 'video/webm; codecs="vp9"' } in DrmEngine.probeSupport). I've also verified that a local build of Shaka Player successfully plays "Angel One (multicodec, multilingual, Widevine)" with this change (I get a 6006 error and CDM playback stops after 10 seconds, but I believe that's expected since my test server isn't licensed to play the sample videos).

shaka-bot pushed a commit that referenced this issue Oct 6, 2016
Issue #540

Change-Id: I908804e9334214dd4ed9d7546ce4d4d28dd69d01
@joeyparrish
Copy link
Member

Great, glad to hear it! We've fixed the probe code to add webm, so if there are no objections, I'll consider this resolved.

joeyparrish added a commit that referenced this issue Oct 19, 2016
Issue #540

Change-Id: I908804e9334214dd4ed9d7546ce4d4d28dd69d01
@shaka-project shaka-project locked and limited conversation to collaborators Mar 22, 2018
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: question A question from the community
Projects
None yet
Development

No branches or pull requests

4 participants