xbmc / inputstream.adaptive

kodi inputstream addon for several manifest types
Other
452 stars 241 forks source link

DRM-DASH Live Stream fails Android 32 Bit #1147

Closed scottydulton closed 1 year ago

scottydulton commented 1 year ago

Bug report

Describe the bug

Here is a clear and concise description of what the problem is:

DRM-DASH live streams are freezing after 5 or so minutes of playback, i cannot reproduce this issue on windows, or my phone Armv8a 64 bit

Expected Behavior

Here is a clear and concise description of what was expected to happen:

Stream to play without issue.

Actual Behavior

Stream Freezes after a few minutes

Possible Fix

To Reproduce

Steps to reproduce the behavior:

  1. Use Android Armv7a(32bit) device (im using Fire Tv 4k)
  2. Play a live stream on Kayo Sports (i can provide account credentials for testing if need be)

Debuglog

The debuglog can be found here: https://pastebin.com/0Kh7y0dr

MPD/M3U8s/ISM

An example or copy of a manifest (or manifests for HLS - master and variants) can be found here:

Screenshots

Here are some links or screenshots to help explain the problem:

Additional context or screenshots (if appropriate)

Here is some additional context or explanation that might help:

Your Environment

Used Operating system:

note: Once the issue is made we require you to update it with new information should that be required. Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.

glennguy commented 1 year ago

Hi @scottydulton

This looks like the issue in the log:

CCurlFile::Open - <http://127.0.0.1:52103/https://drm.streamotion.com.au/licenseServer/widevine/v1/streamotion/license> Failed with code 403:
{"code":130401,"message":"Too many concurrent streams."}

@matthuisman this must be what you mentioned the other day?

scottydulton commented 1 year ago

Hi @glennguy yes, however windows and my phone doesnt give that error and playback is fine.

glennguy commented 1 year ago

Are there other devices using this same account that are streaming at the same time you're trying to play on your firetv 4k? It seems to be a mechanism to prevent having the same account play back more than 2/3 streams at the same time i.e to enforce that you're only getting what you pay for.

scottydulton commented 1 year ago

@glennguy no, only my phone and computer but not playing at the same time, i only installed on the other devices to test playback once the fireTV started stalling

scottydulton commented 1 year ago

@glennguy i just played on all 3 at the same time to test and only the 32 bit device failed

matthuisman commented 1 year ago

If you check the log on windows or 64bit device, can you see it requesting the license from the license server every 5mins? Or only once?

glennguy commented 1 year ago

Yeah every 2 minutes or so I get

2023-02-19 14:46:45.511 T:21092   debug <general>: AddOnLog: inputstream.adaptive: CDMMessage: 1 arrived!
2023-02-19 14:46:45.511 T:21092   debug <general>: AddOnLog: inputstream.adaptive: Opened widevine session ID: 887E9C6B1C7F849F51EA52E40B54B503
2023-02-19 14:46:45.533 T:4832    debug <general>: CurlFile::XFILE::CCurlFile::Open - <https://drm.streamotion.com.au/licenseServer/widevine/v1/streamotion/license>
2023-02-19 14:46:45.533 T:4832    debug <general>: XCURL::DllLibCurlGlobal::easy_acquire - Created session to https://drm.streamotion.com.au
2023-02-19 14:46:45.852 T:10260   debug <general>: AddOnLog: inputstream.adaptive: CDMMessage: 1 arrived!
2023-02-19 14:46:45.852 T:10260   debug <general>: AddOnLog: inputstream.adaptive: Opened widevine session ID: EEFDF8DE20F8D8B88EF5CEF3D221C99F
2023-02-19 14:46:45.958 T:4832    debug <general>: AddOnLog: inputstream.adaptive: License update successful
2023-02-19 14:46:45.959 T:4832    debug <general>: CurlFile::XFILE::CCurlFile::Open - <https://drm.streamotion.com.au/licenseServer/widevine/v1/streamotion/license>
2023-02-19 14:46:46.418 T:4832    debug <general>: AddOnLog: inputstream.adaptive: License update successful
scottydulton commented 1 year ago

@matthuisman @glennguy windows log attached, i did notice in the windows log it say MAX_CONCURRENT_STREAMS==100 https://pastebin.pl/view/9e41c5c4

glennguy commented 1 year ago

I don't think that the MAX_CONCURRENT_STREAMS message is related to the problem here.

This is what's in use: https://irdeto.com/news/irdeto-leverages-drm-based-heartbeats-to-address-session-sharing-overzealous-credential-sharing-and-illegal-streaming/

Are all your devices seen by the same external IP address? VPNs/smart DNS connected on any of them?

matthuisman commented 1 year ago

This is kayo right? Not DSTV? Dtsv is what I was talking about the other day Glenn. I'm also seeing issues with android 32 bit elsewhere. Stan addon appears to not work at all but is ok on 19.5 https://github.com/matthuisman/slyguy.addons/issues/385

.Message ID: @.***>

glennguy commented 1 year ago

Yeah for Kayo, sorry about the mixup. Here it seems that the license proxy is somehow deciding that the initial request is fine but any subsequent ones are not from the same 'session'.

scottydulton commented 1 year ago

@glennguy on the fireTV i use Blokada with google public DNS no VPN's though, yes all devices connected to the same wifi network

scottydulton commented 1 year ago

This is kayo right? Not DSTV? Dtsv is what I was talking about the other day Glenn. I'm also seeing issues with android 32 bit elsewhere. Stan addon appears to not work at all but is ok on 19.5 matthuisman/slyguy.addons#385 .Message ID: @.***>

@matthuisman I have your stan addon on my fireTV kodi 20.0 and it works fine.

a301uuv commented 1 year ago

I’m also seeing the same outcome using 32-bit KODI (4k Fire TV Max stick) versus 64-bit KODI (Shield 2019 pro).

matthuisman commented 1 year ago

could someone try Kodi 19.5 with latest Kayo on their 32-bit Kodi device and confirm no issues? That should tell us its an Inputstream Adaptive issue

a301uuv commented 1 year ago

could someone try Kodi 19.5 with latest Kayo on their 32-bit Kodi device and confirm no issues? That should tell us its an Inputstream Adaptive issue

I use KODI 19.5 with the 4k Fire TV Max stick and latest Kayo addon. Freezing still occurs.

matthuisman commented 1 year ago

OK, so this is not a regression of Inputstream Adaptive between 19 and 20

a301uuv commented 1 year ago

Yeah for Kayo, sorry about the mixup. Here it seems that the license proxy is somehow deciding that the initial request is fine but any subsequent ones are not from the same 'session'.

By all means I’m a beginner so feel free to lambast me. Is this something unique to the architecture of KODI 32-bit installs? I.e. what makes inputstream adaptive functioning on one versus the other?

glennguy commented 1 year ago

I'm still not following why this is android 32-bit @scottydulton in your log above from Windows, we have the same issue. The license is not renewed successfully. Is playback still working in Windows though?

scottydulton commented 1 year ago

@glennguy yes playback never stops on windows

matthuisman commented 1 year ago

@scottydulton please try with latest Kayo addon 0.14.0

just remembered that binge etc have to refresh their token on each license request and kayo didnt do that as it wasnt drm (until recently)

Suspect this should fix it. Please report back

scottydulton commented 1 year ago

@matthuisman still the same, on fireTV(32bit) once license failure occurs playback freezes, on windows(64bit) im seeing successful licenses, followed by failures, then further in the log successful again, playback never stops on windows windows 1.log

a301uuv commented 1 year ago

Also getting the same results on Fire Tv 32-bit.

matthuisman commented 1 year ago

how long does it meant to take to fail?

I tried the APP and Kodi add-on on my same 64bit android phone and both kept playing find without any 403 errors on license server. Even after I started a stream in browser as well.

ill need to try my 32bit device.

I notice Kodi add-on makes twice as many calls to widevine license server. Almost like it doubles up. 2x straight after each other. 2min wait. 2x straight away again

Also, the kodi does the server request [][] and then encrypted requests. Whereas the official app just uses the normal requests.

matthuisman commented 1 year ago

trying windows now. also see the double up wv request but cant reproduce a 403 error.

matthuisman commented 1 year ago

@scottydulton @a301uuv what kayo subscription are you on? One / Basic / Premium? One im using is on Basic (2x streams)

scottydulton commented 1 year ago

@matthuisman Im on the basic plan , and anywhere from 3 to 15 minutes to fail on fire tv

matthuisman commented 1 year ago

@scottydulton @a301uuv

can you guys please try this build of Inputstream Adaptive

Android 32bit: https://jenkins.kodi.tv/job/xbmc/job/inputstream.adaptive/job/PR-1160/1/artifact/cmake/addons/build/zips/inputstream.adaptive+android-armv7/inputstream.adaptive-21.0.0.zip

Other Os (windows etC) https://jenkins.kodi.tv/blue/organizations/jenkins/xbmc%2Finputstream.adaptive/detail/PR-1160/1/artifacts

Requires kodi 20 or 21

setting android to use a single session. I have found it now only makes 1x request to WV server (vs 2x)

also confirmed windows also now using single decrypter which may help with the errors that were in windows logs Nope. windows still has the errors

a301uuv commented 1 year ago

I'm still getting the freezing issue after 5 minutes or so. Fire TV stick KODI 20 (32-bit) and inputstream adaptive 21.0

https://pastebin.com/fyhvJ36J

matthuisman commented 1 year ago

I can't replicate. How many other devices using that login at same time??

On Fri, 24 Feb 2023, 12:31 am a301uuv, @.***> wrote:

I'm still getting the freezing issue after 5 minutes or so. Fire TV stick KODI 20 (32-bit) and inputstream adaptive 21.0

https://pastebin.com/fyhvJ36J

— Reply to this email directly, view it on GitHub https://github.com/xbmc/inputstream.adaptive/issues/1147#issuecomment-1441601561, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPQAKN5JLOIX3WB3RNRGKLWY5C7HANCNFSM6AAAAAAVAVT43A . You are receiving this because you were mentioned.Message ID: @.***>

a301uuv commented 1 year ago

I'll try a different account.

matthuisman commented 1 year ago

otherwise maybe a fire tv stick only issue?

a301uuv commented 1 year ago

Can confirm it works on a fire tv stick. also works with KODI 19 without excessive users on the account.

glennguy commented 1 year ago

@a301uuv could you test the appropriate zip in https://jenkins.kodi.tv/blue/organizations/jenkins/xbmc%2Finputstream.adaptive/detail/PR-1165/1/artifacts ?

a301uuv commented 1 year ago

Will do. I can report back Monday.

glennguy commented 1 year ago

Thanks! @scottydulton should have tagged you too, if you have time to test on your FireTV.

a301uuv commented 1 year ago

Can report inputstream.adaptive+osx-x86_64, inputstream.adaptive+osx-arm64, inputstream.adaptive+android-armv7 and inputstream.adaptive+android-aarch64 working without issue.