Bug 17449 - add some support for widevine plugin to chromium (non-free DRM used by netflix, amazon video and others)
Summary: add some support for widevine plugin to chromium (non-free DRM used by netfli...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: New RPM package request (show other bugs)
Version: 5
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Christiaan Welvaart
QA Contact:
URL: https://aur.archlinux.org/packages/ch...
Whiteboard: MGA6TOO MGA5TOO
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-05 15:46 CET by Christian Lohmaier
Modified: 2019-06-06 20:05 CEST (History)
4 users (show)

See Also:
Source RPM: chromium-browser-stable-47.0.2526.106-1.mga5.src.rpm
CVE:
Status comment:


Attachments

Description Christian Lohmaier 2016-01-05 15:46:44 CET
Description of problem:
chromium browser doesn't come with the widevine content decryption module that's necessary to play back video from streaming services like amazon video or netflix.

Chrome browser provided by google does come with the plugin preinstalled, and other distros do provide that nonfree plugin for installation in chromium browser.

Mageia should also offer a widevine plugin for chromium browser that could work more or less like the adobe flash one: a rpm that downloads the real thing and puts stuff in the directories that are used by chromium (in case of offering a binary package is considered a no-go)

######
Chromium package itself needs a minimal patch to make use of the plugin e.g.:
https://gitweb.gentoo.org/repo/gentoo.git/tree/www-client/chromium/files/chromium-widevine-r1.patch?id=2bfec00de28a574766c1434d8e1a9c9b9d0452a1

or:
https://projects.archlinux.org/svntogit/packages.git/tree/trunk/chromium-widevine.patch?h=packages/chromium

(the placeholder gets replaced by "Pinkie Pie" in the pkgbuild, so it is just a dummy and doesn't need to be the proper version)

Reproducible: 

Steps to Reproduce:
Comment 1 David Walser 2016-01-07 00:52:03 CET
If this plugin is only available as something bundled with Chrome, it can't itself reasonably be packaged for the same reason that Pepper Flash can't.  This is as opposed to the NPAPI (Firefox) Flash plugin which we have that downloader for that you mentioned, since it actually has something it can download.

As our Chromium package can use Pepper Flash as long as you have upstream's Chrome package installed, we should make sure at least that is also true for this widevine plugin, so if that's not currently the case and we need a patch like the ones you linked, we should be able to do that.

CC: (none) => mageia
Assignee: bugsquad => cjw

Comment 2 Christian Lohmaier 2016-01-07 17:14:13 CET
see https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=chromium-widevine for a recipe on how to extract the plugin-files.

The problem for Mageia I guess is that there are no old builds of chrome available for download, so there is no rebuildability/you can only build version "x" when version "x" is the current version of chrome..
If I read the discussion on pepper flash correctly, it only was rejected since it would download and then throw away ~50MB just for the little plugin, but not for other reasons ( bug#13118 )

But patching chromium so that the user can manually extract and add the files is necessary first step, whether there will be a plugin package or not.
Comment 3 Christiaan Welvaart 2016-01-07 18:13:57 CET
First of all, how to test this? I do not have a working netflix account (and besides, the netflix site currently gets into a redirect loop in chromium). https://www.widevine.com/demo/demo.html says "Widevine Video Optimizer is not installed" while I still have an old libwidevinecdm.so in the chromium directory.

Then, the browser -> widevine interface is not any standard AFAIK, unlike pepper and NPAPI, so I would expect users to have to install a new widevine plugin for each new major chromium version.

Lastly, I do not want to carry a patch that is likely to be broken, so unless there is some certainty that it will keep working it would have to be tested regularly (when the package is updated). But I'm not going to do that.

I'll try to take a look at the patch(es) I have, maybe check if anything changed recently in gentoo (or archlinux).
Comment 4 Christian Lohmaier 2016-01-07 19:53:11 CET
you don't need netflix - amazon video also supports widevine, and you can also use http://www.dash-player.com/demo/drm-test-area/ to see sample stream, or http://demo.castlabs.com/

of course 
    chrome://components and chrome://plugins
should also list it

And yes, of course you see it complain about not being installed, since the mentioned patch that is needed for chromium.

Widevine is standard, but how it is hooked up to google chrome (or chromium) is non-standard, as you mention the traditional pluginsystems get deprecated. widevine also exists as a plugin for other browsers, but then of course playback requires flash again http://pipelight.net/cms/plugin-widevine.html ... 

And no, the widevine plugin won't change frequently/the user won't have to reinstall with every bugfix in chromium browser, widevine is only for the drm-part, and that is not likely to change frequently. However if you want to install, you can only extract it from whatever version of chrome is available for download.

The patch that's needed in chromium package to optionally make use of the widevine stuff is minimal

+#define WIDEVINE_CDM_VERSION_STRING "something"

(older versions of chromium required some more lines)
Comment 5 Christiaan Welvaart 2016-01-07 21:44:12 CET
(In reply to Christian Lohmaier from comment #4)
> you don't need netflix - amazon video also supports widevine, and you can
> also use http://www.dash-player.com/demo/drm-test-area/ to see sample
> stream, or http://demo.castlabs.com/
> 
> of course 
>     chrome://components and chrome://plugins
> should also list it

Currently listed there (in my 49.0.2593.0 build), but doesn't appear to work.

> And no, the widevine plugin won't change frequently/the user won't have to
> reinstall with every bugfix in chromium browser, widevine is only for the
> drm-part, and that is not likely to change frequently. However if you want
> to install, you can only extract it from whatever version of chrome is
> available for download.

Indeed, it's still the same version as when I got it working.

> The patch that's needed in chromium package to optionally make use of the
> widevine stuff is minimal
> 
> +#define WIDEVINE_CDM_VERSION_STRING "something"
> 
> (older versions of chromium required some more lines)

Maybe the patch I used up to now doesn't work anymore, still need to check (with "unstable" 49 first).

Thanks for looking into this.

Status: NEW => ASSIGNED

Comment 6 Christiaan Welvaart 2016-01-07 22:47:06 CET
Figured it out: I never packaged libwidevinecdmadapter.so, while the one from the latest chrome 49 doesn't work . With the locally built libwidevinecdmadapter.so and libwidevinecdm.so from chrome Google play movies works at least.

CC: (none) => cjw

Comment 7 David Walser 2016-01-14 17:19:25 CET
I noticed that ROSA just added this (among other things) to their chromium build flags:
-Denable_widevine=1

https://abf.rosalinux.ru/import/chromium-browser-stable/commit/5e35b3a689fb8781cd37acc6692d3be98277c5ef

but is this plugin nonfree or tainted?  Which is it?  If it's just tainted (patent issues) we could enable it in a tainted build (not that I want to have dual builds again...) but if it's nonfree, then we'd have to have a nonfree build (again, not that I want to have dual builds, and we certainly can't have both nonfree and tainted).  Anyway, it looks like maybe this is something that needs to be enabled in the chromium build itself if it's going to work.

Summary: tainted: Widevine plugin for chrome (DRM-support for netflix, amazon video and others) => tainted: Widevine plugin for chromium (DRM-support for netflix, amazon video and others)

Comment 8 Christiaan Welvaart 2016-01-14 17:43:05 CET
How are users supposed to tell chromium to use the widevine loadable module they extracted from a downloaded chrome package?


> but is this plugin nonfree or tainted?  Which is it?

Widevine for linux is only distributed with chrome which AFAIK is not redistributable, so we can only facilitate users who want to install this DRM module themselves - and use it with chromium instead of chrome.(In reply to David Walser from comment #7)

Summary: tainted: Widevine plugin for chromium (DRM-support for netflix, amazon video and others) => add some support for widevine plugin to chromium (non-free DRM used by netflix, amazon video and others)

Comment 9 Christiaan Welvaart 2016-06-22 23:33:30 CEST
The widevine interface has been enabled in chromium-browser-stable since release 47.0.2526.111-2.mga6, has anyone tested this?
Comment 10 Christian Lohmaier 2016-07-01 18:33:09 CEST
once there are mga6 live iso's I'm happy to test, but I don't have enough diskspace to install mga6...
Comment 11 katnatek 2017-09-22 06:52:34 CEST
(In reply to Christiaan Welvaart from comment #9)
> The widevine interface has been enabled in chromium-browser-stable since
> release 47.0.2526.111-2.mga6, has anyone tested this?

Not working 

[3979:4004:0921/234721.300893:ERROR:service_manager.cc(142)] Connection InterfaceProviderSpec prevented service: content_plugin from binding interface: memory_instrumentation::mojom::Coordinator exposed by: content_browser
[1:1:0921/234721.302168:ERROR:ppapi_thread.cc(333)] Failed to load Pepper module from /usr/lib/chromium-browser/libwidevinecdmadapter.so (error: /usr/lib/chromium-browser/libwidevinecdmadapter.so: no se puede abrir el fichero del objeto compartido: Operación no permitida)

The last part say: can not load the file of shared object Not valid operation
I download and install the libwidevinecdm.so in right place

CC: (none) => j.alberto.vc

katnatek 2017-09-23 19:57:32 CEST

Whiteboard: (none) => MGA6TOO MGA5TOO
Keywords: (none) => IN_ERRATA5, IN_ERRATA6

Comment 12 Christian Lohmaier 2017-11-10 23:20:19 CET
finally tested it myself - seems like katnatek made a little mistake in the translation of the message/failed to recognize that it is simply a permission problem, or some further fixes did occur in chromium-browser (using 60.0.3112.101-1.mga6 as of this test)

If you download 

https://dl.google.com/widevine-cdm/1.4.8.1008-linux-x64.zip

(url taken from the abovementioned archpackage: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=chromium-widevine - 32 bit version uses ia32 label)

and unzip it, the libwidevinecdm.so (and the manifest.json and LICENCE.txt) have rw---- permissions only - so when you copy it as such to /usr/lib64/chromium-browser/ , the file cannot be read by regular user and the result is failure (so proper translation would be "permission denied", instead of "not valid operation")

tldr; – full recipe (for x86_64) (and all a "tainted" spec would have to do):

$ mkdir /tmp/widevine; cd /tmp/widevine
$ wget https://dl.google.com/widevine-cdm/1.4.8.1008-linux-x64.zip
$ unzip 1.4.8.1008-linux-x64.zip
$ chmod a+r libwidevinecdm.so
$ su
# cp libwidevinecdm.so /usr/lib64/chromium-browser/

after that I can successfully play the DRM version of Bick Buck Bunny from the demo site mentioned earlier ( https://demo.castlabs.com/ ) and the test site https://bitmovin.com/mpeg-dash-hls-drm-test-player/ also lists widevine as supported EME. And also real-life usecase is happy: SkyGo (Germany) also works with it.

So chromium-browser packaging part is fixed, what remains is decision whether mageia would like to have a easy-to-use "download the binary and extract" package like it did in the past with flash (but with the benefit that in this case the binary download really just is the needed component, not XX MB in addition that need to be thrown away)
Christian Lohmaier 2017-11-10 23:22:54 CET

See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=20617

Comment 13 katnatek 2017-11-11 00:32:05 CET
(In reply to Christian Lohmaier from comment #12)

I will test your fix in my script (inspired in arch linux package) get-widevine 
If works i release a new version of the package that includes it
Comment 14 katnatek 2017-11-13 20:30:10 CET
I test the fix in #c12 , and make fixes in my script, i put a direct download in our repository http://ftp.blogdrake.net/mageia/get-widevine.sh

I will write info in the Erratas, it its okay recommend our third party package in the Errata ?
Comment 15 katnatek 2017-11-13 22:37:00 CET
I think this can be closed with Fixed or WorksForMe
Comment 16 katnatek 2017-11-14 18:42:50 CET
I release a fix in the get-widevine script, if some one already download it, please download again or download the fixed rpm
Comment 17 katnatek 2018-01-24 23:51:25 CET
Tested and working so closing as FIXED

Resolution: (none) => FIXED
Status: ASSIGNED => RESOLVED

Comment 18 Christian Lohmaier 2018-10-15 15:36:54 CEST
FYI: current chromium browser (68 and up) needs newer version of the library.

Current downloadlink:
 https://dl.google.com/widevine-cdm/4.10.1146.0-linux-x64.zip

(see https://dl.google.com/widevine-cdm/versions.txt for latest versions of the 1.x and 4.x lines)
Comment 19 katnatek 2018-10-15 19:33:31 CEST
(In reply to Christian Lohmaier from comment #18)
> FYI: current chromium browser (68 and up) needs newer version of the library.
> 
> Current downloadlink:
>  https://dl.google.com/widevine-cdm/4.10.1146.0-linux-x64.zip
> 
> (see https://dl.google.com/widevine-cdm/versions.txt for latest versions of
> the 1.x and 4.x lines)

I will make in the script, as i recommend in the wiki https://wiki.mageia.org/en/Mageia_6_Errata#Chromium_Browser , install the rpm and blogdrake's noarch repository.
Comment 20 katnatek 2018-10-15 21:09:03 CEST
> (In reply to Christian Lohmaier from comment #18)
> > FYI: current chromium browser (68 and up) needs newer version of the library.
> > 
> > Current downloadlink:
> >  https://dl.google.com/widevine-cdm/4.10.1146.0-linux-x64.zip
That is the version downloaded by the script in the package, BTW your info helps me to add code to check current version :)

I update the information in the Errata to recommend only the method of installing the last package that contain the script.
Comment 21 Rahul Rajput 2019-02-15 07:05:37 CET
If you con not play the video. Then there is with your browser's widevine plugin. This is happen when the plugin not update with latest version. 

How to fix Widevine Content Decryption Module update error

1. Upadte your plugin.
2. Enable Widevine Content Decryption Module.
3. Reinstall Widevine Content Decryption Module.
4. Try to give full permission to Widevine Content Decryption Module.

I found this amazing way to fix Widevine Content Decryption Module. You can read it from here: https://www.techbian.com/widevine-content-decryption-module-update-error/

CC: (none) => rahul.rajput.tm

Comment 22 katnatek 2019-02-15 20:17:08 CET
Script get-widevine updated, get the last version from https://wiki.mageia.org/en/Mageia_6_Errata#Chromium_Browser

Fix bug with the detection of last version of the plugin
Christian Lohmaier 2019-05-18 18:16:35 CEST

Blocks: (none) => 24835

katnatek 2019-06-06 20:05:47 CEST

Blocks: 24835 => (none)


Note You need to log in before you can comment on or make changes to this bug.