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

Hulu Live fix to pre-process Patial (patch) Manifests to form IA can process #633

Closed
wants to merge 0 commits into from

Conversation

kcook98765
Copy link

This version of my fix is working quite well now, I can watch just about any channel (though I have one where there is no audio, but I think maybe IA just made a change that will help, so it is not an issue that happens because of this code).

I removed some un-needed changes to other areas of the code.

Other than near beginning and end of _parse_dash (to call the new functions to process Hulu Live specifically), there are only a couple changes to the rest of the original proxy code.

One to handle an error more gracefully, and the other to re-try 204 server errors that occasionally crop up (it retries up to 10 (currently) times when hitting 204... I have seen it in action a few times, and always resolved within 3 tries max, with no issues in the stream playing.

This maybe a good temporary patch for the proxy for Live Hulu streams for now until IA makes changes to handle this natively.

@stnufc
Copy link

stnufc commented Dec 1, 2023

Thanks!

I tried this one, but on some channels (usa,abc,cnn) kodi just crashes after selecting quality (I played with settings, and I did set to play it from live).

With default proxy file, it stops after 5 or 10 secs.

Oh, clicked on a different channel, then on usa - playback happened, but crashed after 1 sec.

I even tried to play with inputstream adaptive settings and also settings in slyguy common settings.

ps so if you can, maybe share your settings of hulu addon? slyguy & input, I assume, are default?

@kcook98765
Copy link
Author

@stnufc ,

A log file would be very helpful, especially if you could enable Debug logging in System settings first.

As for details of my setup:

Starting Kodi (21.0-BETA1 (20.90.801) Git:20231018-64d1844655). Platform: Windows NT x86 64-bit
Kodi compiled 2023-10-18 by MSVC 193431937 for Windows NT x86 64-bit version 10.0 (0x0A00000B)
Running on Windows 11 22H2, kernel: Windows NT x86 64-bit version 10.0.22621.2715

inputstream.adaptive v21.4.0 installed
repository.slyguy v0.0.9 installed
script.module.slyguy v0.74.9 installed
slyguy.dependencies v0.0.16 installed
slyguy.hulu v0.3.0 installed

And then just the proxy.pl overwritten with this version.

Most settings are default.

I just tried USA and it streamed as normal.

Also, what device/OS are you running this on?

@stnufc
Copy link

stnufc commented Dec 2, 2023

Thanks! I use Windows 10, I tried 2 nightly builds - from June and the most recent one. Cant get USA and FS1 and some other channels to work. I use same network, same PC...

They work, but only after I disable SlyGuy proxy (in slyguy common settings). But if I do that, it skips quality selection and only selects the worst quality. Playback is fine, tho.

Weird that other channels work fine. (like I tried CBS SN - flawless. Log for comparison - https://pastebin.com/raw/JHkb8Yjp)

But a few channels like USA, CNN, FS1, ABC, dont work. Not all of them even local, so I dont follow logic here.

So sometimes its just infinite loading (after selecting quality). Log: https://pastebin.com/raw/x0CgzP7z
Sometimes it even crashed kodi.

I had this issue in October, wrote about it here - #501

But then it got resolved by just selecting to play channels live. And I didnt had this issue, I think (although I didnt used addon frequently and when I did, channels just started buffering after 5 mins - well, the issue that you fixed) until changed proxy file. I played with settings so much (disabled x265 and audio and etc)... and still nothing.

@kcook98765
Copy link
Author

kcook98765 commented Dec 2, 2023

Disabling SlyGuy proxy (at least in my experience) will allow playback, but only for 5 minutes (then it fails). This is due to what happens in the background, the update manifest will fail, but IA will keep calling the original Manifest, but that fails at apx 5 min mark due to auth timeout (normally, first Manifest should be called only once).

With Slyguy proxy on, are you saying all channels fail to play more than a second or 2?

The (clipped) logs don't show much to go on, hard to say where issue maybe, If at all possible turn on debugging in system settings, then try again (should see overlay on screen with some details), this will log a bunch more information.

I assume you saw no hard errors in the logs (like Traceback with multiple lines calling out an issue)?

It sounds like maybe with proxy enabled, some channels now do play beyond the 5 minutes?

One more thing (may not make a difference) I am using the stock Kodi skin in my testing.

Also, some channels do have rather large initial manifests, which means more processing time by IA before playback starts.. but I usually see each channel start between 30 and 45 seconds, so be sure to give it a minute before deciding it is not going to play.

@stnufc
Copy link

stnufc commented Dec 2, 2023

With Slyguy proxy on, are you saying all channels fail to play more than a second or 2?

With your fix (proxy), most channels work, only a few that I mentioned do not work.

I assume you saw no hard errors in the logs (like Traceback with multiple lines calling out an issue)?

I didnt noticed, but Im not a big expert, unfortunately. But no traceback.

It sounds like maybe with proxy enabled, some channels now do play beyond the 5 minutes?

With slyguy proxy? Yea, your fixed defo helped for all other channels which are now working beyond 5 mins.

One more thing (may not make a difference) I am using the stock Kodi skin in my testing.

Yea, the same. I tested on 2 builds, tested on portable and also fully default kodi with only hulu addon and dependencies.

Also, some channels do have rather large initial manifests, which means more processing time by IA before playback starts.. but I usually see each channel start between 30 and 45 seconds, so be sure to give it a minute before deciding it is not going to play

Ok, I usually stop play after 2-3 mins. This time I waited 10 mins. No playback... Just the icon of loading...

The log file after 10 mins - https://pastebin.com/raw/x6SVePwg

Maybe I should give up, IDK... If you dont see anything here, maybe I'll have to wait for addon update or something.

@kcook98765
Copy link
Author

@stnufc

Thanks for confirming this patch helps you play most channels.

The log piece you shared shows pass off to inputstream.adaptive:

AddOnLog: inputstream.adaptive: [Repr. chooser] Resolution set: 1920x1080, max allowed: 3840x2160, Adjust refresh rate: 0

So whatever is going on does not seem to be related to this patch or to the Hulu addon/slyguy proxy. It maybe something wrong with inputstream.adaptive, but we will not be able to confirm or clarify the issue without a debug-enabled and more complete log file.

I'm out for the day, but if you do decide to run a debug enabled log file, it might help shed light on the issue you have with some channels.

@dapharsyde
Copy link

I am testing with these versions:

inputstream.adaptive v21.4.4 installed
repository.slyguy v0.0.9 installed
script.module.slyguy v0.77.8 installed <-- replaced proxy.py
slyguy.dependencies v0.0.17 installed
slyguy.hulu v0.3.1 installed

Unfortunately for all channels, live TV shows the spinning icon, then times out after ~30s. Here is a debug log file while attempting to tune to ESPN. After the failed attempt with the proxy enabled, I disabled it in the add on settings and tuned to ESPN again - this allows video playback for a few seconds before buffering, the same behavior as the default proxy.py

Could this be due to an update to one of the plugins, or something else? Thanks for your help.

kodi.proxy.update.test.log

@kcook98765
Copy link
Author

The fix here is no longer functional with the more recent changes to this addon. Some changes have caused this fix to no longer work by simply dropping this file in place.

The real fix for this would be in IA , see:
xbmc/inputstream.adaptive#1426

I don't have Hulu anymore at this time to be able to try to fix and test a new patch for the recent changes.

@dapharsyde
Copy link

dapharsyde commented Apr 11, 2024 via email

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

Successfully merging this pull request may close these issues.

3 participants