FS#44508 - [chromium] Add support for the widevine EME plugin

Attached to Project: Arch Linux
Opened by Arno Rehn (pumphaus) - Wednesday, 08 April 2015, 22:33 GMT
Last edited by Evangelos Foutras (foutrelis) - Friday, 17 April 2015, 22:52 GMT
Task Type Feature Request
Category Packages: Extra
Status Closed
Assigned To Evangelos Foutras (foutrelis)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Google Chrome supports playback of encrypted videos of Netflix (and possibly other content providers) through the Widevine EME plugin. However, simply copying the plugin over from Google Chrome to Chromium does not make it work. It seems to require some extra code snippets. Eric Hameleers builds Slackware packages with the required patches:
http://taper.alienbase.nl/mirrors/people/alien/slackbuilds/chromium/build/patches/chromium_widevine.patch
It has some hard-coded version strings for the expected widevine plugin, which might make maintenance a little hard.

Relevant blog entry: http://alien.slackbook.org/blog/watch-netflix-video-in-your-chromium-browser-this-time-for-real/

Being able to drop pipelight/silverlight without resorting to google-chrome would be a nice thing to have.
This task depends upon

Closed by  Evangelos Foutras (foutrelis)
Friday, 17 April 2015, 22:52 GMT
Reason for closing:  Implemented
Additional comments about closing:  chromium 42.0.2311.90-1
Comment by Doug Newgard (Scimmia) - Wednesday, 08 April 2015, 23:18 GMT
This would really be nice, is there any chance at all of getting that patch upstreamed?
Comment by Evangelos Foutras (foutrelis) - Wednesday, 08 April 2015, 23:46 GMT
According to the chromium SlackBuild file, to build the adapter library one has to extract libwidevinecdm.so from Chrome (during build-time).

This is too messy and not something I want to implement. I'd only consider it if it just needed a couple of gyp flags and maybe a tiny patch.
Comment by Arno Rehn (pumphaus) - Thursday, 09 April 2015, 00:18 GMT
Hm. I wonder if we can maybe fake the libwidevinecdm.so just for the purpose of building the adapter library. Running "objdump -Tt libwidevinecdm.so" shows only four exported functions:

000000000004d7a0 g DF .text 0000000000000093 Base CreateCdmInstance
000000000004d780 g DF .text 0000000000000015 Base DeinitializeCdmModule
000000000004d840 g DF .text 000000000000000d Base GetCdmVersion
000000000004d770 g DF .text 0000000000000006 Base InitializeCdmModule_4

I also tried to manually register the adapter library from the official google chrome as suggested here: https://bugs.launchpad.net/bugs/1371274, but that lead to an error when trying netflix.

Comment by Arno Rehn (pumphaus) - Thursday, 09 April 2015, 18:19 GMT
Yep, that works. Patch to the PKGBUILD is attached. For compilation purposes only, it creates a stub library libwidevinecdm.so. The now additionally built libwidevinecdmadapter.so should then be packaged seperately (possibly together with the real libwidevinecdm.so).
Netflix works as expected :)
Comment by Evangelos Foutras (foutrelis) - Friday, 17 April 2015, 04:30 GMT
We don't even have to fake libwidevinecdm.so; the widevine_cdm_version.h
modifications are enough for Chromium to load the plugin at runtime. Note
that this way the adapter library won't be built; but that's fine since
it can be shipped together with libwidevinecdm.so in an AUR package.

Also the version string doesn't seem to matter and is probably only used for
display purposes on chrome://plugins/. I'll be setting that to "Pinkie Pie".

I was testing using the following demo, but another developer has confirmed
that Netflix works too:

http://wv-ref-eme-player.appspot.com/proxy_player.html

tl;dr: Throwing libwidevinecdmadapter.so and libwidevinecdm.so from Chrome
(version 41 or 42; earlier won't work) into /usr/lib/chromium/ should allow
Chromium 42 to play Widevine DRM content.

(I will try to release Chromium 42 later today.)
Comment by Doug Newgard (Scimmia) - Friday, 17 April 2015, 05:06 GMT
I've created an AUR package grab the libs and put them in the right place. Once we have the new build, we should be in good shape.
https://aur.archlinux.org/packages/chromium-widevine/
Comment by Evangelos Foutras (foutrelis) - Friday, 17 April 2015, 21:16 GMT
chromium 42.0.2311.90-1 in [testing] if you want to test it; should with Doug's widevine package.

Loading...