Chromium libwidevine and other DRM


#1

Hello,

Does anyone know how to enable widevine and other DRM support for chromium snaps?

I have noticed and traversed launchpad for possible solutions along with this site. This includes putting libwidevinecdm.so in $SNAP_USER_DATA and $SNAP_USER_COMMON. I have had to look at the diff for chromium-browser 63 to see that one of the locations is $HOME/.local/lib which didn’t even exist for my install.

Then I noticed in the chromium changelog on launchpad that again the file changed in version 72.0.3626.81-0ubuntu1.

At the moment the available documentation for the Chromium snap seems to be rather lacking with little information as to how to enable the flash plugin, how to enable widevine/other DRM. This is rather important information as people would probably like to access sites like Netflix, Prime Video and other DRM content.

On a side note, it is remarkably difficult for someone to get the source code or diff patches for chromium on Launchpad. It saying “diff from 71.0.3578.98-0ubuntu1 to 72.0.3626.81-0ubuntu1 (pending)” isn’t that useful imho.

Kind regards,
Krish

EDIT: Nevermind Youtube Movies seem to work with libwidevine in $HOME/.local/lib. In stats it seems to show that it is using widevine lib. Netflix and Prime Video don’t seem to work even if i change user agent strings.


#2

Netflix probably requires a chrome UA string, you can use e.g. the “User-Agent Switcher for Chrome” extension.

This cannot be considered proper documentation, but it explains where the flash plugin so file can be found and should be copied.


#3

Hi oSoMon,

I tried switching the user agent String by going to Developer Console -> burger menu-> more tools -> Network Conditions -> User agent -> Chrome Windows. I also tried the extension listed.

I also tried an edge user string, and a custom defined one for the latest google chrome stable. All solutions led to the same issue. Google Play movies seems to work fine, but netflix and Amazon prime seems to fail.


#4

Netflix works for me here, with chromium 73.0.3683.103 from the stable channel, and libwidevinecdm.so in ~/snap/chromium/current/.local/lib/. Can you share the error message you’re getting?


#5

I have attached three images. In this case one using the network agent to change the user agent, and second using the extension. I have also added a image from a purchased video from youtube showing that the Wildevine extension is working.

I am currently working on Chromium stable.
installed: 73.0.3683.103 (691) 161MB -

My libwidevinecdm.so is currently located in $HOME/snap/chromium/current/.local/lib.

My current plugs are as follows:
:browser-support chromium:browser-sandbox
:cups-control chromium
:desktop chromium
:gsettings chromium
:network chromium
:network-bind chromium
:opengl chromium
:password-manager-service chromium
:personal-files chromium:chromium-config
:pulseaudio chromium
:screen-inhibit-control chromium
:u2f-devices chromium
:unity7 chromium
:upower-observe chromium
:x11 chromium
gtk-common-themes:gtk-3-themes chromium
gtk-common-themes:icon-themes chromium
gtk-common-themes:sound-themes chromium
_- chromium:camera
_- chromium:home
_- chromium:mount-observe
_- chromium:network-manager
_- chromium:removable-media

This is my argument for spawning.
env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/chromium_chromium.desktop /snap/bin/chromium %U --enable-features=“CheckerImaging” --enable-native-gpu-memory-buffers --password-store=kwallet

I also have a fair number of flags and extensions set such as ublock origin, umatrix and ublock origin extra.

Any particular thing that could be unusual with my setup? My setup is identical to the one used for chrome in Firejail and that seemed to work perfectly fine.


#6

Does Netflix work if you disable the ublock extensions? Try opening it in a private browsing window.


#7

Nope I am still getting the same error.
Error Code: M7121-1331

Could you run sha256sum on your libwildevine.so?
8342f9e152f3096dfd6623b448917657e04079d0ae9a6ba43371df05538d9a2d libwidevinecdm.so

Also what is your user agent specifically?