FreeTubeApp / FreeTube

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

[Bug]: video glitch since version 0.20 #4890

Open Angedestenebres opened 5 months ago

Angedestenebres commented 5 months ago

Guidelines

Describe the bug

  1. Open Freetube
  2. Click on a video
  3. The playing starts
  4. After few second, there are some glitches.
  5. See this video to illustrate the issue: https://video.tedomum.net/w/nf5o9io8pTRB7dbNXvUbMC

Expected Behavior

Playing video without issue

Issue Labels

visual bug

FreeTube Version

0.20

Operating System Version

Linux Mint 21.3

Installation Method

Flathub

Primary API used

Local API

Last Known Working FreeTube Version (If Any)

0.19.2

Additional Information

I have two laptops and both has the same OS (Linux Mint 21.3) and version (flatpak 0.20) but only one laptop has this issue. Both using X11.

However, the resolution of the laptop with the issue is 1366x768 (max for my screen). I don't have the issue on the laptop with the resolution 1920x1080.

Nightly Build

Angedestenebres commented 5 months ago

I complete the ticket with the PC configuration where I get the issue:

CPU: Intel© Core™ i5-5300U CPU @ 2.30GHz × 2 GPU: Intel Corporation HD Graphics 5500 RAM: 8Gb Resolution: 1366x768 OS: Linux Mint 21.3 DE: Cinnamon Display server: X11

I tried to remove the app cache in /.var and also all the config, no effect. Remove and install again the app didn't resolve the issue.

Also, I have no issue to watch a video directly from Youtube website or from a Peertube instance or a local video. The issue is linked to Freetube only.

ssnor commented 5 months ago

I have this exact problem and had to switch to the Flatpak to get around it, with the version 0.20 bump it has once again reared it's ugly head.

The bug is introduced somewhere between "v0.19.1-nightly-3750 Beta" and "v0.19.1-nightly-3828 Beta" (for once, procrastinating cleaning my ~/Downloads came in useful :P). Since the Flatpak fixed the problem and no one had filed an issue here, I assumed I had a problem with my configuration.

It doesn't show up on screen record. I see it in pretty much every video, multiple times. Minimum once every five minutes, but on some videos several times a minute. I get the impression that more active videos have more of the bug. On a rewatch of a video, it doesn't occur on the same timestamps. Fullscreen or not doesn't seem to matter.

It shows up in Freetube v0.19.1-nightly-3828 Beta and the v0.20.0 Beta Flatpak, but not in the v0.19.1-nightly-3750 Beta.

Here's my configuration, it's a Dell Latitude E7450 laptop with three monitors connected trough a dock.

OS: openSUSE Tumbleweed x86_64 Host: Latitude E7450 Kernel: 6.8.2-1-default Resolution: 1920x1080, 1920x1080, 1920x1080 DE: Xfce 4.18 WM: Xfwm4 CPU: Intel i5-5300U (4) @ 2.900GHz GPU: Intel HD Graphics 5500 Memory: 4178MiB / 15863MiB Display server: X11

Angedestenebres commented 5 months ago

Interesting, we have the same CPU / GPU. Maybe it's related to that. I think it could be interesting to have more reports and details about configurations.

jwadden commented 4 months ago

I've got the same problem when I use FreeTube on my old laptop (a Lenovo G70-80 with an Intel I7-5500U CPU with integrated HD 5500 graphics.) I can watch videos through other applications (browser, Celluloid, etc.) without a problem. When I use FreeTube on my main desktop PC (AMD 5700X CPU, Radeon 7600 graphics) it works fine, so the problem seems to be specific to old Intel CPUs.

ssnor commented 4 months ago

I can pretty much confirm that this is an hardware acceleration bug. The bug disappears when you deny FreeTube GPU acceleration (and CPU levels rise back to what they where before the update). Can any of you guys try it and see if that solves the issue for you? Flatseal can deny GPU acceleration in the sandbox if you use the Flatpak version of FreeTube.

I always suspected something with the GPU since the visuals of the bug reminded me of what a faulty GPU can look like. Can we assume this is an Electron bug, or is GPU acceleration handled by something else in FreeTube?

absidue commented 4 months ago

FreeTube turns on VA-API video decoding on Linux in Electron but the rendering of the videos is outside of FreeTube's control. As you all seem to be using pretty similar hardware, I suspect that it is more likely to be GPU driver issue. Probably in the Intel driver's VA-API implementation for that hardware.

Angedestenebres commented 4 months ago

Hello,

@ssnor: You are right. If I disable the GPU acceleration via Flatseal, it works like a charm.

@absidue: I think there is a link with the GPU but did you change something between old versions and the current one? Because I use Freetube on this computer since 2021 and I never see that until now.

ssnor commented 4 months ago

It's probably just a flag set to activate GPU acceleration for our architecture in an Electron bump. I am curious if it is possible to disable it without using the Flatpak sandbox?

This is the driver I think, but I couldn't find an issue filed for this bug. Btw, this might be woo-woo, but I found the bug reduced in frequency after a BIOS update. Could be placebo though.

Revival8697 commented 4 months ago

Can you run a Chromium browser (Chromium, Chrome, Brave, ...) with the --enable-features=VaapiVideoDecodeLinuxGL flag to enable hardware acceleration and see if YouTube videos play normally?

CC: @Angedestenebres @ssnor.

did you change something between old versions and the current one?

https://github.com/FreeTubeApp/FreeTube/pull/4532 happened.

Angedestenebres commented 4 months ago

Hello,

After checking by opening Chromium with this value, I have no issue at all. However, if I enable again the GPU acceleration via Flatseal, I get again the issue on Freetube.

Revival8697 commented 3 months ago

Hello,

After checking by opening Chromium with this value, I have no issue at all. However, if I enable again the GPU acceleration via Flatseal, I get again the issue on Freetube.

Hmm. If it is working on Chromium, it should work on Freetube.

Can you verify your hardware acceleration is working on Chromium? Play a video, F12 > Vertical 3 dots > More tools > Media > Video decoder, Hardware decoder should be true.

blhobbs commented 3 months ago

I have the glitching problem too. I'm running v0.20.0 on an Intel NUC (i3 processor) with XUbuntu 22.04. Actually I have it running on two identical NUCs with the same OS, and using the built-in video hardware. I only see the glitchy video on one of the NUCs. The only difference that I'm aware of is that the video resolution is set to 1280x720 where I see the glitchy video. The other is set to 1920X1080 and no problems with the video. The glitchy video shows up when playing the video in full screen OR non-fullscreen. It occurs every minute or so. I glad I found this bug report, since I hadn't thought about the resolution difference in my two setups. [EDIT 6/6/2024] I spent some time watching a video on the aforementioned1920x1080 NUC. I DO notice some video glitching but it only occurs when I click on the time line to skip forward or back in the video.[/EDIT] GREAT software otherwise - I'm really enjoying it. Here's two successive frames showing the problem Glitch1 Glitch2

msjoberg commented 2 months ago

I have this issue as well. At least some workaround like a setting to disable GPU acceleration would be nice.

$ lspci -k | grep -EA3 'VGA'
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 5500 (rev 09)
    DeviceName:  Onboard IGD
    Subsystem: Dell HD Graphics 5500
    Kernel driver in use: i915
Revival8697 commented 2 months ago

I have this issue as well. At least some workaround like a setting to disable GPU acceleration would be nice.

You can use --disable-gpu for now.

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

Does this issue still persist for you on v0.21.0?

Angedestenebres commented 2 months ago

Hey :cat:

Does this issue still persist for you on v0.21.0?

For the moment, the flatpak version is still in 0.20. I'll try again when the 0.21 will be available.

Angedestenebres commented 2 months ago

After testing with the version 0.21 with my computer (see: https://github.com/FreeTubeApp/FreeTube/issues/4890#issuecomment-2041364824), I still have the issue.

CaptainMorgan12 commented 2 months ago

Environment: librem 5, postmaketos edge, freetube 0.20, kernel 6.6.32-librem5.2, wayland, phosh 0.39.0r1.

Freetube

For me videos play normally but especially on initial load all the subscription videos show up with dark blue tint, playing the video and going back to subscription list then shows the correct color.

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.

Angedestenebres commented 1 month ago

The issue is still there with the latest version (0.21.2).

Flashwalker commented 3 weeks ago

I'm running Wayland on KDE Neon distro on Intel Ultra 7 CPU with ARC graphics driver installed. There is a total video glitch in Freetube v0.21.3 beta

Снимок экрана_20240811_181843-1

Video works ok only with --disable-gpu flag

UPD: On X11 same glitch. So in my case it's look like intel ARC graphics related problem (driver installed and works fine)