Bug 24835 - support for widevine plugin to chromium (non-free DRM used by netflix, amazon video and others) needs update
Summary: support for widevine plugin to chromium (non-free DRM used by netflix, amazon...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Christiaan Welvaart
QA Contact:
URL: https://aur.archlinux.org/packages/ch...
Whiteboard: MGA7TOO, MGA6TOO,MGA7-32-OK,MGA7-64-OK
Keywords: IN_ERRATA7
Depends on: 23558
Blocks: 26042
  Show dependency treegraph
 
Reported: 2019-05-18 18:16 CEST by Christian Lohmaier
Modified: 2020-01-09 12:40 CET (History)
8 users (show)

See Also:
Source RPM: chromium-browser-stable
CVE:
Status comment:


Attachments

Description Christian Lohmaier 2019-05-18 18:16:35 CEST
+++ This bug was initially created as a clone of Bug #17449 +++

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)

#####
chromiums defines seems to have changed, and thus the patch that worked in older verisons doesn't work anymore in versions 71 or later.

chrome_content_client.cc needs this mod in addition:

+-#if BUILDFLAG(BUNDLE_WIDEVINE_CDM) && !BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT)
++#if BUILDFLAG(ENABLE_WIDEVINE) && !BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT)

( see also https://git.archlinux.org/svntogit/packages.git/tree/trunk/chromium-widevine.patch?h=packages/chromium )


besides 
# version taken from: strings opt/google/chrome-unstable/chrome | grep -C 1 " (version:"
%define widevine_version 1.4.8.1008
for chrome_arch in ia32 x64; do
  mkdir -p third_party/widevine/cdm/linux/${chrome_arch}
  sed -e "s/@WIDEVINE_VERSION@/%{widevine_version}/" %{SOURCE4} > third_party/widevine/cdm/linux/${chrome_arch}/widevine_cdm_version.h
done
in spec file is wrong, current versions need 4.x line of the plugin...
Comment 1 Marja Van Waes 2019-05-24 18:18:36 CEST
Assigning to the registered maintainer.

Keywords: IN_ERRATA5, IN_ERRATA6 => (none)
Source RPM: chromium-browser-stable-47.0.2526.106-1.mga5.src.rpm => chromium-browser-stable
CC: (none) => marja11
Assignee: bugsquad => cjw

Comment 2 katnatek 2019-05-28 21:31:38 CEST
Why in the hell google don't update https://dl.google.com/widevine-cdm/versions.txt and https://dl.google.com/widevine-cdm/current.txt

Both are outdated viewing the current state of chromium-widevine in arch (https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=chromium-widevine) the current version of widevine for the current chromium 74.0.3729.169 is 4.10.1303.2
and in versions.txt we have 4.10.1196.0 as last version and current is even more outdated with 1.4.9.1088

I need to end some test but i will make some change in my script to use a last version file controlled by me
Comment 3 katnatek 2019-05-31 00:38:39 CEST
(In reply to katnatek from comment #2)
Looks like the 4.10.1303.2 version still isn't available for wide public
At less try to downloading like any of the others give me file not found

I hope is that and not google doing more evil things
Comment 4 katnatek 2019-05-31 01:56:36 CEST
(In reply to Christian Lohmaier from comment #0)
> besides 
> # version taken from: strings opt/google/chrome-unstable/chrome | grep -C 1
> " (version:"
> %define widevine_version 1.4.8.1008
> for chrome_arch in ia32 x64; do
>   mkdir -p third_party/widevine/cdm/linux/${chrome_arch}
>   sed -e "s/@WIDEVINE_VERSION@/%{widevine_version}/" %{SOURCE4} >
> third_party/widevine/cdm/linux/${chrome_arch}/widevine_cdm_version.h
> done
> in spec file is wrong, current versions need 4.x line of the plugin...

If my worst afraid comes true the version is 4.10.1196.0 for i586 (but don't know if it works with that version) and 4.10.1303.2 for x864
Comment 5 katnatek 2019-05-31 23:12:55 CEST
I update my script to extract libwidevinecdm.so from google-chrome in x86_64
But we need a 74.0.3729.169 with right %define widevine_version to test if works
Even if i migrate to cauldron i don't could make the test as only have 32bit PC
Comment 6 katnatek 2019-05-31 23:13:49 CEST
(In reply to katnatek from comment #5)
> But we need a 74.0.3729.169 with right %define widevine_version to test if
> works
I mean chromium 74.0.3729.169
katnatek 2019-05-31 23:15:40 CEST

Keywords: (none) => FOR_ERRATA7

Comment 7 katnatek 2019-06-06 19:57:32 CEST
Just informing that for chromium 75.0.3770.80
the widevine version is now 4.10.1440.18
katnatek 2019-06-06 20:05:47 CEST

Depends on: 17449 => 23558

Comment 8 papoteur 2019-06-29 08:50:09 CEST
@katnatek
What do you mean that is for errata.
Do we have winedevine for chromium?

CC: (none) => yves.brungard_mageia

Comment 9 papoteur 2019-06-29 11:15:19 CEST
Added a small comment in errata, copied from Mageia 6.
As instructions are for Mageia 6 using blogdrake, I didn't copy them.
Comment 10 Morgan Leijström 2019-06-29 16:13:55 CEST
Good, and i see errata links here if anyone need more info.

CC: (none) => fri
Keywords: FOR_ERRATA7 => (none)
Whiteboard: (none) => MGA7TOO, MGA6TOO

Comment 11 katnatek 2019-06-29 20:51:25 CEST
(In reply to papoteur from comment #8
@katnatek
What do you mean that is for errata.
Do we have winedevine for chromium? 
(In reply to papoteur fromcomment #9)
> Added a small comment in errata, copied from Mageia 6.
> As instructions are for Mageia 6 using blogdrake, I didn't copy them.

Sorry for any delay, the information is added in the errata, i could't test yet in 32bit and i haven't 64bit.

I hope it works for both.
Comment 12 Christian Lohmaier 2019-07-03 16:58:32 CEST
(In reply to papoteur from comment #8)
> Do we have winedevine for chromium?

No - currently there is *no* support for widevine (fixed the typo here ;-)) in mageia7

(and even when the patch is updated, the chromium package by itself won't come with the necessary library). 

So to test, 

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


https://demo.castlabs.com/ offers "DRM" labeled videos in the "Available Demos" section along with unprotected ones (irrespective whether it thinks your system can play it or not) - and of course the protected are the ones that should be tested for playback.

Also https://bitmovin.com/demos/drm should list Widevine as enabled/available in the Encrypted Media Extension section. (but that site is slow and unreliable)
Of course you can also try with real sites like amazon video or similar.

And regarding the comments from katnatek on this report - while trying to be helpful, fixing his helper script to get the current version of the libwidevinecdm.so zip file doesn't really have anything to do with the change in chromium browser's component loading/buildflags changes.

To get it clear:
* Getting/updating libwidevinecdm.so is *NOT* enough, what was added to errata is wrong/misleading.
* chromium-browser package needs the patch mentioned in first comment applied for it to actually try loading the libwidevinecdm.so. Right now it just assumes it was not enabled in the build at all and doesn't even try to load it.
Comment 13 Morgan Leijström 2019-07-03 20:26:37 CEST
Errata need corrections

Keywords: (none) => FOR_ERRATA7

Comment 14 katnatek 2019-07-04 00:22:06 CEST
Not sure what to add or remove, but i hide the blogdrake note until some test is done
Comment 15 katnatek 2019-07-04 01:13:22 CEST
Test in 32bit, recommend use firefox in the errata.
Comment 16 katnatek 2019-07-04 01:46:44 CEST
rosa's chromium "works" with the first and latest versions (https://dl.google.com/widevine-cdm/versions.txt) in i586

I download the rpm from http://mirror.rosalab.ru/rosa/rosa2016.1/repository/i586/main/updates/chromium-browser-stable-73.0.3683.103-2-rosa2016.1.i586.rpm

And install with

urpmi ./chromium-browser-stable-73.0.3683.103-2-rosa2016.1.i586.rpm --force --allow-nodeps

* The "" is due is a pain use it even in 360 resolution (that works for me in firefox from mozilla)
Comment 17 katnatek 2019-07-05 03:03:46 CEST
(In reply to Christian Lohmaier from comment #12)

I see two ways of fix the spec (https://svnweb.mageia.org/packages/updates/7/chromium-browser-stable/current/SPECS/chromium-browser-stable.spec?view=markup)

1.
change line 344 from

%define widevine_version 1.4.8.1008

to

%define widevine_version unknow

2.
2.1 remove line 32
Source4: widevine_cdm_version.h.in

2.2 remove lines 344 %define widevine_version 1.4.8.1008

2.3 change line 347 from

 sed -e "s/@WIDEVINE_VERSION@/%{widevine_version}/" %{SOURCE4} > third_party/widevine/cdm/linux/${chrome_arch}/widevine_cdm_version.h

to

cp third_party/widevine/cdm/widevine_cdm_version.h third_party/widevine/cdm/linux/${chrome_arch}/widevine_cdm_version.h

Maybe the method 2 is better as the chromium-67-widevine.patch already makes part of the work
Comment 18 Christiaan Welvaart 2019-07-07 22:10:02 CEST
I don't think the version is the biggest problem, but rather the code in chrome/common/chrome_content_client.cc needs to be patched (I found this problem when looking around for a version check, but the patch I'll test is taken from gentoo, in turn taken from arch). If the problem was the version, "unknown" would not work either.

-#if BUILDFLAG(BUNDLE_WIDEVINE_CDM) && !BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT)
+#if BUILDFLAG(ENABLE_WIDEVINE) && !BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT)
< below this is the code that loads the module (.so) >
Comment 19 Christian Lohmaier 2019-07-08 11:09:46 CEST
thank god you weren't discouraged to look at this one by all the irrelevant comments, although you unfortunately were distracted enough to not see the pointer to the arch patch (and the corresponding snippet of the patch) in the initial description and restated in comment#12
I would likely have opened a new bug without the clutter had I now seen your reply - even happier to read it and finally all good \o/ - all that's left is wait for the updated package - Thx!
Comment 20 Julien Gouesse 2019-07-16 18:28:41 CEST
By the way, it affects Popcorn Time too.

CC: (none) => gouessej

Comment 21 Christian Lohmaier 2019-08-13 19:27:23 CEST
guess I jinxed it :-(
Comment 22 katnatek 2019-09-21 19:12:55 CEST
Good news for MGA 7 users the new chromium-stable on bug#23558 fix this issue, i already tested on i586

Whiteboard: MGA7TOO, MGA6TOO => MGA7TOO, MGA6TOO,MGA7-32-OK
Hardware: x86_64 => All

Comment 23 Christian Lohmaier 2019-09-22 01:30:43 CEST
confirmed for 64bit - widevine is recognized & used again, works on demo sites as well as on amazon prime video

Whiteboard: MGA7TOO, MGA6TOO,MGA7-32-OK => MGA7TOO, MGA6TOO,MGA7-32-OK,MGA7-64-OK

Comment 24 katnatek 2019-09-24 20:25:52 CEST
Updated the information in English and Spanish erratas

Keywords: FOR_ERRATA7 => IN_ERRATA7

Comment 25 Christiaan Welvaart 2019-11-11 08:28:22 CET
Marking as resolved since this problem is fixed in cauldron and mga7, while Mageia 6 is EOL.

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

Christian Lohmaier 2020-01-09 12:40:26 CET

Blocks: (none) => 26042


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