FreeTube icon indicating copy to clipboard operation
FreeTube copied to clipboard

[Bug]: choppy YouTube play

Open arturasb opened this issue 2 years ago • 30 comments

Guidelines

  • [X] I have encountered this bug in the latest release of FreeTube.
  • [X] I have encountered this bug in the official downloads of FreeTube.
  • [X] I have searched the issue tracker for open and closed issues that are similar to the bug report I want to file, without success.
  • [X] I have searched the documentation for information that matches the description of the bug I want to file, without success.
  • [X] This issue contains only one bug.

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

arturasb avatar Aug 31 '23 07:08 arturasb

Do you have the proxy video through Invidious setting enabled?

absidue avatar Aug 31 '23 11:08 absidue

Do you have the proxy video through Invidious setting enabled?

It seems, I don't image

arturasb avatar Aug 31 '23 11:08 arturasb

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

absidue avatar Aug 31 '23 11:08 absidue

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.

arturasb avatar Aug 31 '23 11:08 arturasb

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.

absidue avatar Aug 31 '23 15:08 absidue

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

arturasb avatar Aug 31 '23 17:08 arturasb

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.

absidue avatar Aug 31 '23 20:08 absidue

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

arturasb avatar Sep 04 '23 18:09 arturasb

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....

arturasb avatar Sep 11 '23 13:09 arturasb

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] avatar Oct 10 '23 01:10 github-actions[bot]

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] avatar Nov 08 '23 01:11 github-actions[bot]

same exact issue, it's unusable

Screenshot_20231122_200918

RodoMa92 avatar Nov 22 '23 19:11 RodoMa92

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

RodoMa92 avatar Nov 23 '23 10:11 RodoMa92

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

absidue avatar Nov 23 '23 10:11 absidue

@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.

RodoMa92 avatar Nov 23 '23 11:11 RodoMa92

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] avatar Dec 22 '23 01:12 github-actions[bot]

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] avatar Jan 23 '24 01:01 github-actions[bot]

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] avatar Feb 21 '24 01:02 github-actions[bot]

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] avatar Mar 21 '24 01:03 github-actions[bot]

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] avatar Apr 19 '24 01:04 github-actions[bot]

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

@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 avatar May 02 '24 14:05 arturasb

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 avatar May 06 '24 10:05 arturasb

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.

arturasb avatar May 06 '24 11:05 arturasb

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.

RodoMa92 avatar May 06 '24 11:05 RodoMa92

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] avatar Jun 04 '24 01:06 github-actions[bot]

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] avatar Jul 03 '24 01:07 github-actions[bot]

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] avatar Aug 01 '24 01:08 github-actions[bot]