zstd decompression in python addon
#1
Hi,

Currently the Inputstream Helper addon for ARM Linux system gets the Widevine library by downloading a Chrome OS image and extracting the library from it. Some time ago Google separated the Chrome browser from Chrome OS (which the called Lacros), so it would be much faster to download those Lacros images and extract the library from there.

I started implementing that option (progress here), but now I have a problem:
The lacros images are zstd compressed squashfs images. I already implemented a minimal version of squashfs, but for the zstd decompression I'm relying on the system's zstd library. However that library is not included in all systems (e.g. not in LibreELEC).

So does anybody have an idea how to get around this? Is there maybe an addon for zstd decompression which I didn't find? Or could we somehow make sure all relevant systems include the zstd library?
Reply
#2
(2024-01-25, 14:50)Seppl Wrote: However that library is not included in all systems (e.g. not in LibreELEC).

question: is this available on systems that Kodi (from team-kodi) runs on or is this only "not included" by 3rd party OS providers (Libre,Core,OSMC)?

*edit

expansion of question
does this work on Android and Windows?
linux will use system libraries so obviously it should work there
Reply
#3
The Widevine library is included in Android. For Windows, MacOS and Linux on x86 architecture the Widevine library can be downloaded as ZIP.

The only system where this whole stuff is necessary is Linux on ARM devices.

Now for the zstandard (zstd) library:
All I know is it seems to be included in Raspberry Pi OS, but not in LibreELEC.
Reply
#4
well that pretty much sums it up, you need LibreELEC to include it then, either widevine or zstd

https://forum.libreelec.tv
Reply
#5
I don't think you understand what this is about, so let me explain a little.

Anyone who wants to watch content from streaming services like Netflix, needs the Widevine library for decryption. Since that library is distributed by Google under a license which doesn't allow redistribution, it can't be included by any system (unless it has a separate license agreement or comes from Google, like Android). So to get the Widevine library you need the Inputstream Helper addon to download and install it. On most systems the library itself can be downloaded directly from Google servers, but not on Linux systems with ARM architecture. This includes all the *ELECs and any other Linux based distribution for ARM devices.

So currently on those systems a Chrome OS image of up to 2GB is downloaded, to extract the library of a few MB from it. This of course takes a lot of time and temporarily a lot of space (the image itself is deleted after extracting the library). To improve the situation for all those Linux ARM system (not just LibreELEC!) I want to extract the Widevine library from the Lacros images, which are around 150MB. However the Lacros images are compressed using zstandard (zstd), so I need to find a way to be able to decompress zstd on any Linux based distribution for ARM devices.


So if there is a way to be able to reach all those distributions and convince them to include the zstd library, that would be one option, but I won't write to each one individually.

Alternatively I would use a Kodi addon for zstd decompression, if there was one. But so far I haven't found one.


So in the end the question is, does anybody know of a way to reach out to all (ARM Linux) systems Kodi is able to run on and ask them to include the zstd library? Or could Kodi itself make that library a dependency?

Alternatively, does anybody know of an addon to decompress zstd? Or could somebody create such an addon?
Reply
#6
i do completely understand
1. streaming content is encrypted
2. a decryption library is needed for it
3. you need zstd to pull that library out of a google chrome os image

what you don't understand
1. kodi from this site (kodi.tv) only includes python packages for Windows and Android
- since you need it for Linux, the libraries installed on the "system" are used

2. the rest of the linux systems compile their own version "from source" and distribute it themselves - debian, ubuntu, raspbian, rpios, redhat, mint, etc.
- since kodi isn't even involved in the packaging for those systems it can't influence what they include as a "dependency" for it

3. those linux systems can also install zstd from their own package managers (apt/rpm)
- means you only need to tell a user to issue a command to install it

4. the only OS' you need it on that do not provide it and do not provide a package manager are prebuilts by "other people" - osmc, libreelec, coreelec
- like the major linux platforms above, kodi.tv is not involved in their packaging

so my suggestion is to reach out to libreelec, coreelec and osmc because they are "3rd party" and they're the only ones not including it and have no external mechanism to install it
Reply

Logout Mark Read Team Forum Stats Members Help
zstd decompression in python addon0