inputstream.adaptive icon indicating copy to clipboard operation
inputstream.adaptive copied to clipboard

Hulu VOD hanging on Omega

Open ZaphodBeeblebrox24 opened this issue 1 year ago • 23 comments

Bug report

Describe the bug

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

Watching VOD with the Hulu addon hangs Kodi

Expected Behavior

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

VOD stream plays

Actual Behavior

VOD stream stalls and hangs Kodi

Possible Fix

To Reproduce

Steps to reproduce the behavior:

  1. Use slyguy Hulu addon
  2. Pick any non-live stream
  3. Hang

Debuglog

The debuglog can be found here: https://paste.coreelec.org/Dh8F1I

MPD/M3U8s/ISM

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

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:

  • [ ] Android

  • [ ] iOS

  • [ ] tvOS

  • [x] Linux

  • [ ] OSX

  • [ ] Windows

  • [ ] Windows UWP

  • Operating system version/name: Coreelec 21

  • Kodi version: Omega

  • inputstream.adaptive version: v21.4.4.1

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.

ZaphodBeeblebrox24 avatar Apr 13 '24 14:04 ZaphodBeeblebrox24

As further information, the following addons work fine:

Amazon, Netflix, Disney+, Paramount+

ZaphodBeeblebrox24 avatar Apr 13 '24 14:04 ZaphodBeeblebrox24

we dont have Hulu account also you havent provide the manifest so its not possible for us investigate

i noticed that you are using not the last ISA version, before you should test by using the last ISA v21.4.5 but since you are using Coreelec, ISA versions for CE are managed by them not by Kodi team

otherwise better solution is that you test with a system officially supported by Kodi/ISA like Windows, MacOs or Android this way we can also provide possible test builds if needed

CastagnaIT avatar Apr 14 '24 09:04 CastagnaIT

Can you get the manifest from the log files link? If not, what is the best way to provide it?

Unfortunately I don't have any devices to run windows, macos or android

ZaphodBeeblebrox24 avatar Apr 14 '24 14:04 ZaphodBeeblebrox24

you cant require an account

to get the manifest file by using CE is more hard to do you need to follow these steps: https://github.com/xbmc/inputstream.adaptive/wiki/Dev.-FAQ#how-to-get-downloaded-manifests-files and after you need to extract the file from CE device storage if the device storage is a SD card you can remove the SD and connect it to a computer to copy the manifest file, otherwise, you need to read instructions on Coreelec wiki to understand how to access files in the device storage from a PC

CastagnaIT avatar Apr 15 '24 05:04 CastagnaIT

Manifest:

https://paste.coreelec.org/QCnNUU

Kodi debug log:

https://paste.coreelec.org/5SkwH7

ZaphodBeeblebrox24 avatar Apr 16 '24 15:04 ZaphodBeeblebrox24

Were those helpful? I can attach more logs or manifests if it helps.

ZaphodBeeblebrox24 avatar Apr 20 '24 22:04 ZaphodBeeblebrox24

i think i have understood the problem, its needed make some tests but i had no time to do it

CastagnaIT avatar Apr 21 '24 07:04 CastagnaIT

Ok, no worries. Just wanted to make sure I provided something helpful and didn't need to do any more log collecting.

ZaphodBeeblebrox24 avatar Apr 21 '24 13:04 ZaphodBeeblebrox24

nope not found the problem, the weird thing from the log is that are missing the audio streams when start the second period/chapter but by loading the manifest locally the audio streams seem to be parsed correctly on the second period/chapter

can try to see if CE has updated ISAdaptive to the last version 21.4.5? then update it and test again

if same problem occur give a new log to see if there are differences

CastagnaIT avatar Apr 24 '24 09:04 CastagnaIT

Updated to 21.4.5

Log

https://paste.coreelec.org/ArhdLC

Manifest

https://paste.coreelec.org/41L8xG

ZaphodBeeblebrox24 avatar Apr 24 '24 21:04 ZaphodBeeblebrox24

When using the H.264 codec - no audio track. With H.265 - KODI crashes. The log contains both cases: https://paste.kodi.tv/qunuzafodi.kodi

  • Operating system version/name: Debian GNU/Linux 12 (bookworm), kernel: Linux x86 64-bit version 6.1.0-20-amd64
  • Kodi version: Kodi (21.0 (21.0.0) Git:20240414-nogitfound)
  • inputstream.adaptive version: 21.4.6

Edit: The problem is with the playback of movies and series. For example, a movie, KODI crashes: screenshot Live broadcasts work fine. It was reported to the author of the Hulu add-on: https://github.com/matthuisman/slyguy.addons/issues/717#issuecomment-2081653875

zuzia-dev avatar May 03 '24 12:05 zuzia-dev

Any progress here? Looks like the issue happens on two different architectures.

ZaphodBeeblebrox24 avatar May 06 '24 02:05 ZaphodBeeblebrox24

i tried inspecting the code where i thought it was the cause but with no results so im not able to understand where is the problem

maybe @glennguy have some hint? otherwise the only way is replicate the problem locally to attempt in-depth debugging but require an access to hulu account (with VPN idk if works) or else a free stream that have the same problem

CastagnaIT avatar May 08 '24 15:05 CastagnaIT

With H.265 - KODI crashes.

the kodi log dont provide info about the crashes, so its needed a gdb stacktrace log of kodi executable without it its not possible understand the root of crash https://github.com/xbmc/inputstream.adaptive/wiki/Dev.-FAQ#how-to-get-stacktrace-log-of-a-kodi-crash-on-linux

CastagnaIT avatar May 11 '24 08:05 CastagnaIT

@CastagnaIT I have complete, detailed logs, but is it safe to make them public? There the device ID, tokens, etc. How can I discreetly give them to you?

zuzia-dev avatar May 11 '24 16:05 zuzia-dev

it would be better if you put the logs here not in pvt so to allow other devs to inspect them I don't know what sensitive data your logs may have but if you think some data need to be removed you can edit/censure it with a text editor relevant text part without removing entire log lines

CastagnaIT avatar May 12 '24 07:05 CastagnaIT

I’ve also had problems with Hulu but with Live TV, it will get stuck on buffering. I’m using Sony TV on Android TV 10. Will provide manifests as I find more problematic channels.

MajinLugia avatar May 14 '24 03:05 MajinLugia

Any progress here? We can provide more logs, etc if it would help.

ZaphodBeeblebrox24 avatar May 31 '24 22:05 ZaphodBeeblebrox24

From my side no i have already tried to load provided manifest manually to try inspect but without success, for these problems kodi logs are not very useful and i have no other ways to investigate

note also that links you have provided on this thread above are all expired, you should use our pastebin https://paste.kodi.tv/ or else attach the files directly on thread message to keep them in persistent way

as already said on my previous comments, for the crash its needed the gdb stacktrace log, for the other problem where the streams arent loaded after a period switching, i think its needed someone provide me a temporary provider access to try test and debug the problem locally in hoping VPN works

also think it's worth knowing if there are any changes with v21.4.9

CastagnaIT avatar Jun 01 '24 07:06 CastagnaIT

I can certainly ask the coreelec team to build 21.4.9 and try it.

I am happy to provide my HULU login if it would speed things up.

ZaphodBeeblebrox24 avatar Jun 02 '24 21:06 ZaphodBeeblebrox24

On version 21.4.10 Hulu is still not working properly. Still no audio when using AVC and HEVC codecs.

zuzia-dev avatar Jun 25 '24 17:06 zuzia-dev

I am happy to provide my HULU login if it would speed things up.

if you can provide me the login i can give a try over next weeks you can send to my email that can be viewed from beacons.ai/castagnait

CastagnaIT avatar Jul 21 '24 15:07 CastagnaIT

thanks to @dapharsyde for hulu access! finally i found the bug

<ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" cenc:default_KID="ae967c161edf4a62afab98a933bbea9c"></ContentProtection>

this manifest has a default_KID without dash chars (such as uuid), then the value its not converted in to bytes and so cause different sideeffects/crashes i will do a fix soon

CastagnaIT avatar Jul 31 '24 11:07 CastagnaIT

i guess i can add dashes in my proxy for backwards compat :)

PS: Great find and getting this fixed :)

Do you know when this started to be a problem? Or has it just been like this since forever?

matthuisman avatar Aug 01 '24 08:08 matthuisman

idk when the problem is started on Omega since has been reworked most of the code

i suspect that on the old Nexus works by chance, seem that the kid is extracted from the stream and so it replace the bad parsed from manifest

CastagnaIT avatar Aug 01 '24 09:08 CastagnaIT

sweet. easy to fix in proxy with a regex replace :)

def fix_default_kids(input_text):
    def format_kid(match):
        kid = match.group(1)
        formatted_kid = f"{kid[:8]}-{kid[8:12]}-{kid[12:16]}-{kid[16:20]}-{kid[20:]}"
        print('Dash Fix: Replaced default_KID {} -> {}'.format(kid, formatted_kid))
        return ':default_KID="{}"'.format(formatted_kid)

    pattern = ':default_KID="([0-9a-fA-F]{32})"'
    replaced_text = re.sub(pattern, format_kid, input_text)
    return replaced_text

matthuisman avatar Aug 01 '24 09:08 matthuisman

OK, script.module.slyguy -> v0.84.41 implemented the above so should now fix this Hulu VOD issues with / and without your fix in inputstream.adaptive :)

matthuisman avatar Aug 01 '24 09:08 matthuisman

yes script workaround is useful in awaiting of new isa releases

CastagnaIT avatar Aug 01 '24 10:08 CastagnaIT

Thanks everyone for the effort in getting this working again! Saints be praised, just in time to watch the new season of Futurama

ZaphodBeeblebrox24 avatar Aug 03 '24 01:08 ZaphodBeeblebrox24