FreeTubeApp / FreeTube

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

Flashing/Flicker when video doesn't load properly #1442

Open kubo6472 opened 3 years ago

kubo6472 commented 3 years ago

Behavior of the program Weird glitching

Expected behavior Video plays or error is displayed

To Reproduce Open the video

Link to video https://youtu.be/Z0v4Hd431Gg

Screenshots

Environment Information (please complete the following information):

GilgusMaximus commented 3 years ago

Well this usually happens when invidious has problems. I have not seen it with the local api yet

jn64 commented 3 years ago

I have seen this with local API. I only use local API with fallback disabled.

However I can't figure out any reason, it seems to be random. Reloading always fixes it.

On Fedora 33 with FreeTube 0.13.1 flatpak

merspieler commented 3 years ago

Seen as well, 0.13.1 on debian testing, .deb package

GilgusMaximus commented 3 years ago

At the moment any testing is non valid as the API is not working anyways. But because @kubo6472 mentioned his own Invidious Instance, it is likely that this might happen due to it.

kubo6472 commented 3 years ago

But because @kubo6472 mentioned his own Invidious Instance, this might happen due to it.

Well, bc the local 404s 4me everytime, so it fallbacks to the invidious one. The app itself is very unusable 4me rn.

StoppingBuck commented 3 years ago

Well, bc the local 404s 4me everytime, so it fallbacks to the invidious one. The app itself is very unusable 4me rn.

That part is a well-known issue and seems to be tracked in #1438

jn64 commented 3 years ago

I have seen this glitching with local API long before the current issue with loading.

After 1438 is fixed I'll try to capture it if I see it again.

peepo5 commented 3 years ago

happens to me occasionally too

i think its actually to do with dash and legacy both not working so it switches between them infinitely

peepo5 commented 3 years ago

maybe a hard player-type auto-switch limit could be implimented

ChunkyProgrammer commented 3 years ago

Was able to reproduce (Local API, Windows 10)

TLDR: I think player = null => program errors which leads to: this = null => more program errors

In the console: it logs "Unable to play dash formats. Reverting to legacy formats..." a bunch (as well as 403 & MediaError) image

But it only logs "No sources available" once and that's where it broke out of the loop for me. & displayed this image

So format is always dash when it gets here until it eventually works? https://github.com/FreeTubeApp/FreeTube/blob/development/src/renderer/components/ft-video-player/ft-video-player.js#L478 I'm not sure why it was able to break out eventually though.

Also, this error didn't appear right away but started appearing after a few loops. (I guess it still loops even when "this" is undefined?) image And when this error stopped it started to work

Maybe something similar to:

If this === undefined Then 
      If format === 'dash' Then
          reloadWatchPageInLegacyFormat(); 
      Else
          reloadWatchPageInDashFormat();
      End-If
End-If

could stop the loop?

GilgusMaximus commented 3 years ago

maybe a hard player-type auto-switch limit could be implimented

Definitely a good idea

Winterhuman commented 3 years ago

Perhaps the width and height of the video frame could be set, like setting the dimensions of an image in an HTML file for before it loads fully, to prevent the video frame from shrinking on failed video loading?

ghost commented 2 years ago

I'm totally new to all of this, but having the same problem. . . . .

  1. is there a work around (in non-programmer terms please)?
  2. Or some change to be made in a person's settings?

Thanks ~

kubo6472 commented 2 years ago

is there a work around (in non-programmer terms please)?

This app uses two methods of getting videos. The local api and using an invidious instance (redirect.invidious.io) to get videos. I run my own invidious instance and after updating both freetube and it to latest versions I practically eliminated this problem. I know this problem still persist with local API, so I won't close this for a workaround.

Let me now how that goes. Greetings, Jakub

jn64 commented 2 years ago

is there a work around (in non-programmer terms please)?

Press Ctrl-R to reload when this happens

ghost commented 2 years ago

Thanks guys, I did finally have to use the reset . . . but have noticed that the black-bubble-errors are back (from a previous post) and so I changed my instance again and it seemed to help a little.

I can't help but feel it's partly because I do not understand Best-Use scenarios, and I'm doing things (using the back button a lot, and searches) which the software isn't happy with. For example in the beginning I would load my subscriptions page often, and was told that youtube doesn't like that and can block certain subscriptions. So I stopped, but is that a document that offers guidance for the best way to use FreeTube?

I will do and read up on using invidious instance ~ Thanks much!

kubo6472 commented 2 years ago

I use RSS to load subs. @CurrentWave

ghost commented 2 years ago

I have now changed the following in my settings:

I'm using RSS No longer using Dash but Legacy instead Back to allowing a new instance at start up

And I'm still having the same issues - I'll be gathering another console image of errors later and posting back here. I don't know if this helps, but I hope so.

efb4f5ff-1298-471a-8973-3d47447115dc commented 2 years ago

[!Warning] This video may potentially trigger seizures for people with photosensitive epilepsy. Viewer discretion is advised

Just putting this vid here

https://user-images.githubusercontent.com/73130443/137804115-06ce4e3b-6bd5-484c-abef-ee2703c2c6aa.mp4

Sandyran commented 2 years ago

I have experienced this too, but with other videos. They flash and load indefinetly. It happends randomly. It is just like in @efb4f5ff-1298-471a-8973-3d47447115dc's video.

kubo6472 commented 2 years ago

Just went back to check for this issue, forgot I already opened this one. It's already happening with Invidious API as well. Since external player was added in the meantime. Opening https://www.youtube.com/watch?v=Pi3_Zs-oRUo this with freetube results in the glitching, opening it in VLC works just fine, and my invidious: https://invidious.tjm.sk/watch?v=Pi3_Zs-oRUo works just fine. I made sure local api was not being used in this example. Any idea what might be the culprit in this case?

kubo6472 commented 2 years ago

Okay, this setting fixes it. image Leaving open for an investigation. If anyone needs to fix their player, use invidious as API and turn this on.

quietwalker-libre commented 7 months ago

I'm having this exact issue and now I've noticed that it's not a Freetube problem in my case: I see I'm not able - for a reason I've not investigated yet - to play a video from youtube site directly. This make me think about any kind of blocking is in place right now (I don't think it's an IP ban, since I don't use youtube often not even automatically download stuff from it in bulk). For this reason I enabled the proxy from the invidious instance and it solved my problem: now I'm able to see video again).

the-overdriven commented 2 months ago

This issue is still happening on newest version! (Release 0.21.0 Beta) GPU: NVIDIA GeForce GTX.

github-actions[bot] commented 2 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.