Ungoogled-chromium: Widevine CDM not working

Created on 1 Oct 2016  路  61Comments  路  Source: Eloston/ungoogled-chromium

Allow installation of WidevineCdm under chrome://components/ to allow viewing of videos on Amazon Video.

bug

Most helpful comment

This shouldn't be closed since the issue happen on each ungoogled-chromium update :(

All 61 comments

I already included a patch from Inox that should make the Widevine CDM module work. Is it not working?

No, I'm not seeing it in chrome://components/ or chrome://plugins/ I'm running MacOS Sierra. I've also tried installing the standalone Widevine plugin but don't see any change, please see attached screenshots.

screen shot 2016-10-01 at 19 25 55
screen shot 2016-10-01 at 19 27 09
screen shot 2016-10-01 at 19 27 15

Huh, that is strange. I don't know if the Widevine patch works on macOS, but I heard it works on Linux.

@9Morello: Have you tried to get Widevine to work on macOS before?

It works in regular chrome.

@Eloston I haven't. I'll try to install it as soon as I can.

Hello, I have the same issue on the lastest Windows build. Netflix doesn't work.
Running Windows 7.
ungoogled

Can anyone else confirm that this doesn't work on Windows? I haven't had time to test this on Linux, so if someone could try that too that would help.

Hmm. I wonder if domain substitution is breaking the Widevine DRM checking. I'm guessing that you don't see an infobar show up when you attempt to use widevine?

So it works properly on Linux, but not Windows or macOS? That's weird. This is probably not be a domain substitution problem then.

@chrme: Would you mind telling us what did you do to get Widevine to work in your Windows builds? Do you know if it works on macOS?

@henrypp Sorry to bother you, but can you help us with this?

@Eloston does the Windows and OS X builds use the enable_widevine = true flag?

@9Morello Is that a GN flag? I'm still on GYP. Though I'm probably going to switch in ungoogled-chromium 54 or 55.

I'm not sure, I saw it in this comment.
According to this other comment, its a GYP flag.

Huh. You know, it would probably be a good idea to enable that flag.

I'll try building and testing with the tool from this comment and see if it works.

@9Morello Sounds good. Thanks.

Compiled with the enable_widevine=1 flag and there wasn't any differences. The widevine plugin still doesn't appear on chrome://components or chrome://plugins. I cannot select the widevine videos on the site to test them.

@9Morello Well that sucks. I guess the investigation continues...

Ok, I've found some clues.
Adding the enable_widevine=1 flag actually made it compile the Widevine plugin components. They just weren't added to the Chromium.app package for some reason. The files libwidevinecdm.dylib and widevinecdmadapter.plugin are inside the /out folder. I tested them and they work, enabling playback on that test site as well on Netflix.

However, a manifest.json file is also required for Widevine and, for some reason, it isn't being build. I discovered this by downloading Google Chrome and looking into their .app folder. There, I found the 2 Widevine files plus the manifest.json.

On OS X, you can get Widevine support on ungoogled-chromium by doing this:
1) Create a file with the name manifest.json and the following contents:

{
  "manifest_version": 2,
  "update_url": "https://clients2.google.com/service/update2/crx",
  "name": "WidevineCdm",
  "description": "Widevine Content Decryption Module",
  "offline_enabled": false,
  "version": "1.4.8.903",
  "minimum_chrome_version": "47.0.2526.0",
  "x-cdm-module-versions": "4",
  "x-cdm-interface-versions": "8",
  "x-cdm-host-versions": "8",
  "x-cdm-codecs": "vp8,vp9.0,avc1",
  "icons": {
    "16": "imgs/icon-128x128.png",
    "128": "imgs/icon-128x128.png"
  },
  "platforms": [
    {
      "os": "win",
      "arch": "x86",
      "sub_package_path": "_platform_specific/win_x86/"
    },
    {
      "os": "win",
      "arch": "x64",
      "sub_package_path": "_platform_specific/win_x64/"
    },
    {
      "os": "mac",
      "arch": "x86",
      "sub_package_path": "_platform_specific/mac_x86/"
    },
    {
      "os": "mac",
      "arch": "x64",
      "sub_package_path": "_platform_specific/mac_x64/"
    }
  ]
}

2) Get inside your Chromium.app package, and go to Contents/Versions/your_chromium_version/Chromium Framework.framework/
3) Create a Libraries folder there
4) Inside it, paste the WidevineCdmfolder from the /out folder.
5) Put the manifest.json inside the WidevineCdm folder.

It should work now. Alternatively, you can just download Chrome and copy the Libraries folder from their package - it also works, even if the Chromium and Chrome versions don't match.
Putting these files inside a Chromium.app package that was built without the enable_widevine=1 flag doesn't work.

The Windows/Linux builds might be getting similar behavior (widevinecdm.dll/libwidevinecdm.so files left in the out folder without being used). We probably can get Widevine support in a similar way with them.

You have libwidevinecdm.dylib? That's weird. We don't have the source code to that library, which means it must have downloaded while it's building. Only the widevinecdmadapter library is built.

BTW, I scanned the GYP file and it seems that the manifest.json file is also provided before the build starts. So it seems we're only supposed to have the widevinecdmadapter library.

EDIT: If we need to modify any meta-build configuration files, I would like to wait until we've switched to GN first.

Yes, I have libwidevinecdm.dylib. Its probably as you said.
Its fine by me to wait. Are we going to get any other releases before the switch to GN?

I'm still deciding how to do this transition. Windows and Mac are the only platforms where GYP is becoming a bit troublesome, with bugs #89 and #60, respectively. Linux will be a lot more work due to the use of multiple flags not available in GN and heavy modifications to build against system libraries. So I might switch Windows and Mac to GN before another release, and wait until later to switch Linux over.

Right now, inox-patchset is holding back the update to 54. Though I will try to squeeze in time this weekend to update the necessary patches to GN.

Okay.
Any clues on why those 2 files are not being moved to the Chromium.app package?

Not exactly sure yet since the packaging method is unique on Mac, but it's more than likely related to the differences in behavior when using Chromium instead of Chrome for branding.

chrome_2016-11-11_02-27-27

Windows 7 user, latest release. Same error as OP.

@lewdnasty I didn't enable Widevine properly in the Windows build published on GitHub. Once I get version 54 to build on Windows, then we can start testing.

@9Morello Does the new version 54 build you made still miss those files?

@Eloston Yes, the files are still missing. They weren't even downloaded, as they're also missing from the /out/Release folder.

@9Morello Alright. I have widevine files in my output directory, but they give me the same error as in this comment. So it seems that switching to GN has no effect on this issue.

@9Morello, @Eloston: enable_widevine=1 just enables the support for widevine. You need libwidevinecdm.so is in the browsers working directory (at least for linux). If you have a local chromium installation where widevine works you can symlink it. I created a section in the README for this: https://github.com/gcarq/inox-patchset#use-widevine. Tested with ArchLinux and Netflix.

@gcarq Thanks for replying. In OS X's case, the libwidevinecdm.dylib file is downloaded and placed in the correct folder inside the Chromium.app package, but for some reason its broken. Its smaller than the one Chrome provides (1.4MB vs 5.2MB)

Replacing it with Google Chrome's libwidevinecdm.dylib fixes the problem.

@gcarq Thanks for your input. altblitz got Widevine to work just fine on Linux doing exactly what you said.

@9Morello On Linux, a stub version of libwidevinecdm.so is built. I'm assuming Windows and macOS have the same behavior (but have their respective file names). It's not broken, it's just a dummy placeholder. You will always need to get the official library from Chrome, unless they miraculously release the source code. Also, I am fairly confident the dummy binary is not being downloaded from the web, because the source code's referenced from the GN configuration (and domain substitution would've broken it anyway)

@Eloston @gcarq Thanks for clarifying. I'm going to upload the new OS X binaries today.

@9Morello If those OS X binaries that are widevine compatible are available somewhere, I can't find them. Only thing I see on the uploads page is version 55.0.2883.75-1, no 87-1.

@pjv here

@9Morello Thanks!

Only thing I see on the uploads page is version 55.0.2883.75-1, no 87-1.

Looks like I need to make the link bigger.

Looks like I need to make the link bigger.

Actually, i think you are linking to the wrong 3rd party releases page from the main releases page. Or that 3rd party page needs to be updated to include @9Morello's newer builds here: https://github.com/ungoogled-software/ungoogled-chromium-binaries/releases/tag/55.0.2883.95

@pjv Ah. Yeah looks like @9Morello forgot to update all of the references. Going to fix it right now.

@pjv @Eloston Whoops, my bad.

Only thing I see on the uploads page is version 55.0.2883.75-1, no 87-1.

Looks like I need to make the link bigger.

@Eloston will you no longer be including any macOS builds from now on? Because then the eloston-chromium formula for Homebrew Cask should be updated to point at @9Morello鈥檚 builds. I don鈥檛 mind doing that, but if the next version will be on this repo again, I don鈥檛 really see the point.

@Zegnat With the new download page design, you should be reading files from here. There is no guarantee as to where macOS binary files will reside, but the downloads webpage should be using that configuration file format for a while.

Now that Widevine support builds on all of the platforms, we should probably add some instructions to the FAQ to let users know how to install the module. I will take care of the instructions for Linux.

EDIT: Does anyone think it will be worthwhile to have two kinds of builds for each configuration? One with Widevine and one without? (Woolyss does this)

@Eloston I saw he does. I like his idea. But if we offer that, we should also offer LKGR, if nojmp helps to keep the patches up to date.

@Eloston @9Morello Instructions for widevine for macos would be appreciated. I think I have actually done what's needed -- copied the WidevineCDM directory from ~/Library/Application Support/Google/Chrome/WidevineCDM to ~/Library/Application Support/Chromium/WidevineCDM -- but it is not working for me, even though chromium is registering that it is there in chrome://components/.

I tried clicking the "Check for update" button, and I get "Component not updated"
2016-12-30 at 4 40 am

@pjv Put the latest Google Chrome.app and the Chromium.app in the same folder. Open that folder in the terminal and run this:

cp -R Google\ Chrome.app/Contents/Versions/55.0.2883.95/Google\ Chrome\ Framework.framework/Libraries/WidevineCdm Chromium.app/Contents/Versions/55.0.2883.95/Chromium\ Framework.framework/Libraries/

@9Morello Finally. - Thanks!

Closing now, since this bug seems to be resolved.

@Eloston Amazon Video still doesn't seem to work, please let me know if you'd like further help debugging this.

screen shot 2017-02-08 at 11 46 02 am

@stfnhrrs I'm going to assume you're following the instructions in the FAQ.

What version of Google Chrome did you take the WidevineCdm files from?

@Eloston I did follow the instructions, I'm using version 55.0.2883.95 of Google Chrome.

@stfnhrrs I'm not really sure what's going on. You're still on macOS, right?

@Eloston yes MacOS 10.12.3 (16D32)

Any ideas @9Morello?

@stfnhrrs could you please post a screenshot of your about:plugins page?

@9Morello
screen shot 2017-02-28 at 10 22 42 am

Did you follow this post's instructions? It should be showing the correct version of Widevine.

I can confirm this fix just worked for me on Windows 10 and Chromium 72.0.3626.109

@sbeh , thank you for contributing but I can't follow you, your links brings to a reply with a mac os fix, not a windows one. I'm trying to install widevine on 72.0.3626.109 under windows 10 and I would be very grateful if you can expand more. Many thanks

@wokawoka I installed Chrome into a VM and then copied C:\Users\...\AppData\Local\Google\Chrome\Application\72.0.3626.109\WidevineCdm into my ungoogled-chromium directory (that one with the chrome.exe-File). Result was a previously not and now working Netflix ;)

@sbeh, thanks, that's what I also previosly did but I forgot to close all the active windows in background (chromium needed a restart). Thank you very much again
P.S.: In order to get the widevine addon I just installed chrome parallely to chromium on the same machine.

This shouldn't be closed since the issue happen on each ungoogled-chromium update :(

Was this page helpful?
0 / 5 - 0 ratings

Related issues

playgithub picture playgithub  路  3Comments

Darthagnon picture Darthagnon  路  3Comments

hrj picture hrj  路  3Comments

WackyModder84 picture WackyModder84  路  4Comments

brianegan picture brianegan  路  3Comments