Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Amazon Prime Video/Widevine on Arm64.

995 views
Skip to first unread message

Pancho

unread,
Jan 1, 2023, 7:21:54 PM1/1/23
to
I'm currently trying to set up the Orange Pi Ubuntu build as an HTPC/TV
computer on an oPi5.

The XFCE desktop is a little buggy, but surprisingly good performance.

The main showstopper, so far, is that I watch Amazon Prime Video, which
requires Widevine DRM software. Widevine doesn't appear to work on
AArch64 Linux, maybe it works on the oPi5 Android 11 build, but my first
impression was that it didn't.

Does anyone have any ideas how to fix/work around this?

The oPi5 feels like a proper PC, so I'm guessing Arm chip technology has
matured to the point this will become a popular request.

Marco Moock

unread,
Jan 2, 2023, 2:28:28 AM1/2/23
to
Am 02.01.2023 um 00:21:53 Uhr schrieb Pancho:

> The main showstopper, so far, is that I watch Amazon Prime Video,
> which requires Widevine DRM software. Widevine doesn't appear to work
> on AArch64 Linux, maybe it works on the oPi5 Android 11 build, but my
> first impression was that it didn't.

That is the disadvantage of DRM - you cannot use what you paid for in
the way you like.

Which browser do you use, which OS?

Andy Burns

unread,
Jan 2, 2023, 5:38:30 AM1/2/23
to
Pancho wrote:

> Does anyone have any ideas how to fix/work around this?

For a kodi/xbmc box I built, you could extract the widevine libs from an
installer for google chrome, is that available for arm64?

A. Dumas

unread,
Jan 2, 2023, 6:33:54 AM1/2/23
to
Pancho <Pancho...@proton.me> wrote:
> The main showstopper, so far, is that I watch Amazon Prime Video, which
> requires Widevine DRM software. Widevine doesn't appear to work on
> AArch64 Linux,

This is also a problem on the 64-bit version of RasPiOS which has been out
of beta for almost a year now. The RPi people don't care and point to
Google. Their solution is to install the 32-bit version of Chromium. But
they can't be installed next to each other, it's either/or, and it will
probably lead to incompatibilities. See
https://www.raspberrypi.com/news/raspberry-pi-os-64-bit/ and the comments.

Pancho

unread,
Jan 2, 2023, 7:26:02 AM1/2/23
to
Chromium Version 107.0.5304.62 (Developer Build) Ubuntu 22.04 (64-bit)
Firefox Version 102.6.0esr (64-bit)

OS Orangepi5_1.0.6_ubuntu_jammy_desktop_xfce_linux5.10.110


Marco Moock

unread,
Jan 2, 2023, 8:45:49 AM1/2/23
to
Am 02.01.2023 um 12:26:01 Uhr schrieb Pancho:

> Chromium Version 107.0.5304.62 (Developer Build) Ubuntu 22.04 (64-bit)
> Firefox Version 102.6.0esr (64-bit)

IIRC Chromium doesn't include DRM support.

Pancho

unread,
Jan 3, 2023, 11:40:39 AM1/3/23
to
Thanks, I hadn't realized that you could install 32 bit apps on a 64 bit
linux OS.


32bit Chromium-browser installs and runs, as a snap. AIUI, this implies
32 bit userland.

I managed to download two versions of libwidevinecdm.so.

The Raspbian repo apt install:

$ sudo apt install chromium-browser:armhf libwidevinecdm0

puts libwidevinecdm.so in:

/opt/WidevineCdm/_platform_specific/linux_arm/libwidevinecdm.so

and I got another version from a chrome OS install and put it in:

$HOME/snap/chromium/current/.local/lib/WidevineCdm/libwidevinecdm.so


However, Chromium didn't load either libwidevinecdm.so. DRM wasn't enabled.

I get the helpful log message from Chromium

$ chromium -enable-logging=stderr --v=1 > chrome.log 2>&1

--
cdm_registration.cc(189)] Widevine enabled but no library found
--

But it doesn't tell me where it was looking!

I give up!

Theo

unread,
Jan 3, 2023, 1:36:08 PM1/3/23
to
Pancho <Pancho...@proton.me> wrote:
> The Raspbian repo apt install:
>
> $ sudo apt install chromium-browser:armhf libwidevinecdm0
>
> puts libwidevinecdm.so in:
>
> /opt/WidevineCdm/_platform_specific/linux_arm/libwidevinecdm.so
>
> and I got another version from a chrome OS install and put it in:
>
> $HOME/snap/chromium/current/.local/lib/WidevineCdm/libwidevinecdm.so
>
>
> However, Chromium didn't load either libwidevinecdm.so. DRM wasn't enabled.
>
> I get the helpful log message from Chromium
>
> $ chromium -enable-logging=stderr --v=1 > chrome.log 2>&1
>
> --
> cdm_registration.cc(189)] Widevine enabled but no library found
> --
>
> But it doesn't tell me where it was looking!
>
> I give up!

If I look for shared libraries in x86_64 Ubuntu 22.04's chromium snap, I
find them in:

$ find /snap/chromium/2254/ -name "*.so*" | xargs -n1 dirname | sort | uniq
/snap/chromium/2254/usr/lib/chromium-browser
/snap/chromium/2254/usr/lib/man-db
/snap/chromium/2254/usr/lib/x86_64-linux-gnu
/snap/chromium/2254/usr/lib/x86_64-linux-gnu/dri
/snap/chromium/2254/usr/lib/x86_64-linux-gnu/nss
/snap/chromium/2254/usr/lib/x86_64-linux-gnu/pipewire-0.3
/snap/chromium/2254/usr/lib/x86_64-linux-gnu/spa-0.2/audioconvert
/snap/chromium/2254/usr/lib/x86_64-linux-gnu/spa-0.2/audiomixer
/snap/chromium/2254/usr/lib/x86_64-linux-gnu/spa-0.2/audiotestsrc
/snap/chromium/2254/usr/lib/x86_64-linux-gnu/spa-0.2/control
/snap/chromium/2254/usr/lib/x86_64-linux-gnu/spa-0.2/support
/snap/chromium/2254/usr/lib/x86_64-linux-gnu/spa-0.2/v4l2
/snap/chromium/2254/usr/lib/x86_64-linux-gnu/spa-0.2/videoconvert
/snap/chromium/2254/usr/lib/x86_64-linux-gnu/spa-0.2/videotestsrc
/snap/chromium/2254/usr/lib/x86_64-linux-gnu/spa-0.2/volume

I would guess /snap/chromium/2254/usr/lib/chromium-browser/ is the most
plausible place to put it.

But there's two problems. The first is that snap upgrades apps constantly,
so you can't put the library in there and expect it to last very long,
because in a short while a new version of the snap will be released and
we'll move to 2255 or whatever.

The other problem is this:

$ mount | grep chrom
/var/lib/snapd/snaps/chromium_2254.snap on /snap/chromium/2254 type squashfs (ro,nodev,relatime,errors=continue,x-gdu.hide)
/var/lib/snapd/snaps/chromium_2238.snap on /snap/chromium/2238 type squashfs (ro,nodev,relatime,errors=continue,x-gdu.hide)

ie the /snap/chromium/NNNN isn't a real directory, it's a read-only squashfs
filesystem. So you can't write the file in there anyway. The only way I
can think to resolve this is via an overlayfs on top of the squashfs mount,
but I'm not sure snap is going to be happy about that. And you'd still need
to remount it every time the snap is updated.

Another thought is to run the chromium binary with an LD_PRELOAD hack:

LD_PRELOAD=/opt/WidevineCdm/_platform_specific/linux_arm/libwidevinecdm.so /snap/bin/chromium

which I think has a better chance of working and should persist over
updates. If it works, perhaps you could make it into a script called
chromium?

Theo

Pancho

unread,
Jan 3, 2023, 8:38:26 PM1/3/23
to
> /snap/chromium/2254/usr/lib/x86_64$HOME/snap/chromium/2254-linux-gnu/spa-0.2/volume
>
> I would guess /snap/chromium/2254/usr/lib/chromium-browser/ is the most
> plausible place to put it.
>
> But there's two problems. The first is that snap upgrades apps constantly,
> so you can't put the library in there and expect it to last very long,
> because in a short while a new version of the snap will be released and
> we'll move to 2255 or whatever.
>

That's a bit odd. $HOME/snap/chromium/current is a symlink to
$HOME/snap/chromium/2254. Maybe upgrades will automatically copy user
stuff under $HOME/snap/chromium/2254 to the new version.

> The other problem is this:
>
> $ mount | grep chrom
> /var/lib/snapd/snaps/chromium_2254.snap on /snap/chromium/2254 type squashfs (ro,nodev,relatime,errors=continue,x-gdu.hide)
> /var/lib/snapd/snaps/chromium_2238.snap on /snap/chromium/2238 type squashfs (ro,nodev,relatime,errors=continue,x-gdu.hide)
>
> ie the /snap/chromium/NNNN isn't a real directory, it's a read-only squashfs
> filesystem. So you can't write the file in there anyway. The only way I
> can think to resolve this is via an overlayfs on top of the squashfs mount,
> but I'm not sure snap is going to be happy about that. And you'd still need
> to remount it every time the snap is updated.
>

Firstly, I will preface the following comments with the caveat that I
don't have a clue what I'm talking about... This is the first time I
have ever used a snap, and I know little of Chromium.

I assume snap file system overlays (and squashfs) are conceptually a
list of locations to find a file, combined with something like copy on
write of a shared file.

Independently of that, I also assume Chromium allows libwidevinecdm.so
to be loaded from a machine wide location, traditionally under a folder
like /usr/lib, but also from a user specific override folder somewhere
under $HOME.

So my guess is that snap gives a writeable overlay user override area
under $HOME/snap/chromium/current/... I just don't have a clue where.

> Another thought is to run the chromium binary with an LD_PRELOAD hack:
>
> LD_PRELOAD=/opt/WidevineCdm/_platform_specific/linux_arm/libwidevinecdm.so /snap/bin/chromium
>
It didn't work. /snap/bin/chromium is a symlink to /usr/bin/snap which
is 64-bit elf. So the LD_PRELOAD of a 32 bit file failed. Presumably,
/usr/bin/snap forks a 32 bit process based on arg[0].


> which I think has a better chance of working and should persist over
> updates. If it works, perhaps you could make it into a script called
> chromium?
>

This is very annoying because this machine is so close to being good.
The only other real showstopper is pulse audio and the bluetooth
(dongle) falling over.

The actual video (1920x1080) and general performance is brilliant.

Jim Diamond

unread,
Jan 5, 2023, 4:42:23 PM1/5/23
to
On 2023-01-03 at 21:38 AST, Pancho <Pancho...@proton.me> wrote:
> On 1/3/23 18:36, Theo wrote:
>> Pancho <Pancho...@proton.me> wrote:
>>> The Raspbian repo apt install:
>>>
>>> $ sudo apt install chromium-browser:armhf libwidevinecdm0
>>>
>>> puts libwidevinecdm.so in:
>>>
>>> /opt/WidevineCdm/_platform_specific/linux_arm/libwidevinecdm.so
>>>
>>> and I got another version from a chrome OS install and put it in:
>>>
>>> $HOME/snap/chromium/current/.local/lib/WidevineCdm/libwidevinecdm.so
>>>
>>>
>>> However, Chromium didn't load either libwidevinecdm.so. DRM wasn't enabled.
>>>

I recently put 64-bit Raspberry Pi OS on an RPi4 4 GB system.

Unfortunately I don't have at hand to examine closely. For what it's
worth...

I then installed the 32 bit version of chromium. I *did not* use the
snap, I installed it with (IIRC) the same command as you wrote above
(which put the library in
/opt/WidevineCdm/_platform_specific/linux_arm/libwidevinecdm.so, I believe).

My chromium happily uses the 32-bit version of libwidevine installed
via apt. I don't recall doing anything else special to get it
working. Have you tried the usual debian repeat the following
apt update
apt upgrade
and then maybe either
depmod -a
or even a good old M$ "Three R"s and reboot?

If you try all this and remain stuck, follow up and I'll go get my
64-bit Pi and have a look.

Jim

Pancho

unread,
Jan 6, 2023, 12:35:37 PM1/6/23
to
Thanks Jim.

First point, the current oPi Ubuntu "apt install chromium-browser" uses
snap under the hood. On my oPi Ubuntu system, apt says 64bit, but is
installing a 32bit snap Chromium.

Secondly, the apt libwidevinecdm0 apt install is rPi specific, from an
rPi repo. Maybe the rPi install of Chromium is tailored to it. I do have
a rPi 4 which I could test on, if I get desperate enough. Currently, I'm
having other problems with the oPi, which may mean the oPi isn't
currently a viable HTPC even if I could view Amazon Prime Video.

I did a Chromium install on an Ubuntu Intel VM. I can see that it
installs libwidevinecdm.so + related files into a folder structure
under: $HOME/snap/chromium/common/chromium/WidevineCdm. I tried to
duplicate this on the oPi, but Chromium didn't load files as expected.

I don't understand the relevance of depmod. I did think about some
utility tool to build a linkage dependency tree for libwidevinecdm.so,
but I have used strace to see that oPi Chromium isn't even attempting to
open libwidevinecdm.so, so a missing dependency isn't the problem.







Jim Diamond

unread,
Jan 6, 2023, 4:56:31 PM1/6/23
to
My bad! I missed the "Ubuntu" in there somewhere. (In fact, I
dislike snaps enough that I am looking for another distro for my
wife's laptop, which has been running Ubuntu for a long, long time.)

> On my oPi Ubuntu system, apt says 64bit, but is installing a 32bit
> snap Chromium.
>
> Secondly, the apt libwidevinecdm0 apt install is rPi specific, from an
> rPi repo. Maybe the rPi install of Chromium is tailored to it.

Quite possibly.

Is it possible to install chromium from the raspbian repos on your
Ubuntu system? (And, I wonder, if so, would it run?)

> I do have a rPi 4 which I could test on, if I get desperate enough.
> Currently, I'm having other problems with the oPi, which may mean
> the oPi isn't currently a viable HTPC even if I could view Amazon
> Prime Video.

Too bad.

> I did a Chromium install on an Ubuntu Intel VM. I can see that it
> installs libwidevinecdm.so + related files into a folder structure
> under: $HOME/snap/chromium/common/chromium/WidevineCdm. I tried to
> duplicate this on the oPi, but Chromium didn't load files as expected.

I don't know whether this will provide any useful information to you
or not, but when I do
strings /usr/lib/chromium-browser/chromium-browser-v7
on a 32-bit raspberry pi OS system, I get
useWideViewport
Media.EME.Widevine.VideoCapability.HasEmptyRobustness
application_x-ppapi-widevine-cdm
Widevine enabled but no library found
wideViewportQuirkEnabled
../../chrome/browser/component_updater/widevine_cdm_component_installer.cc
Widevine CDM v1.0
Failed to update Widevine CDM hint path.
Installed Widevine CDM component is incompatible.
WideView Technology Inc.
Registering component updated Widevine
Registering bundled Widevine
Updating hint file with Widevine CDM
Widevine Content Decryption Module
com.widevine.alpha
com.widevine.alpha
Widevine
WidevineCdm
Widevine Content Decryption Module
widevinecdm
widevinecdm
WidevineCdm
latest-component-updated-widevine-cdm
.@com.widevine.alpha
com.widevine.alpha
com.widevine.alpha
com.widevine.alpha

If you run "strings" on the chromium browser you installed and grep
the output as above, do you get anything? This might indicate whether
or not your chromium has been compiled to know about widevine,

> I don't understand the relevance of depmod.

None whatsoever. (Mea culpa!) I meant to type "ldconfig", just in
case the installation of widevine via apt didn't cache the location of
the library. And this is just in case your one of your system's
/etc/ld.so.conf files points at
/opt/WidevineCdm/_platform_specific/linux_arm/ (admittedly a long
shot) and your chromium only looks there, rather than under $HOME
(also a long shot).

> I did think about some utility tool to build a linkage dependency
> tree for libwidevinecdm.so, but I have used strace to see that oPi
> Chromium isn't even attempting to open libwidevinecdm.so, so a
> missing dependency isn't the problem.

Indeed!

I doubt I've been much help here, but if you do try to install the
chromium from the rPi repo, or do that strings|grep command, I'd be
interested in knowing what you discover.

Good luck!

Jim

Pancho

unread,
Mar 14, 2023, 5:42:16 AM3/14/23
to
Widevine is now available for rpi/arm64, and has been packaged for
chromium-browser in PiOS.

$ apt install libwidevinecdm0

This works with the arm64 version of chromium-browser, tested using
Amazon Prime Video.

It doesn't yet work on opi5/Armbian, as the default version of
chromium-browser is hard coded not to load the widevine shared object
file on arm64 systems. Hopefully this will be fixed shortly, both for
default chromium, and versions modified to use the opi5 gpu.


0 new messages