liberty-developer / plugin.video.prime_instant

GNU General Public License v2.0
29 stars 8 forks source link

Some streams only have audio, no video #5

Closed bggardner closed 6 years ago

bggardner commented 7 years ago

See here. @ghost said to post the issue here (I think he meant here, as I can't seem to post an issue on a forked repo), as I am having the same problem as @rome1983. It only occurs on some videos with no obvious pattern as to which ones. Here's some differences I noticed that may or may not be relevant:

Working video: After selection, the "Buffering" icon briefly appears and the video starts playing. Deinterlace method is "none" and AR is 1.78.

Non-working video: After selection, no "Buffering" icon appears and the menu remains. I have to press "Tab" to go to the "currently playing" video, which is black (but as I said, has audio). Deinterlace method is "unknown" and the AR is 0.0.

beardypig commented 7 years ago

I am having the same issue. The audio plays, but the audio is unencrypted, at least in this case. The video fails to play, from the logs it looks like the license request is failing at some point. I will try to get some more debug output and post it. I tried on the DE and UK sites with the same result.

Which videos worked for you @bggardner?

bggardner commented 7 years ago

Now that I'm digging into it more, I believe @ghost is blaming wvdecrypter. Not being fluent in C++, I've only been able to determine that cdm::Status ret = wv_adapter->Decrypt(cdm_in, &cdm_out); (line 510 of wvdecrypter.cpp) returns something other than cdm::Status::kSuccess, but I'll continue to probe. Here's videos that worked for me, but is by no means an exhaustive list:

I saw a post somewhere that somebody was having luck with the first episode of seasons, and while that's not entirely true for me, it does seem to be fairly common. I'll post more as I find them.

bggardner commented 7 years ago

sv_adapter->Decrypt(cdm_in, &cdm_out); is returning cdm::Status::kNoKey, which means the CDM did not have the necessary decryption key to decrypt (per wvdecrypter/cdm/media/cdm/api/content_decryption_module.h. I guess @beardypig already figured that out, but I wanted to document it here as I'm flying blind.

beardypig commented 7 years ago

I couldn't get any streams to work. I also got the same response from Decrypt, however it does get some keys... The OnSessionKeysChange method is called and it lists a key id as useable (the same key id as the default KID in the mpd), but it won't work.

@bggardner which version of the CDM dll/so/dylib are you using? From which version of the browser?

bggardner commented 7 years ago

I'm using LibreELEC devel-20161104210232 on an RPi 2 using chromium-widevine-1.4.8.823-2-armv7h per this script refereced here. So, to answer your question, I believe it's from Chrome 44.0.2403.157 per this.

beardypig commented 7 years ago

@bggardner did you have it working before? Perhaps something changed in the newer versions... No ideas @liberty-developer?

bggardner commented 7 years ago

This was my first and only attempt. I haven't had a chance to try it on another platform, as inputstream.mpd is not available for Ubuntu 16.10 yet (my primary OS). I could try it on a virtual machine, but that could get cumbersome.

rome1983 commented 7 years ago

Some things changed on Amazon side, so no fix as of now.

beardypig commented 7 years ago

Do you know what has changed @rome1983? Because it still makes license requests and gets keys...

rome1983 commented 7 years ago

I was told Amazon upped it's security level.

bggardner commented 7 years ago

Is the increased security documented anywhere?

beardypig commented 7 years ago

Maybe with some extra information we can fix it!

rome1983 commented 7 years ago

Not that I know of.

rome1983 commented 7 years ago

The decrypter has to decode now instead of the frames being passed to Kodi for decoding.

beardypig commented 7 years ago

@rome1983 Ah OK. Good to know... Kind of a pain, but maybe it fixable...

bggardner commented 7 years ago

Related issues here and here, which mention the need for YUV decoding.

beardypig commented 7 years ago

@bggardner I guess you need to call the decrypt and decode method to get the decoded frame. When I was trying it a couple of weeks ago I couldn't get it to give me a valid key even :-(

liberty-developer commented 6 years ago

Kodi 18 needed