-
-
Notifications
You must be signed in to change notification settings - Fork 82
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 content stops working after several minutes #584
Comments
I am also getting the same type errors for live Hulu content, getting the 403 error after aproximatly 5 minutes (tested multiple times on different channels) : 2023-10-11 23:04:01.907 T:24461 error : CCurlFile::CReadState::FillBuffer - (0x6a2d31e0) Failed: HTTP returned code 403 2023-10-11 23:04:01.909 T:24461 error : AddOnLog: inputstream.adaptive: CURLOpen returned an error, download failed: http://127.0.0.1:52103/https://livem-akc-na.media.hulustream.com/v1/live/dash/initial/a2da138b-b686-4ec7-b008-f47c2babcef4/manifest.mpd?acquired_source_name=NBC_KING_SEA_MMA_CLT2-USW2&cdns=af&cluster=green&cver=0&duration=10800s&manifest_cdn=ak&origin=us-west-2&patch=true&query_params_v2=false&repeat=true&segment_type_enabled=false&stream_filter=fhd_high_stereo&uas_enabled=false&authToken=1697090640_1af222c63bc7cdd07bb365ff0e7ebeb1d0238ba827f82824097860ebb40abe54 If it matters , the key parts of the log file are: 2023-10-11 18:19:09.308 T:4199 info : ----------------------------------------------------------------------- |
Are you using Kodi omega???
…On Fri, 13 Oct 2023, 7:36 am kcook98765, ***@***.***> wrote:
I am also getting the same type errors for live Hulu content, getting the
403 error after aproximatly 5 minutes (tested multiple times on different
channels) :
2023-10-11 23:04:01.907 T:24461 error : CCurlFile::CReadState::FillBuffer
- (0x6a2d31e0) Failed: HTTP returned code 403
2023-10-11 23:04:01.909 T:24461 error : CCurlFile::Open -
http://127.0.0.1:52103/https://livem-akc-na.media.hulustream.com/v1/live/dash/initial/a2da138b-b686-4ec7-b008-f47c2babcef4/manifest.mpd?acquired_source_name=NBC_KING_SEA_MMA_CLT2-USW2&cdns=af&cluster=green&cver=0&duration=10800s&manifest_cdn=ak&origin=us-west-2&patch=true&query_params_v2=false&repeat=true&segment_type_enabled=false&stream_filter=fhd_high_stereo&uas_enabled=false&authToken=1697090640_1af222c63bc7cdd07bb365ff0e7ebeb1d0238ba827f82824097860ebb40abe54
Failed with code 403:
2023-10-11 23:04:01.909 T:24461 error : AddOnLog: inputstream.adaptive:
CURLOpen returned an error, download failed:
http://127.0.0.1:52103/https://livem-akc-na.media.hulustream.com/v1/live/dash/initial/a2da138b-b686-4ec7-b008-f47c2babcef4/manifest.mpd?acquired_source_name=NBC_KING_SEA_MMA_CLT2-USW2&cdns=af&cluster=green&cver=0&duration=10800s&manifest_cdn=ak&origin=us-west-2&patch=true&query_params_v2=false&repeat=true&segment_type_enabled=false&stream_filter=fhd_high_stereo&uas_enabled=false&authToken=1697090640_1af222c63bc7cdd07bb365ff0e7ebeb1d0238ba827f82824097860ebb40abe54
2023-10-11 23:04:06.474 T:24461 error : CCurlFile::CReadState::FillBuffer
- (0x6a2d5300) Failed: HTTP returned code 403
2023-10-11 23:04:06.475 T:24461 error : CCurlFile::Open -
http://127.0.0.1:52103/https://livem-akc-na.media.hulustream.com/v1/live/dash/initial/a2da138b-b686-4ec7-b008-f47c2babcef4/manifest.mpd?acquired_source_name=NBC_KING_SEA_MMA_CLT2-USW2&cdns=af&cluster=green&cver=0&duration=10800s&manifest_cdn=ak&origin=us-west-2&patch=true&query_params_v2=false&repeat=true&segment_type_enabled=false&stream_filter=fhd_high_stereo&uas_enabled=false&authToken=1697090640_1af222c63bc7cdd07bb365ff0e7ebeb1d0238ba827f82824097860ebb40abe54
Failed with code 403:
And repeated over and over until stopping the playback.
If it matters , the key parts of the log file are:
2023-10-11 18:19:09.308 T:4199 info :
-----------------------------------------------------------------------
2023-10-11 18:19:09.308 T:4199 info : Starting Kodi (20.2 (20.2.0)
Git:20230629-5f418d0b13). Platform: Android ARM 32-bit
2023-10-11 18:19:09.308 T:4199 info : Using Release Kodi x32
2023-10-11 18:19:09.308 T:4199 info : Kodi compiled 2023-06-29 by Clang
9.0.9 (https://android.googlesource.com/toolchain/llvm-project
a2a1e703c0edb03ba29944e529ccbf457742737b) for Android ARM 32-bit API level
21 (API level 21)
2023-10-11 18:19:09.308 T:4199 info : Running on Amazon AFTMM with Android
TV 7.1.2 API level 25, kernel: Linux ARM 32-bit version 4.4.120+
2023-10-11 18:19:09.310 T:4199 info : FFmpeg version/source: 4.4.1-Kodi
2023-10-11 18:19:09.310 T:4199 info : Host CPU: ARMv7 Processor rev 4
(v7l), 4 cores available
2023-10-11 18:19:09.310 T:4199 info : Product: mantis, Device: mantis,
Board: mantis - Manufacturer: Amazon, Brand: Amazon, Model: AFTMM,
Hardware: mt8695
.....
2023-10-11 18:19:09.803 T:4199 info : CAddonMgr::FindAddons:
inputstream.adaptive v20.3.13 installed
2023-10-11 18:19:09.804 T:4199 info : CAddonMgr::FindAddons:
inputstream.ffmpegdirect v20.5.0 installed
2023-10-11 18:19:09.805 T:4199 info : CAddonMgr::FindAddons:
inputstream.rtmp v20.3.0 installed
2023-10-11 18:19:09.843 T:4199 info : CAddonMgr::FindAddons:
plugin.program.iptv.merge v0.24.7 installed
2023-10-11 18:19:09.844 T:4199 info : CAddonMgr::FindAddons:
pvr.iptvsimple v20.11.0 installed
2023-10-11 18:19:09.847 T:4199 info : CAddonMgr::FindAddons:
repository.slyguy v0.0.8 installed
2023-10-11 18:19:09.856 T:4199 info : CAddonMgr::FindAddons:
script.module.slyguy v0.74.0 installed
2023-10-11 18:19:09.863 T:4199 info : CAddonMgr::FindAddons:
slyguy.dependencies v0.0.16 installed
2023-10-11 18:19:09.864 T:4199 info : CAddonMgr::FindAddons: slyguy.hulu
v0.3.0 installed
—
Reply to this email directly, view it on GitHub
<#584 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABPQAKLVFO7LO6RGEWEZPXTX7A2B3ANCNFSM6AAAAAA5VGIMR4>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I am running 20.2 currently, I guess Omega is 21 , This is a device I am testing on, so I suppose I can try getting Omega installed to see if it is an issue. It is on a FireTV Stick 4K , I'll hunt down an apk and try it out, thanks. |
Pretty sure the issue is fixed in newer inputstream adaptive which is in
Kodi 21 only
…On Fri, 13 Oct 2023, 7:55 am kcook98765, ***@***.***> wrote:
I am running 20.2 currently, I guess Omega is 21 , This is a device I am
testing on, so I suppose I can try getting Omega installed to see if it is
an issue. It is on a FireTV Stick 4K , I'll hunt down an apk and try it
out, thanks.
—
Reply to this email directly, view it on GitHub
<#584 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABPQAKKERVQP4XMXN6QXKGTX7A4LLANCNFSM6AAAAAA5VGIMR4>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I'm using Omega 21 on Android and I've never been able to watch any live channels other than the local ones (CBS NBC etc) it doesn't bother me as I never watch live TV. |
I upgraded to Omega, but still seems to be an issue, aproximatly 5 minutes into stream, get the 403 errors again. Log file: Note, there is a "service.IPTVEncoderRedirect v0.0.102 installed" , it is my own Addon ( https://github.com/kcook98765/service.IPTVEncoderRedirect ) I am developing that utilizes your great addons to setup a middle man between kodi and an external DVR , whereby it can stream the video (using a video encoder) to the external DVR , but it only interacts with kodi via JsonRPC to "start" and "stop" playback. The timeout issue occurs if I manually try to watch, or via my addon, after 5 minutes it stalls and the 403 errors begin. This is a dedicated Kodi device, no local library, etc, so I can easily test changes on it to help address the issue. |
And I should note, I have also tried same setup, but Nexus on a RPI 3B, and the stream does not stall. EDIT: it did stall in same way. Also upgrade to Omega on Rpi 3B and again the same result, 5 minutes in. |
Ok. Maybe it needs to refresh it's token every 5mins. Ill need take a look
…On Fri, 13 Oct 2023, 8:28 am kcook98765, ***@***.***> wrote:
I upgraded to Omega, but still seems to be an issue, aproximatly 5 minutes
into stream, get the 403 errors again.
Log file:
https://paste.kodi.tv/ekunenaqaw
Note, there is a "service.IPTVEncoderRedirect v0.0.102 installed" , it is
my own Addon ( https://github.com/kcook98765/service.IPTVEncoderRedirect
) I am developing that utilizes your great addons to setup a middle man
between kodi and an external DVR , whereby it can stream the video (using a
video encoder) to the external DVR , but it only interacts with kodi via
JsonRPC to "start" and "stop" playback.
The timeout issue occurs if I manually try to watch, or via my addon,
after 5 minutes it stalls and the 403 errors begin.
This is a dedicated Kodi device, no local library, etc, so I can easily
test changes on it to help address the issue.
—
Reply to this email directly, view it on GitHub
<#584 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABPQAKLTOP6XP3LVFBQTYE3X7BAGTANCNFSM6AAAAAA5VGIMR4>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
in case it helps, here is another log, this time I enabled debug logging before starting stream, which closed again after apx 5 minutes: https://paste.kodi.tv/okapemuzac Thank you for looking into this. |
I've been looking into this a bit more, and from my logs, it looks like this is probably related to xbmc/inputstream.adaptive#804 Where the manifest "Location" tag needs to be used, but I can see in Debug logs that it is not, as the urls are all "initial" ones, never see the "continue" ones. I am going to try to work out a hack/fix in your proxy code to see if I can utilize the location url in the manifest to see if I can get past the 5 minute live tv duration issue for now, but looks like real fix needs to be done in inputstream.adaptive (and I don't have any C/C++ programming experience). |
One additional note, I also set debug for inputstream.adaptive manifest files, and the very first one shows the "Location" data had been modified to include the proxy url , IE "http://127.0.0.1:52103/https://livem-akc-na.media.hulustream.com/v1/live/dash/continue......." (though this was not used in the actual request the next time). but after that one, the rest of the manifests did not show this change to "Location", as they were all "/v1/live/dash/continue/..........". Just noting as it seemed odd to see the first one updated like that (but not utilized) and then to not see changes in the later ones). |
in ref to my last debug file posted above ( https://paste.kodi.tv/okapemuzac ) : At 2023-10-13 12:07:40.867 T:7338 (condensed details): script.module.slyguy/resources/lib/proxy.py, line 395, in _quality_select IndexError: list index out of range When I temporarily fixed this to double check and return None, live TV then failed within a couple minutes (instead of 5 minutes). This is because of fixing this error, in turn, it tried to allow this manifest, but it had no "Representation elements" in it. (which is why the error is seen in the first place originally) I'm still trying to get up to speed on how DASH works and how inputstream.adaptive is supposed to work, etc, but somewhere in this flow, the only reason the stream lasts 5 minutes is because the first manifest has that much data in it. And since the request for the next manifest happens but fails due to error, it happily keeps going until original manifest is exhausted. So I do not know if the second manifest is being requested too soon (does seem like it starts to fill in after first attempt), or something else is going on. |
So for now its not fixable? Its inputstream adaptive problem or no? Have same issue, happens only after 5 mins of playing live tv channels. |
I can gladly help with logs/testing and even supply login credentials for testing if you need them. |
The issue is somehow tied to "Location" element of the manifests. The initial manifest (as seen in the debug manifests files generated by inputstream.adaptive) shows:
And includes "Location" :
And the it looks like Location is followed, as the next manifest has:
note it shows :
(maybe a clue here). And apparently after that inputstream.adaptive is always calling the original "initial" manifest, though authToken is updated :
but Location is relative:
so it never tries any Location (correctly setup or not) again after the first failed one, and plays out until 5 minutes later when it halts with the 403. Should'nt the "Location" urls process and be the ones used after the "Initial" one? |
but then IA eventually tries to call the initial manifest i've found |
The initial manifest includes the "Location"and it is followed (though maybe not processed correctly?), but then when it requests the next "initial" manifest, there is a "Location", but it is a relative URL ... maybe this is the issue? |
also try with my proxy turned off. i think it fails a lot quicker then for some reason. that could be a clue with thats wrong with IA |
With Slyproxy shut off, the same 5 minutes of live, then fails. But, even though the manifests include "Location" (though relative, not absolute), there is never a manifest from these "Continue" urls logged by IA, like it is skipping them? With Slyguyproxy enabled, the first issue is the error in your proxy code (see above "IndexError: list index out of range"), which in turn sends IA a bad response, which IA then in turn never uses the Location again. I followed the code, and your proxy is trying to determine qualities in the update manifest data, but maybe it should not even be doing this with these update manifests, and just updating the Location url (and any other required changes) for the update manifests? |
/v1/live/dash/initial/xxxxx/manifest.mpd?
/v1/live/dash/initial/xxxxx/manifest.mpd? Could the "cdns" values difference or the "segment_type_enabled" flag play into this issue? |
Also, when watching via Windows browser, the update manifests always seem to have segment data, but kodi IA update manifests mostly don't. |
With latest comment on above IA #1407 , Partial Manifest updates are not currently supported, which means Live Hulu is not possible at this time unless a hack is added (if possible) to modify the partial updates to full updates (IE keep history of initial Manifest and somehow update it within the Proxy to become a completely updated manifest, though not sure how complex this would be, as I already tried just keeping the "Representation" data from the first one and adding it to the Update ones, which did not work (insertions of data were correct, but stream stalled anyway), so likely need to also manipulate/add additional data from first Manifest). |
Progress is being made. As noted in xbmc/inputstream.adaptive#1407 I now have a change that mostly works (mostly because there is an odd Kodi timeline issue, where stream tries to start nearend of 3 hour mark, but rewind and it plays fine). Tried multiple channels and all played past 5 minute mark, so the update manifests are processing and working. |
I really think I have it working this time. The changes made here now seem to populate the sparse hulu manifest update files with data from the initial (or added elements should they appear in an update). I can now play from the live edge of the stream forward (and can rewind a coupe hours via the initial manifest entries). This is working on multiple channels, some with multiple periods. There is some oddities in the kodi timeline display, so I might need to tweak something to fix that, but this does seem to allow partial hulu updates to at least process and play now. Thanks for all your help, and I'll submit a PR to Matt to see if he will integrate this to allow Hulu Live to once again work. Have a great weekend all! |
I have submitted a PR and am continuing to test, but so far it seems to be working. PR is #625 Will be testing over the weekend to verify if any issues creep up. |
Thanks so much for your work with this fix, kcook98765! Can you explain in any quick way (without you wasting much time on me) to a noob, how to update/patch this thing? I tried to put proxy.py file into /resources/lib/ folder, but it didnt worked, stream stops even earlier, even with rewinding. Or should I just wait for whole update? Also some files I didnt even had in my /lib/ folder... And I think I'm up to date with addon itself, 0.30. I'm on Kodi 21.0, build from June. |
@stnufc , My testing via Firestick was hit and miss, unsure why yet, as there was no log entry, but it seemed kodi would occasionally crash on Firestick. Windows still seems solid. I may have to debug some more. It sounds like maybe your install is not right, or you are not in right directory. The path for the proxy.py file should end something like (in my windows machine) : \Kodi\addons\script.module.slyguy\resources\lib And you should see the other files there, as seen: https://github.com/kcook98765/slyguy.addons/tree/master/script.module.slyguy/resources/lib The proxy.py file above from my fork is the one to use. If still have issue, try turning on debug level logging in kodi, restart kodi and navigate to replicate the issue, then upload log file. |
@stnufc , One more note, make sure you have settings for hulu Live channels to "Play from Live" (not "From start") as there maybe issues trying to play near the beginning (3 hours ago) data, as I have not yet worked out how to prune old segments, so playing from Beginning, or rewinding too far may cause an issues for now). |
@gmjh123 , I have not personally seen audio dropouts like you noted for VOD (not live) content. Though I do not often use VOD Hulu via Kodi. you'd probably have better luck if you post to Kodi forums and supply a log file, as it may have some details to help figure out the issue. |
Ok thanks. I did give a log file to Matt but he didn't respond so I presume there were either no errors or errors he couldn't do anything about. Sorry for the interruption 😊 |
any playback stuff i pretty much put at bottom of my pile. it really needs to be Inputsream Adaptive fixing these things. I also dont have the time to try reproduce these bugs and then get all the files inputstream adaptive requires to open issues there |
Ok understood. As I said I suspect not many other people have this issue
anyway. Although I have to say the area of 'playback' seems pretty
important to me, but what do I know 😊
…On Mon, Nov 27, 2023, 6:34 PM Matt Huisman ***@***.***> wrote:
any playback stuff i pretty much put at bottom of my pile. it really needs
to be Inputsream Adaptive fixing these things.
But there is only 2 of them and 1 is pretty busy lately.
Also, there is quite heavy development s some things break that used to
work etc.
I also dont have the time to try reproduce these bugs and then get all the
files inputstream adaptive requires to open issues there
—
Reply to this email directly, view it on GitHub
<#584 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BCOQ6QNZICLCSYSVFSYIUWTYGUWPTAVCNFSM6AAAAAA5VGIMR6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRYHA3DQNJZGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
yes, its very important but its basically out-of-my-hands which is frustrating. |
I modified code to use less xml DOM calls by using a dictionary in python to maintain needed Manifest data. It seems quicker to process updates now, and so far, it has not crashed Fire TV Stick device. I even tested a stream that had many (5+) Periods, and let it run long enough that it produced a new Period, which incorporated as expected in the modified Manifest data :-) I may still want to revisit to see about pruning outdated segments and Periods, but for now the extras do not seem to cause any issue as I expect IA is limiting access to older segments/periods based on it's own logic. I am testing multiple channels tonight to see how it holds up. |
yes, my parsing is verry in-effeceint. it uses the dom a lot and repeats a bunch of loopings. |
but just to check - IA will be fixing this at some point? these changes should only be temporary? |
I just posted a request for this at IA xbmc/inputstream.adaptive#1426 They had mentioned previously it could be done, so I closed the original issue I had (following relative urls) and opened up this official request to see if they |
thank you :) I think the issue of relative urls in location still doesnt work in IA right? |
actually I believe they did implement a fix for that, but of course in Hulu case while it did call the relative url (when not using your proxy), it got the small Patch manifest which IA currently can not handle. |
closed prev PR and opened a new one with updated code that is working quite well for me now. I can watch any stream now , from the live edge without issues for couple of hours. This work around would only need to be in place until IA makes changes to handle these special "patch" manifests that Hulu uses. If anyone wants to test this PR I'd love some feedback on how it performs, and any issues that may occur. |
I want to ask a much more basic question. I can't watch any Hulu live tv
other than my local affiliates. I don't know why. I tried changing the
latitude longitude to my home which made no difference. Also Hulu has a
thing which only allows a very limited amount of times you can watch live
TV away from home. How does this add on get round that? Thanks very much.
…On Thu, Nov 30, 2023, 6:36 PM kcook98765 ***@***.***> wrote:
closed prev PR and opened a new one with updated code that is working
quite well for me now.
I can watch any stream now , from the live edge without issues for couple
of hours.
This work around would only need to be in place until IA makes changes to
handle these special "patch" manifests that Hulu uses.
If anyone wants to test this PR I'd love some feedback on how it performs,
and any issues that may occur.
#633 <#633>
—
Reply to this email directly, view it on GitHub
<#584 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BCOQ6QNHK5XR6ZF2FNO4PRDYHERCFAVCNFSM6AAAAAA5VGIMR6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZVGEZDOMRVHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I might get corrected here, but I don't think this addon gets around much of anything (though there is a lat/long entry, I don't use it myself). I only use this from home, so I can't really comment on anything else related to "Away" from home. |
Ok thanks. I still have no idea why I can only watch local channels but I
can live with it.
…On Thu, Nov 30, 2023, 7:07 PM kcook98765 ***@***.***> wrote:
I might get corrected here, but I don't think this addon gets around much
of anything (though there is a lat/long entry, I don't use it myself).
I only use this from home, so I can't really comment on anything else
related to "Away" from home.
—
Reply to this email directly, view it on GitHub
<#584 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BCOQ6QJT6LWB5RX7I4W5V33YHEUUHAVCNFSM6AAAAAA5VGIMR6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZVGIZTONBUHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Replaced proxy.py from script.module.slyguy but still getting freezes trying to watch non-live content on Hulu. Any other things to try? |
See: Patch won't work with newer changes in this addon. |
I have modified patch so it "should" work with the newer changes, see: |
Replaced proxy.py with the latest, still no dice: 2024-04-12 13:14:42.735 T:3987 info : script.module.slyguy - Python Version: 3.11.9 (main, Apr 9 2024, 09:48:27) [GCC 13.2.0] |
That log snippet does not show details needed to verify the issue. I ca not tell if there was an issue in this patch code, the main addon code or some network/server issue. Would need full logs with debug enabled. |
Reproduced with debug logs, logs at |
Not seeing any live media being played (thus this patch does not attempt to do anything). I re-read previous note and you mentioned non-live ... if it is a non-live show you are trying, then this patch does not apply and there is something else going on. You do not need this patch unless you are trying to watch Live channels. It should not cause any issues for non-live, but I would revert to original addon code, run in debug and post a new issue for Matt to look into, as it must be a deeper issues somewhere, not related to live streams (or this patch). |
Yep, definitely not live streams. I would guess anyone on Omega using the Hulu plugin for non-live will see the issue |
proxy.py reverted and issue reproduced with debug logging |
You will want to start (or find similar for VOD issues) a new issue at https://github.com/matthuisman/slyguy.addons/issues As I do not work on this addon , just trying to work on a patch specific to Hulu Live TV streaming. You should be able to use the same log file as I believe it has what Matt needs to look into it. |
I tried but it was closed and referenced here |
suspect this has been fixed with some IA updates since |
kodi.log
This has been an issue for both Linux and Windows devices whenever I try the Hulu addon with Live TV content. Judging that the it gives "Failed: HTTP returned code 403" I assume it's a DRM issue?
The text was updated successfully, but these errors were encountered: