FreeTubeApp / FreeTube

An Open Source YouTube app for privacy
https://freetubeapp.io/
GNU Affero General Public License v3.0
13.7k stars 867 forks source link

[Bug]: choppy YouTube play #3979

Open arturasb opened 1 year ago

arturasb commented 1 year ago

Guidelines

Describe the bug

  1. Install FreeTube v0.19.0 Beta from Flathub.
  2. Set Prefered API Backend to "Local API".
  3. Play a Youtube video: a) it starts 1080p b) in ~10-15 seconds it start buffering c) video is switched to lowest resolutions - 240p or even 144p

Expected Behavior

It is expected that video will continue to play 1080p, without being choppy/buffering even in lowest resolutions. Same video plays fine in Firefox at 1080p.

This the quality I get now: image

Issue Labels

inconsistent behavior

FreeTube Version

v0.19.0 Beta

Operating System Version

Fedora Workstation 37 LSB Version: :core-4.1-amd64:core-4.1-noarch Distributor ID: Fedora Description: Fedora release 37 (Thirty Seven) Release: 37 Codename: ThirtySeven

Installation Method

flatpak, Flathub

Primary API used

Local API

Last Known Working FreeTube Version (If Any)

v0.18.0 Beta

Additional Information

N/A

Nightly Build

absidue commented 1 year ago

Do you have the proxy video through Invidious setting enabled?

arturasb commented 1 year ago

Do you have the proxy video through Invidious setting enabled?

It seems, I don't image

absidue commented 1 year ago

If you set the default quality to 1080p instead of auto in the player settings, does it stay at 1080p with smooth playback?

arturasb commented 1 year ago

If you set the default quality to 1080p instead of auto in the player settings, does it stay at 1080p with smooth playback?

No, it starts buffering in ~5 seconds with a last frame frozen. Then I wait for 10-20secs, it will continue to play for another ~5-6 seconds and starts buffering again. And it repeats.

absidue commented 1 year ago

Oh goodness that sounds like YouTube throttling must be an A/B test then as playback seems to be fine on my machine.

Do you have a proxy setup in the proxy settings section? If yes please try disabling it and seeing if that fixes the issue.

If you are using a VPN, can you try without one to see if it still happens and if you aren't using a VPN can you try with one (please close FreeTube between turning on/off you VPN, just to make sure that all connections are closed).

Additionally to check if it's actually throttling and not something else, could you please open the devtools (CTRL+SHIFT+I) and switching to the network tab before opening the video page. When you open the video, see if any of the videoplayback?expire=... requests are taking a significantly long amount of time than others. e.g. 10+ seconds.

arturasb commented 1 year ago

Do you have a proxy setup in the proxy settings section? If yes please try disabling it and seeing if that fixes the issue.

No, I do not have a proxy.

If you are using a VPN, can you try without one to see if it still happens and if you aren't using a VPN can you try with one (please close FreeTube between turning on/off you VPN, just to make sure that all connections are closed).

No, I'm not behind VPN.

Additionally to check if it's actually throttling and not something else, could you please open the devtools (CTRL+SHIFT+I) and switching to the network tab before opening the video page. When you open the video, see if any of the videoplayback?expire=... requests are taking a significantly long amount of time than others. e.g. 10+ seconds.

I don't know how to interpret this tho: image

absidue commented 1 year ago

The time column is how long the request took. 10 seconds for those small chunks of video, is definitely worrying, it should be less than a second. Definitely looks like YouTube is throttling.

arturasb commented 1 year ago

Additionally checked with LibreWolf web browser, 1440p widescreen video plays without a single hiccup.

arturasb commented 1 year ago

An update - tried enabling proxying through Invidious and now I'm able to play 720p, 1080p smoothly. But I had to experiment and find an Invidious proxy instance which worked....

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

RodoMa92 commented 1 year ago

same exact issue, it's unusable

Screenshot_20231122_200918

RodoMa92 commented 1 year ago

Mind you that I have a 2.5Gbit connection down, so I doubt it's a connection issue :)

absidue commented 1 year ago

@RodoMa92 Just to confirm you are using the local API with proxy videos through Invidious disabled?

RodoMa92 commented 1 year ago

@RodoMa92 Just to confirm you are using the local API with proxy videos through Invidious disabled?

Yes, that is correct. I can play videos fine after searching for a decent invidious instance and enabling it as a proxy, but I had issues in the past where I'm finding myself having to test different instances multiple times (since sometimes they tend to perform badly from load or just the people behind them having issues).

Might be worth to implement a dynamic tester for people who requires to use a proxy through invidious to test which instance is the faster/working one. Might take a look at it myself, but I'm not really a web developer myself, so I can't promise anything.

github-actions[bot] commented 11 months ago

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 10 months ago

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 9 months ago

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 8 months ago

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 7 months ago

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

efb4f5ff-1298-471a-8973-3d47447115dc commented 7 months ago

@arturasb are you still facing this issue on v0.20.0?

arturasb commented 7 months ago

@arturasb are you still facing this issue on v0.20.0?

Yes, but the nature of the issue is a bit different - there are days and weeks when I can watch videos without interruptions and then suddenly day, two or three days when it is barely watchable in 480p. As I'm on stable system (desktop PC, LAN connected) and my internet is on fiber, I cannot determine condition when or why playback gets choppy suddenly and then it is OK again... One thing I check when I experience poor playback - I test couple or more videos directly from YouTube via web browser (latest Firefox) and all the time it is OK. I'm ready to help by collecting some stats or something if needed, just give me instructions. Small update - now I'm on Fedora 39 and FreeTube v0.20.0 Beta.

arturasb commented 7 months ago

Fresh example. For ~4-5 days now FreeTube drops resolution to 144p and playback only of this resolution is not choppy. This is how it looks: image

And the same video in Firefox (720p): image 1440p, plays smoothly image

arturasb commented 7 months ago

Fresh example. For ~4-5 days now FreeTube drops resolution to 144p and playback only of this resolution is not choppy.

Interestingly, if I toggle "Proxy Videos Through Invidious" ON, FreeTube plays 1080p without hiccups now.

RodoMa92 commented 7 months ago

Yeah, since the throttling is done only where freetube connect directly through youtube and not using a proxy. Issue is that a lot of the time I need to keep reloading the page to get a workable invidious instance. I would still like to get this fixed if possible.

github-actions[bot] commented 6 months ago

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 5 months ago

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 4 months ago

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 3 months ago

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 3 weeks ago

This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.