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

Often video freezes #841

Closed
raven428 opened this issue Jul 19, 2024 · 12 comments
Closed

Often video freezes #841

raven428 opened this issue Jul 19, 2024 · 12 comments
Labels
bug Something isn't working

Comments

@raven428
Copy link

Context

Please provide any relevant information about your setup

  • Add-on Version: plugin.video.youtube-7.0.9+beta.3.zip
  • Kodi Version: 21.0
  • Kodi GUI Language: English
  • Operating System: Android
  • Operating System Language: English

Expected Behavior

Playing videos without freezes


Current Behavior

Playing videos started freezing too often after 18.07.2024 with CVideoPlayerAudio::Process - stream stalled in log. This repeats with both adaptive and non-adaptive streams


Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. start any video
  2. depend on resolution, video will freeze with CVideoPlayerAudio::Process - stream stalled in kodi.log

Log

kodi.zip


Additional Information

With higher resolution, video will freeze in shorter time, like 20–30 seconds. Occasionally, it unfreezes by itself, but mostly only after switching video streams. I also tried to switch all combinations of alternative client details in advanced add-on settings. The most relevant combination is alternative #2 with support alternative player and use adaptive streaming formats with external player enabled


@raven428 raven428 added the bug Something isn't working label Jul 19, 2024
@MoojMidge
Copy link
Collaborator

Can you access YouTube from the website and play the same video without any problems?

InputStream.Adaptive evaluates that available bandwidth for your device for video stream selection at ~3 MB/s, however your device/network only seems capable of downloading at that speed very intermittently, most other times downloading at well below 1 MB/s and often below the 300 kB/s necessary to play the video stream in your log without buffering.

It could be that YouTube is throttling anyone accessing video streams in the way done by this plugin, but I haven't seen any other reports of this. You may be being throttled specifically, but again haven't seen any other reports of this occuring.

Your log has a few other indications that there is something not quite right with your local network, maybe try power cycling your network hardware.

I also tried to switch all combinations of alternative client details in advanced add-on settings. The most relevant combination is alternative #2 with support alternative player and use adaptive streaming formats with external player enabled

Don't do this, it will lead to problems if you don't know what you are doing. Just use the Setup Wizard and use the recommended default settings, with device appropriate performance settings.

@MoojMidge
Copy link
Collaborator

I think you may be effected by this:

yt-dlp/yt-dlp#10443

https://ntc.party/t/%D0%B7%D0%B0%D0%BC%D0%B5%D0%B4%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5-youtube-%D0%B2-%D1%80%D0%BE%D1%81%D1%81%D0%B8%D0%B8/8055

Will close this issue, as there is not much I can do unfortunately

@raven428
Copy link
Author

I think you may be effected by this

Looks like you're right 😢 Working fine through a VPN connection. However, the web version of YouTube is still not affected for some reason

@MoojMidge
Copy link
Collaborator

However, the web version of YouTube is still not affected for some reason

It is possible you are using QUIC in your browser which libcurl used by Kodi does not support. The QUIC connection is apparently more resistant to this kind of meddling because the SNI, that identifies the server you are trying to establish a secure connection to, is itself encrypted. However some of the later comments in the linked discussion indicates that even this is now being intercepted.

MoojMidge added a commit to MoojMidge/plugin.video.youtube that referenced this issue Jul 22, 2024
@MoojMidge
Copy link
Collaborator

MoojMidge commented Jul 22, 2024

With recent versions of InputStream.Adaptive it is possible to disable certificate verification in cURL. I think when certificate verification is disabled cURL won't use SNI.

You can try https://github.com/MoojMidge/plugin.video.youtube/archive/refs/heads/master.zip and see if this helps. You will also need InputStream.Adaptive v21.4.11 or newer.

@Miraihi
Copy link

Miraihi commented Jul 25, 2024

I experience this problem too
Unfortunately my version of InputStream.Adaptive is v21.4.10. Probably have to wait until OSMC developers compile the newer one.

@MoojMidge
Copy link
Collaborator

. Tbh while it could work, it is likely that it won't do anything

In any case if you want to try it when you can install a newer version of ISA, you need to disable the following in the plugin settings: Settings > Advanced > Internet > Force SSL certificate verification

@Miraihi
Copy link

Miraihi commented Jul 25, 2024

It may be a placebo, but I think beta.4 is an improvement. While the problem doesn't go away, the freezing seems less frequent. Or maybe that's because I switched to Kodi v21 (Updating ISA along with it).

@Miraihi
Copy link

Miraihi commented Jul 25, 2024

BTW I wonder how InputStream.Adaptive v21.4.11 can exist when the last version on the github is 21.4.10-Omega.

MoojMidge added a commit to MoojMidge/plugin.video.youtube that referenced this issue Jul 25, 2024
@MoojMidge
Copy link
Collaborator

There are a couple of bugs with the way I implemented this. Will make a new beta release of the plugin soon, but as you noted the point is somewhat moot because there is no v21.4.11 release of ISA yet.

@Miraihi
Copy link

Miraihi commented Jul 25, 2024

Meanwhile I've dealt with the problem using Kodi's built-in proxy client and byedpi. It's running fine on raspberry pi 4 (OSMC) as a service. (armv7l version)
Arguments: ./ciadpi -i 127.0.0.1 -p 10801 -s 1

Kodi proxy settings:
SOCKS5 with remote DNS resolving
Server - 127.0.0.1
Port - 10801

There is a version for android too.

@MoojMidge
Copy link
Collaborator

I think that is a much better way to resolve this problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants