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

DecodeVideo: kNoKey for key ... on HD streams #212

Closed
mooninite opened this issue Dec 12, 2018 · 22 comments
Closed

DecodeVideo: kNoKey for key ... on HD streams #212

mooninite opened this issue Dec 12, 2018 · 22 comments

Comments

@mooninite
Copy link

mooninite commented Dec 12, 2018

Fedora 29 x86_64
Kodi 18 RC2
inputstream.adaptive 2.3.12
widevine 1.4.9.1088

I am attempting to play a purchased movie in the YouTube add-on. The movie will start playing but 10 seconds in the video stream feezes and the following error is printing in the log:

ERROR: AddOnLog: InputStream Adaptive: DecodeVideo: kNoKey for key (KEY REDACTED)

Audio continues to play with a frozen video stream. Are YouTube purchases supposed to play?

I can play 480p video streams, but 720p or 1080p freeze after 10 seconds.

@mooninite
Copy link
Author

I installed the Netflix plugin today and I can play 480p, 720p, and 1080p streams without any issues.

@Clubfan22
Copy link

Thank you so much for your work on inputstream-adaptive

I can confirm a similar (probably the same) issue for Amazon Prime Video.
When I try to play a movie, no video is being played (although sound works fine) and the same error as OP has is being logged. When I try to play an episode of a TV series, everything works fine (regardless of resolution).

I'm running
Arch Linux
Kodi 18.0-RC3 Git: 20181214-4c17e7769e5 (built with -O3 and -march=native, installed through AUR)
Amazon VOD Version 0.6.3
inputstream.adaptive 2.3.12 (installed through AUR)
libvidewinecdm.so from the latest Chromium download

I'm more than happy to provide additional information if you'd like me too.

@Clubfan22
Copy link

Further research shows that video playback works correctly when I change the following settings of InputStream-Adaptive:

Max. Resolution general decoder: 1080p -> 480p
Max. Resolution secure decoder: 1080p -> 480p

@Kleinrotti
Copy link

I have the same kNoKey for key error on Windows 10 with Kodi 18.0-RC3. Movies from the netflix-addon only play in 480p but series in 1080p. In the Amazon-addon both only play 480p. If i choose 1080p manually i only have audio.

@Varstahl
Copy link

@Kleinrotti not sure of what addon you're talking about, but if it's the Amazon/Amazon VOD (https://github.com/Sandmann79/xbmc) then they play 1080p series.

It's just movies that won't go past 480p.

@Varstahl
Copy link

Varstahl commented Jan 14, 2019

I wanted to update you guys on the issue, since this is broader than just Netflix (which works, atm).

I've been investigating the matter over at Sandmann79/xbmc#51, and so far the most likely scenario is that HD streams require VMP. Currently only browsers (through EME?) are able to acquire a PLATFORM_SOFTWARE_VERIFIED, while Kodi gets a PLATFORM_UNVERIFIED. Nevermind, compiling firefox gives an unverified but still 1080p. Need to delve deeper.

I'm doing a few tests through Firefox sources and the Widevine CDM binary it uses. If we are able to pass the software verification we will be able to watch every stream that doesn't require proprietary hardware (such as in android/chromecasts). Since everything is closed source (and at least partially protected from reverse engineering) it isn't the easiest reversing I've ever done, so if anybody here has experience with WV, VMP or EME, let me know.

@Varstahl
Copy link

Last update: at least on Amazon's side, anything higher than 1088x464 won't run due to the strict enforcement of HDCP_V1 for movies. There is currently no known way around this. If you're experiencing a kNoKey for key on PCs, you can check the Widevine license API endpoint of the service you're using, and it's probably due to HDCP.

@MythodeaLoL
Copy link

MythodeaLoL commented Jan 29, 2019

inputstream is ready for cdm 4.10.1224.7? @peak3d

@peak3d
Copy link
Contributor

peak3d commented Jan 29, 2019

@FloridaStream I tested the newest libWidewine some weeks ago using windows, but had issues (segfaults) for reasons I don't know yet. Not sure if this was the version you mentioned, sry

@MythodeaLoL
Copy link

hi @peak3d and @liberty-developer, see if you could tell if the inputstream.adaptive would still work after updating the wv VMP where checking the platform_verification_status is required as authentic?
Reference: https://www.widevine.com/news

@Varstahl do you have any news?

@Varstahl
Copy link

I don't have a box with either L1 encryption or HDCP ready, so no. If everyone applies their defaults, no other third party software will ever work, period. Remains to be seen.

@matthuo333
Copy link

The HBO Max add-on has just happened to be VMP.

@glennguy
Copy link
Contributor

glennguy commented Jun 9, 2021

@mooninite This might have been fixed in #589... can we close this issue?

@mooninite
Copy link
Author

The problem still occurs. Same symptoms and same error message.

Kodi 19.1
InputStream Adaptive 2.6.16

@glennguy
Copy link
Contributor

@mooninite could you post a full debug log? It could be a VMP issue

@glennguy
Copy link
Contributor

Also useful to have would be the mpd as well

@Mariusz89B
Copy link

Mariusz89B commented Oct 31, 2021

@glennguy Error persists while starting HD streams.
https://paste.ubuntu.com/p/42GCMs2QDy/

EDIT:
Tested on Kodi Nexus, I.A 20.0.2 with the same result.

@glennguy
Copy link
Contributor

glennguy commented Nov 1, 2021

Please use paste.kodi.tv for log uploads - that ubuntu site needs a verified account to view them...

I was able to retrieve the mpd from the log, there are also low resolution streams in there - are they able to be viewed?
I would suspect that what is happening is the license request goes out (with keyids from all video representations) and we get a successful response because at least one stream is playable/keyid returned. Probably due to VMP though the license server will not give us a key for the HD streams.
I'm assuming you can view the 1080p streams in a browser and would suspect that viewing them in an unsigned browser (e.g unofficial/self build) you would run into the same problem.

@Mariusz89B
Copy link

Mariusz89B commented Nov 1, 2021

@glennguy Yes, that is correct the low res strms are working and unsigned browsers are throwing the same error.

Is there a solution to this issue to get a successful response from all streams?

@glennguy
Copy link
Contributor

glennguy commented Nov 1, 2021

The only way to get the keys I believe would be if Kodi was widevine certified. Never say never but I doubt that will happen.
Have a read here: https://blog.samuelmaddock.com/posts/the-end-of-indie-web-browsers/ , the Conclusion section doesn't give much hope.

We only know that there's no key once we try to decrypt, maybe there's a more graceful way to handle this and at least give the user something to watch. The solution would probably be Kodi 20+ though.

I would suggest for the add-on to proxy the mpd and remove the AdaptationSets and Representations that don't work.

@glennguy
Copy link
Contributor

glennguy commented Nov 1, 2021

Just FYI it would probably work fine in Kodi running on Android as long as it's an L1 certified device.

@Mariusz89B
Copy link

@glennguy Good to know. Thank you for your information.

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

No branches or pull requests

9 participants