aitschti / plugin.video.cb20

A kodi 20+ plugin for streaming cams from chaturbate.com
8 stars 0 forks source link

Error listing available cams. Could not fecth JSON from API. #1

Closed Better-Red closed 9 months ago

Better-Red commented 9 months ago

Hi, thank you for your work. I've noticed the past few days using 20.2 in Windows I get: "Error listing available cams. Could not fetch JSON from API." when trying to view a source, but CB20 works great on Android (20.2 again). Any ideas? Much appreciated.

Better-Red commented 9 months ago

Happy New Year! Screenshot attached of the issue, as seen in Windows, but not Android.

screenshot00001

aitschti commented 9 months ago

Hey, sorry for getting back so late, Happy New Year! ;) As the codebase is identical to Android and Windows and I cannot reproduce the error on my Windows setup using 20.2, it could be a problem within your Windows network settings (Firewall, VPN et.). Do I read it correctly, that it worked before in Windows ("I've noticed the past few days")? If so, what changed in your system?

You could try opening the following URL in a browser of your choice and see, if you get a valid JSON response. Depending on your browser, you get a nice formatted string of cam infos from "female 18-21": https://chaturbate.com/api/ts/roomlist/room-list/?enable_recommendations=false&genders=f&limit=90&offset=0&from_age=18&to_age=20

Output should start with: {"rooms":[{"display_age":

If the URL cannot be opened, something is blocking the request, therefore CB20 cannot fetch the JSON. Other menu entries are not dependent on JSON, like opening the first level of the gender menus. You could try searching for a username you know and see, if you get a valid response to decrease the radius of possible issues.

Let me know what you find out. For now I am assuming that the problem has the origin outside of kodi, but I may be wrong.

Cheers.

Better-Red commented 9 months ago

Not at all, thank you for getting back to me. Happy New Year to you too.

You are spot on, I've just tried CB20 and it works, I am guessing it was my VPN. What threw me is I usual use the same server across all my devices, but I might have unknowingly used different protocols. Maybe the service doesn't like WireGuard as opposed to OpenVPN.

I'll close the issue now.

Out of interest, have you looked at 21 Omega yet?

Thanks again.

aitschti commented 9 months ago

Alright, I can reproduce the error using a VPN in Windows. Depending on the country used as VPN, there will be "human eval" test from cloudflare before continuing to the site. This is where the error must have been originated from. Good to know.

No, I have not tried any 21 version, yet. Did you and did you try using the plugin there? There should not be any regression as far as I am aware of. Will get into the game when releases candidates get released.

Cheer and welcome.

Better-Red commented 9 months ago

That makes sense, much appreciated.

I've had a play with Kodi 21 Omega. CB20 works fine, but SC19 drops the video after 2 or 4 seconds and I've tried it on a vanilla install as well as 'my setup'. I can't work out why it would do that on Kodi 21, but not 20. I can raise it as an issue over on SC19? Or, as you say, leave it for the RCs.

aitschti commented 9 months ago

Interesing! I have an idea what is causing the stop of the stream, must be related to the latest FFMPEG v21 is using and handling of m3u8 playlist files. I will need to take a deeper look into that, if this is true. For now, just use kodi v20 ;)

Better-Red commented 9 months ago

Interesing! I have an idea what is causing the stop of the stream, must be related to the latest FFMPEG v21 is using and handling of m3u8 playlist files. I will need to take a deeper look into that, if this is true. For now, just use kodi v20 ;)

Definitely, there's no big driver for me to be an early adopter of Kodi 21, neither my box nor my PC have Dolby Vision. I probably won't migrate until the first bug fix/backport release and it goes to 21.1. I like to have a look at what's coming when I've got nothing better to do.

I hadn't noticed FFmpeg Direct had had 6.0 bump. I'm glad you know what you're doing!

aitschti commented 9 months ago

I just took a quick look at v21 and was able to reproduce the stop of the stream in SC addon with CB working fine. Both sites use different kind of m3u8 playlists, but still, both are segmented video files. The internal player does not seem to like the SC streams anymore and is unable to fetch the next segment in time or whatever, debug log says nothing about it. A quick fix was to use one of the available inputstream addons from the official repository and add a single line of code to the addon to make the SC streams work again (make it use the inputstream addon for playback).

line 791 (for ffmpegdirect) li.setProperty('inputstream', 'inputstream.ffmpegdirect')

In the past my addon was independent of additional addons, but I may include the requirement in the future, so handling of streams gets more robust again. The changelog for kodi 21 says things about "M3U8-Playlist-File-Support" through FFMPEG 6. It is not 100% clear to me what that means, as m3u8 playlist have been working forever for me...

In the end, thanks for putting my attention to ffmpegdirect addon. ;)

I think we can stop here as this has nothing to do with CB anymore. Will get to work when RC arrives...

Cheers

Better-Red commented 9 months ago

That works, thank you. See you for the Release Candidates..!

JayDee696969 commented 7 months ago

I just took a quick look at v21 and was able to reproduce the stop of the stream in SC addon with CB working fine. Both sites use different kind of m3u8 playlists, but still, both are segmented video files. The internal player does not seem to like the SC streams anymore and is unable to fetch the next segment in time or whatever, debug log says nothing about it. A quick fix was to use one of the available inputstream addons from the official repository and add a single line of code to the addon to make the SC streams work again (make it use the inputstream addon for playback).

line 791 (for ffmpegdirect) li.setProperty('inputstream', 'inputstream.ffmpegdirect')

In the past my addon was independent of additional addons, but I may include the requirement in the future, so handling of streams gets more robust again. The changelog for kodi 21 says things about "M3U8-Playlist-File-Support" through FFMPEG 6. It is not 100% clear to me what that means, as m3u8 playlist have been working forever for me...

In the end, thanks for putting my attention to ffmpegdirect addon. ;)

I think we can stop here as this has nothing to do with CB anymore. Will get to work when RC arrives...

Cheers Screenshot_4

JayDee696969 commented 7 months ago

Do you not have a Kodi repo for these addons?

aitschti commented 6 months ago

No, I do not have a repo for the two addons.

As for your screeenshot, see the Feb 16th release. Addon works fine under v21.

Cheers