WesselKroos / youtube-ambilight

This browser extension adds ambient light to YouTube videos
MIT License
87 stars 8 forks source link

video stops loading and freezes when using Dark Reader extension on youtube #226

Closed Tracenji closed 5 months ago

Tracenji commented 6 months ago

Bug description

the video timestamp freezes which causes youtube to not buffer more of the video but video still plays

Steps to reproduce the behavior

have ambient light installed and enabled have Dark Reader extension (version 4.9.80) installed and enabled on youtube play a video, select 1440p60 quality, watch video then timestamp freezes and video stops buffering new parts and buffer runs out

Browser

Firefox

Operating system

Linux

Extension version

2.38.1

The bug still happens in these conditions

Additional context and/or screenshots

this seems like it only or at least mostly happens on 1440p quality interacting with the youtube player, such as pausing/playing or otherwise causes it to buffer a small bit of the video again but freezes again

WesselKroos commented 6 months ago

I'm unable to reproduce this issue (on Windows, because I don't have Linux). But Firefox versions 123 and 124 have a performance regression bug (#224) So, theoretically, I could imagine that it takes up more CPU/GPU power that your system also needs to download and decode the video.

Could you check if this issue also exists on Firefox 122? Here you can download the older version: https://support.mozilla.org/en-US/kb/install-older-version-firefox#w_i-still-want-to-downgrade-where-can-i-get-the-previous-version

Tracenji commented 6 months ago

i did some more digging on Firefox 123 and it seems to only happen with many tabs/windows open (307 tabs over 14 windows if you were wondering, i know, i know, i should get rid of at least 90% of them) so it seems to be performance related, it could be that Dark Reader combined with Ambient Light causes increased CPU/GPU power usage and combined with the regression in #224 causes it to not have enough CPU/GPU power left for video buffering i do not believe i ever experienced this before Firefox 123, even with more tabs open than currently

i could still try checking if i am able to recreate this in Firefox 122 if you want

WesselKroos commented 6 months ago

Ah, that's indeed a lot of tabs. I think we can be almost sure that it is performance related.

Then this should also be improved once I have released version 2.38.2 which contains a partial workaround for Firefox 123 and 124. I'll probably do that in 1 or 3 days when I've found some spare time. It should be fully resolved once Firefox has released version 125.

WesselKroos commented 5 months ago

@Tracenji Firefox has fixed the performance regression in version 125. Could you check if you still have this problem in Firefox 125?

Tracenji commented 5 months ago

my distro does not ship firefox 125 yet, but i am not able to reproduce this anymore, even on the same Firefox 124 install with 550 tabs and 4K 60fps playback quality my Ambient Light version is updated to 2.38.2 now, this extension update seems to have removed or at least greatly improved the problem as it would start happening at 200 to 250 tabs before

WesselKroos commented 5 months ago

Strange, I improved nothing regarding the performance in the new extension version. Maybe they fixed something in Firefox 124 then. Anyway, nice to hear that it has been fixed!