Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.10.2391.0 issues on ARM #497

Closed
glennguy opened this issue Mar 14, 2022 · 15 comments · Fixed by #499
Closed

4.10.2391.0 issues on ARM #497

glennguy opened this issue Mar 14, 2022 · 15 comments · Fixed by #499

Comments

@glennguy
Copy link

Hi there

This version of the CDM has pretty bad issues based on user experiences and my own testing. About once a week since mid January users are either opening new issues on the inputstream.adaptive repo or making new forum posts. Unfortunately the cause of their problem isn't very obvious so users are having a hard time getting help.

Is it possible to either:
a) provide a way to be able to retrieve an older image containing 4.10.2252.5
b) prevent upgrading from 4.10.2252.5 to 4.10.2391.0 (or newer versions until we can confirm they function correctly)
c) both of the above

To give a little more detail, printing to log before and after this statement https://github.com/xbmc/inputstream.adaptive/blob/ecccdae020c5e80ff66200664e54bbee990e6474/wvdecrypter/wvdecrypter.cpp#L1269 takes ~5ms on my RPi3b with 4.10.2252.5, and closer to 50-70ms with 4.10.2391.0 . This alone renders streams unwatchable due to the inability of the decoder to provide enough data to keep Kodi's buffer full.
Additionally while trying to implement support for CBC decryption in IA the newer CDM version would crash during routine function calls (CDM timer) for seemingly no reason, the only difference in conditions being the difference decryption scheme and multiple CDM 'sessions'. All is fine in 4.10.2252.5

I can only guess that somehow the TLS relocation stuff/googles compiler somehow affects this or they've released a buggy product. FWIW the libwidevinecdm0 package in Raspberry Pi OS is still shipping 4.10.2252.5

@horstle
Copy link
Collaborator

horstle commented Mar 14, 2022

Hi,

It should be rather easy to implement a), I'll probably be able to do that this evening.

It'll be much harder to implement b), since we don't know which version of widevine we'll get before downloading the ChromeOS image. If we switched to using the package from the RPi repo (for which I have already prepared some code a while ago), it would become much easier, but afaik we still don't know about the legality of this.

@glennguy
Copy link
Author

Thanks for the explanation, I understand that things aren't always straightforward. It would be interesting to know how RPi OS went about producing that package and if it's really above board or not.

@horstle
Copy link
Collaborator

horstle commented Mar 15, 2022

Would be great if some users could test the attached versions, so I can do a release, soon.

script.module.inputstreamhelper-0.5.8-install_from-101f947.zip

script.module.inputstreamhelper-0.5.8+matrix.1-install_from-101f947.zip

@movikbence
Copy link

It works for me

@Schukra
Copy link

Schukra commented Mar 16, 2022

It works for me. Could install it again. Netflix: Fine, Amazon Prime: Fine. Zattoo PVR: Buffering. So I recopied old lib version. Kodi Leia, Raspi 3.

@riess82
Copy link

riess82 commented Mar 17, 2022

RPi 3, OSMC 2022.03-1, script.module.inputstreamhelper-0.5.8+matrix.1-install_from-101f947.zip installed, going to InputStream Helper, Debug, Install Widevine from:...

Error Type: <class 'ValueError'>
Error Contents: unknown url type: 'https%3a%2f%2fdl.google.com%2fdl%2fedgedl%2fchromeos%2frecovery%2fchromeos_14092.77.0_veyron-fievel_recovery_stable-channel_fievel-mp.bin.zip'

@riess82
Copy link

riess82 commented Mar 17, 2022

Another try with downloading to pc and installing from local usb-stick:
2022-03-17 11:20:57.959 T:1759 ERROR : EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'OSError'>
Error Contents: [Errno 5] Input/output error
Traceback (most recent call last):
File "/home/osmc/.kodi/addons/script.module.inputstreamhelper/default.py", line 8, in
run(sys.argv)
File "/home/osmc/.kodi/addons/script.module.inputstreamhelper/lib/inputstreamhelper/api.py", line 27, in run
widevine_install_from()
File "/home/osmc/.kodi/addons/script.module.inputstreamhelper/lib/inputstreamhelper/api.py", line 49, in widevine_install_from
Helper('mpd', drm='widevine').install_widevine_from()
File "/home/osmc/.kodi/addons/script.module.inputstreamhelper/lib/inputstreamhelper/init.py", line 34, in clean_before_after
result = func(self, *args, **kwargs)
File "/home/osmc/.kodi/addons/script.module.inputstreamhelper/lib/inputstreamhelper/init.py", line 249, in install_widevine_from
progress = extract_widevine(backup_path(), image_path, image_version)
File "/home/osmc/.kodi/addons/script.module.inputstreamhelper/lib/inputstreamhelper/widevine/arm.py", line 142, in extract_widevine
progress=progress)
File "/home/osmc/.kodi/addons/script.module.inputstreamhelper/lib/inputstreamhelper/widevine/arm_chromeos.py", line 112, in extract_file
return self.write_file(inode_dict, os.path.join(extract_path, filename))
File "/home/osmc/.kodi/addons/script.module.inputstreamhelper/lib/inputstreamhelper/widevine/arm_chromeos.py", line 300, in write_file
block_ids = self.get_block_ids(inode_dict)
File "/home/osmc/.kodi/addons/script.module.inputstreamhelper/lib/inputstreamhelper/widevine/arm_chromeos.py", line 267, in get_block_ids
iblocks, ids_to_read = self.iblock_ids(inode_dict['i_blocki'], ids_to_read)
File "/home/osmc/.kodi/addons/script.module.inputstreamhelper/lib/inputstreamhelper/widevine/arm_chromeos.py", line 205, in iblock_ids
self.seek_stream(seek_pos)
File "/home/osmc/.kodi/addons/script.module.inputstreamhelper/lib/inputstreamhelper/widevine/arm_chromeos.py", line 231, in seek_stream
self.bstream[0].seek(seek_pos)
File "/usr/lib/python3.7/zipfile.py", line 1059, in seek
self.read(read_len)
File "/usr/lib/python3.7/zipfile.py", line 899, in read
data = self._read1(n)
File "/usr/lib/python3.7/zipfile.py", line 967, in _read1
data += self._read2(n - len(data))
File "/usr/lib/python3.7/zipfile.py", line 999, in _read2
data = self._fileobj.read(n)
File "/usr/lib/python3.7/zipfile.py", line 742, in read
data = self._file.read(n)
OSError: [Errno 5] Input/output error
-->End of Python script error report<--

@riess82
Copy link

riess82 commented Mar 17, 2022

what worked for me was to copy a working .so, found in this thread xbmc/inputstream.adaptive#678

@Biniou180
Copy link

Hi there,
On my side I had problems when trying to (re)-install widevine (please see the issue linked above), but the fix proposed by @horstle worked fine, thanks a lot!

@Pepkarovsa
Copy link

Would be great if some users could test the attached versions, so I can do a release, soon.

I did a fresh install of CoreELEC (S905D soc), so I didn't have any backups of Widevine 4.10.2252. From the Chrome OS recovery image, Widevine 4.10.2391 is installed, which makes that my mediaplayer cannot playback streams within several add-ons (YouTube) in a proper manner, frequently buffering happens.

After using this version of inputstreamhelper, I could install Widevine 4.10.2252.5, enabling to play streams flawlessly. Thanks for that!

By the way, I had no idea what to select when installing the old version of Widevine, I couldn't see upfront what version would be installed, but for some reason it was the right version I was looking for (4.10.2252.5).

@horstle
Copy link
Collaborator

horstle commented Mar 19, 2022

By the way, I had no idea what to select when installing the old version of Widevine, I couldn't see upfront what version would be installed, but for some reason it was the right version I was looking for (4.10.2252.5).

You mean when selecting "install widevine from specific source"? In that case it installs from the source URL specified in the setting right above ("install widevine from:"), which by default (currently) is a ChromeOS image containing Widevine 4.10.2252.5. Sadly one can never know before the download, which version of widevine is included in a ChromeOS image.

@Pepkarovsa
Copy link

You mean when selecting "install widevine from specific source"?

Yes, I had no clue what URL to specify in "install Widevine from:", so I didn't change the default setting. I wanted to install Widevine version 4.10.2252.5, because I knew that is the latest version that works on my media player with a S905D soc, but I had no idea what URL of what repository to specify. I knew there's some Widevine repository as given below, but no idea whether this would work and/or would be safe to do so.

https://k.slyguy.xyz/.decryptmodules/widevine/

@BiMaKorn
Copy link

Hi there,
It works for me. Thanks for the support.

@matthuisman
Copy link

matthuisman commented Apr 1, 2022

@horstle
I see this issue was closed but still getting quite a few users striking it.
Was there a solution implemented?

I see this: #499
Can you explain here how to use that to fix the latest Widevine issue?
I assume you enter a specific url? What url should they enter? etc etc

@horstle
Copy link
Collaborator

horstle commented Apr 1, 2022

The URL which is set by default should currently be ok, so all one has to do is

  1. go to the Inputstream Helper settings
  2. choose the "Debug" tab and
  3. click on "Install Widevine library from specific source...".

The following dialog should be easy enough to follow.

If at some point the given URL won't work any more, a different one can be specified in the setting "Install Widevine from" before choosing "Install Widevine library from specific source...".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
9 participants