emilsvennesson / script.module.inputstreamhelper

A simple Kodi module that makes life easier for add-on developers relying on InputStream based add-ons and DRM playback.
MIT License
133 stars 49 forks source link

Automatic Widevine binary installation on ARM based devices #1

Closed emilsvennesson closed 6 years ago

emilsvennesson commented 6 years ago

It would be /very/ nice if it was possible to automatically install Widevine on ARM based devices as well, but I have yet to find an official source for the binary on this architecture. I've only come across this binary on third-party hosts, which obviously is a big no as that violates the license.

@asciidisco @peak3d @trummerjo Perhaps you could shed some light on this?

trummerjo commented 6 years ago

As far as i know is the only source for arm builds ChromeOS

asciidisco commented 6 years ago

@emilsvennesson Google doesn't provide a CDN hosted version of libwidevine for ARM systems. As @trummerjo said, you can only get it when downloading & extracting an Chrome OS image.

Here´s a list of Images

You´d need around 1.5 GB free diskspace for them & download is roughly 700mb (depends on the image). If you don't want to violate the license, you´d need to symlink the library from the extracted image, as copying is not allowed.

peak3d commented 6 years ago

Maybe it could make sense to investigate the chromiumos build system (ninja) how libwidevine is pulled there

emilsvennesson commented 6 years ago

@asciidisco @trummerjo Well, that is... unfortunate. It's kind of a hassle to mount stuff within Python and that would mean it'd have to rely on subprocess. Seeing as copying is not allowed, does that also mean that we'd have to keep the extracted image? 1.5 GB is quite a lot for people who are using a small SD card for their Raspberry Pi. Does this rule apply to the CDN hosted versions as well?

@peak3d I did a brief investigation on this, and it seems like libwidevine is not even supported in Chromium OS. :-/

Thanks for getting back to me! :-)

peak3d commented 6 years ago

Read about cloudfront wich seems to be lightweight chormeos + widevine

emilsvennesson commented 6 years ago

Cloudfront? Would you mind hooking me up with a link? I tried Google but couldn't find anything.

peak3d commented 6 years ago

typo :-) https://www.golem.de/news/cloudready-im-test-ein-altes-geraet-guenstig-zum-chromebook-machen-1604-120577-4.html

emilsvennesson commented 6 years ago

@peak3d Interesting... I will definitely take a closer look. Thanks!

emilsvennesson commented 6 years ago

@peak3d It doesn't look like it supports ARM unfortunately. :-/

peak3d commented 6 years ago

@emilsvennesson ok, thats a pity

asciidisco commented 6 years ago

@emilsvennesson Can't find the license where I read the part about extracting/copying it somewhere is forbidden. I did lots of research regarding available sources (legal ones) for ARM versions of widevine & I came to the conclusion that downloading the chromeos image & extracting it from there might be the best shot for not making Google angry. I´d also asked friends at Mozilla & Google if there´s another way to get it for the development purposes only & they didn't know of any.

My suggestion would be to use the ChromeOS image, symlink the libwidevine & delete everything but the original path to the extracted version. Guess that is as close we can get to have a solution that might not violate the license.

I´d also think that the license file should be displayed in a yes/no dialog fashion, so users can know & proactively decide that they want to do this.

Just my humble opinion.

emilsvennesson commented 6 years ago

@asciidisco I agree completely and will try writing something up that accomplishes this. I had thought about the yes/no dialog on the license file myself and will add that as well. It's a bit problematic to mount this image file on Linux without using any third party programs. I've gotten it to work by using losetup, fdisk and mount which I believe should (?) be available on all Linux distros. Root/sudo access is also required by the mount command.

I will ping you once I have something more substantial. :-) Thanks for your insight/feedback!

peak3d commented 6 years ago

awesome work happening here! Thx @emilsvennesson

emilsvennesson commented 6 years ago

@peak3d Thanks a lot and I can only say the same to you with your great work on inputstream.adaptive. :-)

@asciidisco Do you think master complies with the license now? Also, do you know which versions of ARM that work with the binary from the Chrome OS image? I have only tested with a Raspberry Pi 2 so I'm not quite sure if aarch64 and other architectures work as well.

asciidisco commented 6 years ago

@emilsvennesson Well, I´m not a lawyer, but I guess the way you implemented it is the best shot we have. It should be up to the user now to decide if he/she violates the license. From my point of view, the plugin does not ;)

Regarding aarch64, I haven't seen an aarch64 version of widevine yet. Afaik the ChromeOS build that run on 64bit processors, all use 32bit userland libs. I highly believe that there is no way to run Widevine on a pure 64bit ARM system yet.

emilsvennesson commented 6 years ago

I am closing this as this is now implemented.

rodneyrod commented 6 years ago

@asciidisco Is there a way of running a 32bit version of Kodi on an Aarch64 system to get around that?

dagwieers commented 4 years ago

I looked into the Chromium build system and where Widevine is referenced and it appears that for testing purposes they include these libraries (and scripts for pulling?) in /third_party/widevine/cdm.

This is apparent from /third_party/.gitignore which contains:

/widevine/cdm/chromeos                                                                                                                                    
/widevine/cdm/linux
/widevine/cdm/mac
/widevine/cdm/win
/widevine/scripts
/widevine/test/license_server

So no details from there :-/

dagwieers commented 4 years ago

Looking into a Chromium OS ARM-build (FlintOS is no longer, but now there is FydeOS), they seem to have the same problem. They cannot distribute it and thus do not ship it as part of the OS. https://github.com/FydeOS/chromium_os_for_raspberry_pi/issues/21

cobra777 commented 4 years ago

im rocking jetson nano which is 64 bit. I used this installer and it tried to build the chrome_os but failed because the only drm module winecdm = 32 bit.

google fix your shit.

rriemann commented 1 year ago

There was a new release for arm64:

https://aur.archlinux.org/packages/widevine-aarch64

https://archive.raspberrypi.org/debian/pool/main/w/widevine/

horstle commented 1 year ago

@rriemann See #530