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

NBA League Pass no sound in live games Fire Tv #580

Closed
scottydulton opened this issue Dec 30, 2020 · 28 comments
Closed

NBA League Pass no sound in live games Fire Tv #580

scottydulton opened this issue Dec 30, 2020 · 28 comments
Labels
Issue Type: Bug issue has reported a bug

Comments

@scottydulton
Copy link

scottydulton commented Dec 30, 2020

i can get sound on both live games and archived games running kodi 18.9 Leia on pc, however on kodi 18.9 Leia on fire tv i cannot get sound on live games where i can in archived games. can anyone notice why with the 2 logs?

kodi live game.log
archive game.log

@ivankokan
Copy link

Hi everyone, please check all the logs and relevant info within the mentioned issue.

Summary:

  • Fire TV
  • Live videos (NBA games, guys are using the latest from my fork https://github.com/ivankokan/xbmc.plugin.video.nba, not the original repository where the mentioned issue is submitted)
  • The issue happens when IS.A Media is set to All, but it does not when set to Audio.

@CamiloHT @scottydulton @MRLB Please continue here.

@MRLB
Copy link

MRLB commented Jan 2, 2021

@peak3d Can you help us? Is are bit sad to watch NBA without sound :-(

thanks in advance :-)

@glennguy
Copy link
Contributor

glennguy commented Jan 7, 2021

It appears that it is not recognising that the audio stream is encrypted on android/live. Note that the archived game is DASH whereas live is HLS so that would give us a good place to start looking :)

@scottydulton
Copy link
Author

@glennguy thanks mate, do u think there's anything we could manually copy from IS.H 2.6 to the Leia IS.H code, instead of waiting on awhole new release?

@glennguy
Copy link
Contributor

glennguy commented Jan 7, 2021

Have you tested live games on Android/Matrix? Does it work properly in that case?

@scottydulton
Copy link
Author

@glennguy I tried to fresh install matrix on both pc and android but I can't get the nba pass to install, I keep getting the error 'the dependency on xbmc.python version 2.20.0 could not be satisfied' I have no idea why

@glennguy
Copy link
Contributor

glennguy commented Jan 7, 2021

@ivankokan is there a matrix compatible version available or in the works?

@scottydulton
Copy link
Author

@glennguy i noticed on matrix there wasnt the script for simple xbmc downloader in services like in Leia, i tried to google i only found netflix compatible versions that had been adapted for matrix

@glennguy
Copy link
Contributor

glennguy commented Jan 8, 2021

@scottydulton would you like to test this build of inputstream.adaptive for me?
android-armv7-leia-v2.4.6.zip

Please note that after installing this you will not be able to easily revert to the factory IA installation as it is bundled in the APK. The original IA files will still reside on your device but there's no easy way to add the add-on back into the database.
Having said this, you can get a build of 2.4.6 that shipped with 18.9 here and install that over the top of this version if needed.

This is for armv7 installations (according to your logs that's what you have), it won't install on arm64

Please follow these steps to install:

  • Install from zip the above file
  • Go into My Add-ons -> VideoPlayer Inputstream -> inputstream.adaptive and uninstall
  • Reinstall from zip again

The uninstall/reinstall process is necessary as on the initial install from zip Kodi will still load IA from it's original APK location, not the newly installed one. This is a bit of a hacky workaround.

If we get success with this I'll prepare a PR.

@scottydulton
Copy link
Author

@glennguy thankyou for your efforts, i will have to wait until tomorrow when live games are on 11am UTC+11:00 (australia)

@scottydulton
Copy link
Author

@glennguy it didnt work mate, when i click on go live, i used to get video with no sound, now it just sits on please wait with the spinning circle.
nba tv and archived games still play

kodi.log

@glennguy
Copy link
Contributor

glennguy commented Jan 9, 2021

Can't see much from the log - debug logging isn't enabled.
I see if I can get a trial login going and have a further look

@scottydulton
Copy link
Author

Oh my bad let me know if you get the trial login going if not I can get you another log today

@CamiloHT
Copy link

CamiloHT commented Jan 9, 2021

I also tested the @glennguy v.
Mi Box S and Chromecast with Android TV
Now no video and no sound, anyway thanks for your work!
Hope we can get a solution.

@glennguy
Copy link
Contributor

I managed to sort a 7 day trial and get a debugging environment up and running, no extra logs needed at the moment.

The issue is a bit more than just missing audio streams. If you enable manual stream selection in IA only the first played video stream will work, changing to a different video stream will show encrypted garbage (at least on my device, others may show a black screen).

@scottydulton
Copy link
Author

@glennguy hmm odd, do you see a resolution pre kodi 19?

@glennguy
Copy link
Contributor

I certainly hope so :)
I'll have a bit of time later in the week to play with it and see if I can progress my understanding enough to find a fix.

@glennguy
Copy link
Contributor

My trial has expired so I've kind of run out of time.

I'm trying to create my own widevine assets to continue testing outside of the ~6 hour window that games are on, but no luck so far.

Some things to note if @peak3d picks this up before I get to a solution:

  • The situation with inserting PSSH sets works fine for static HLS playlists (disney+) but with live refreshing playlists like in this add-on the widevine PSSH is continually readded to the period (use_count_ keeps going up and up) and is not taken care of properly like with AES-128/freeSegments.

  • I was thinking that in HLSTree insert_psshset(NOTYPE, rep, adp) should be insert_psshset(adp->type_, rep, adp) to keep separate psshsets for audio/video like it would be in DASH, but this only partially solves the issue. To give a bit more detail, the issue stems from playlists with these attributes:

    • HLS
    • Widevine
    • PSSH/KID is identical for multiple representations
    • Played on Android
    • Live or VOD

    The scenario for Android is:

    Unfortunately the above change to HLSTree.cpp has not gained playback of video/audio on Android (no video and no audio) and crashes on Windows after the first non-init video segment finishes downloading. Haven't been able to illicit any sort of stack trace from VS either. Also the reason it is only a half fix is it doesn't solve for eg. multiple video representations sharing the same psshset - only the first opened will work. I haven't tried yet but perhaps the solution for this is to move L2751 out of the switch statement...

@scottydulton
Copy link
Author

@glennguy do you have social media? i can lend you my account if u want to further investigate?

@glennguy
Copy link
Contributor

No social media for me, although you could join the aussie addons slack and pm me there :)

@scottydulton
Copy link
Author

@glennguy pm'd you

@ivankokan
Copy link

@glennguy I guess the respective fixes/improvements will eventually be available only for the Matrix version of IS.A?

@glennguy
Copy link
Contributor

Not for me to say. There's nothing stopping the fixes going into the Leia branch but distribution is the problem.

@glennguy
Copy link
Contributor

There's 2 issues at play here - one that has been discovered during my testing (I'll split that off into it's own issue, and one where the crypto session isn't set up correctly in Android. I'll prepare another zip when I get a chance with changes that will hopefully fix this particular issue, and if that works well then a PR for it.
The other issue doesn't affect NBA League Pass at the moment but may in the future if the provider wants separate DRM keys for audio/video

@chamchenko
Copy link

Hi.
any news on this. I was working on porting the plugin to kodi 19 for the last few days it's done. That helped on other devices but not on android devices (I tested with the latest build 2.6.11 and it's all the same no audio)

@glennguy glennguy added the Issue Type: Bug issue has reported a bug label Apr 11, 2021
@glennguy
Copy link
Contributor

Hi @chamchenko
It's definitely on the to-do list, I will try to find time soon. I did spend quite some time on it a couple of months back but I never found the cause.
My best lead at the moment is that with the HLS workflow (compared to DASH) we set up DRM keys one at a time as we only get one per manifest file:
HLS DASH

When we are using DASH, our dash.mpd file contains everything we need to download segments, get DRM keys and start playback. All DRM keys are set up inside the decrypter whether we're going to use them or not.

With HLS it is a more 'on-demand' situation. First we get our master m3u8 file which contain urls for the separate audio and video m3u8 files. Inputstream.adaptive will always start with whichever video manifest it chooses (based on settings), download the video m3u8 and set up the DRM key for video. Then it will download the audio m3u8, and it's at this point where I think things are going wrong. On Android it looks like it starts a new decryption session and this is the what is causing problems.

@chamchenko
Copy link

Hi @glennguy
Thank you for efforts and for this detailed explanation.
We really hope that it get solved soon as the Play-In Tournament starts in a week and the Playoffs in 40 days

@glennguy
Copy link
Contributor

@chamchenko

Thanks for updating the add-on to Matrix btw.

I've made some progress, turns out my test stream from January wasn't set up to play in Kodi correctly even without this issue. New test stream, seems to play video and audio on Windows (while both streams have separate key ids) without crashing.

I have to tidy up the messy code I've made debugging the issue and test a game next time I'm home when they're on, then I can PR the changes (and you can test) and get them in Matrix branch ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue Type: Bug issue has reported a bug
Projects
None yet
Development

No branches or pull requests

6 participants