WesselKroos / youtube-ambilight

This browser extension adds ambient light to YouTube videos
MIT License
86 stars 7 forks source link

inverted colors on specific youtube videos #252

Closed 0x2bilal closed 3 weeks ago

0x2bilal commented 1 month ago

Bug description

the ambient light gives the right color scheme but the video itsself hast inverted or wrong colours (a lot of blue). When scrolling the videos image shows the right color but it switches right bacl when you stop

Steps to reproduce the behavior

nohting but opening the specific videos

Browser

Chrome

Operating system

Windows

Extension version

1.80 (arc browser)

The bug still happens in these conditions

Additional context and/or screenshots

https://www.youtube.com/watch?v=g_Ov2MRXZro&t=2s

No response

WesselKroos commented 1 month ago

You might need to report this bug to the Arc browser developers instead. This sounds like a bug in the Arc browser's texImage2D implementation in combination with specific GPU hardware or video codec. Because I'm not able to reproduce this bug in the Arc browser.

But let's first gather more details about your bug. Some info you can share to help me and the Arc developers figure this out:

  1. Create a screenrecording of the incorrect colors. (Or record a video with your phone if the bug does not show up in the screenrecording. )
  2. What is your CPU and GPU model names.
  3. What is your GPU driver version
  4. What is your Windows and Arc browser version
  5. Is hardware acceleration enabled in the Arc browser?
  6. What errors are displayed at the bottom of the chrome://gpu webpage?
  7. What ANGLE renderer are you using in the browser? (Vulkan, DX9, DX11, DX12, etc...) And is the bug resolved when you try some of the other available ANGLE renderers?
0x2bilal commented 1 month ago

Hey, First off all i really appreciate your help 🙂. So

1. Ill attach a video 2. Cpu: ryzen 9 6900hs Gpu: radeon rx6700s 3. Gpu driver Version: 31.0.12024.2005 4. Arc version: 1.10(37361) 5. It is enabled 6.

Log Messages

[17984:15124:0712/004659.019:WARNING:angle_platform_impl.cc(49)] : HLSLCompiler.cpp:250 (rx::HLSLCompiler::compileToBinary): C:\fakepath(151,3-70): warning X3557: loop only executes for 1 iteration(s), forcing loop to unroll

[17984:1364:0712/004721.341:ERROR:shared_image_manager.cc(223)] : SharedImageManager::ProduceSkia: Trying to Produce a Skia representation from a non-existent mailbox. [17984:15124:0712/004721.410:WARNING:angle_platform_impl.cc(49)] : HLSLCompiler.cpp:250 (rx::HLSLCompiler::compileToBinary): C:\fakepath(137,3-70): warning X3557: loop only executes for 1 iteration(s), forcing loop to unroll

GpuProcessHost: The info collection GPU process exited normally. Everything is okay. GpuProcessHost: The info collection GPU process exited normally. Everything is okay.

      7.Vulkan

Should i send an email to the support of the arc team?

I cant attach the video so i uploaded it to onedrive

Also i couldnt figure out how to change my ANGLE renderer.

[https://res.cdn.office.net/assets/mail/file-icon/png/video_16x16.png]Bildschirmaufnahme 2024-07-12 010028.mp4https://1drv.ms/v/s!AhjnbSlO4EDPh17I0N3X8oElJMPh


Von: Wessel Kroos @.> Gesendet: Thursday, July 11, 2024 7:54:58 PM An: WesselKroos/youtube-ambilight @.> Cc: Bilal Talleb @.>; Author @.> Betreff: Re: [WesselKroos/youtube-ambilight] inverted colors on specific youtube videos (Issue #252)

You might need to report this bug to the Arc browser developers instead. This sounds like a bug in the Arc browser's texImage2Dhttps://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/texImage2D implementation in combination with specific hardware.

But let's first gather more details about your bug. Some info you can share to help me and the Arc developers figure this out:

  1. Make a screenrecording of the incorrect colors. (Or record a video with your phone if the bug does not show up in the screenrecording. )
  2. What is your CPU and GPU model names.
  3. What is your GPU driver version
  4. What is your Arc browser version
  5. Is hardware acceleration enabled in the Arc browser?
  6. What errors are displayed at the bottom of the chrome://gpu webpage?
  7. What ANGLE renderer are you using in the browser? (Vulkan, DX9, DX11, DX12, etc...) And is the bug resolved when you try some of the other available ANGLE renderers?

— Reply to this email directly, view it on GitHubhttps://github.com/WesselKroos/youtube-ambilight/issues/252#issuecomment-2223542183, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A7ACJ2K5OCZUXPHUJNAJU33ZL3BHFAVCNFSM6AAAAABKVYEQ4WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRTGU2DEMJYGM. You are receiving this because you authored the thread.

WesselKroos commented 1 month ago

You're welcome, always happy to help out. And thanks for the screenrecording. It looks a less blue than I expected. It's looks more like a shade of blue.

Should i send an email to the support of the arc team?

Not yet, it could be a Chromium bug. So let's figure that out first.


Also i couldnt figure out how to change my ANGLE renderer.

Go to chrome://flags/#use-angle, select an option. Then don't click on the "Relaunch" button at the bottom right, because the Arc browser freezes when I do that, but instead restart the browser yourself: image Vulcan is in a separate flag: chrome://flags/#enable-vulkan


I also noticed that the YouTube video you had reported is encoded in the the av01 codec. YouTube encodes videos with the vp09 codec or av01 codec. That might explain why you only see this on some videos. You can view the codec YouTube uses by right clicking on the video and selecting "Stats for nerds". Then you can see the codec in the overlay: image


Here are some follow up questions:

  1. To what value is the dropdown of chrome://flags/#use-angle set to?
  2. To what value is the dropdown of chrome://flags/#enable-vulkan set to?
  3. Let's validate for sure that you are using Vulkan. Because I get a lots of flickering bugs when I enable Vulcan on my pc, but I'm using a NVidia GPU instead. Could you go to chrome://gpu/ and share the text in the first section called "Graphics Feature Status"?
  4. Could you validate that this bug only happens for YouTube videos with the av01 codec and not for videos with the vp09 codec? (Find a video that does not become blue while scrolling and use the instructions above to check the codec.)
  5. Could you validate that this bug does not happen in another Chromium browser? (You can test a few Chromium browsers: Chrome, Edge, Opera, Vivaldi, DuckDuckGo, etc...)
WesselKroos commented 3 weeks ago

I'll close this issue for now due to no response. @0x2bilal Let me know if this issue is still relevant.

0x2bilal commented 3 weeks ago

Hi, Didnt you get my response from 17th july?

Greetings


Von: Wessel Kroos @.> Gesendet: Friday, August 2, 2024 7:12:09 PM An: WesselKroos/youtube-ambilight @.> Cc: Bilal Talleb @.>; Mention @.> Betreff: Re: [WesselKroos/youtube-ambilight] inverted colors on specific youtube videos (Issue #252)

I'll close this issue for now due to no response. @0x2bilalhttps://github.com/0x2bilal Let me know if this issue is still relevant.

— Reply to this email directly, view it on GitHubhttps://github.com/WesselKroos/youtube-ambilight/issues/252#issuecomment-2265819272, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A7ACJ2O5KRXLBHWTSK7OTDTZPO4WTAVCNFSM6AAAAABKVYEQ4WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRVHAYTSMRXGI. You are receiving this because you were mentioned.Message ID: @.***>

0x2bilal commented 3 weeks ago

Here my mail from 17th july:

Hey!

Soo, i have changed the ANGLE graphics Backend to OpenGL and apparently the bug is gone. Vulcan is set on default. (this video was also flickering blue and the codec was also av01 but idk if its really the same codec https://www.youtube.com/watch?v=PK4okHerWeI ) (this video has exactly the same codec and also the colour changes but not so extreme, more like skin colour getting a bit more pale and then back again https://www.youtube.com/watch?v=D2jJzJkFZS4 )

1. it was on default 2. it was also set on default 3. Graphics Feature Status

   I have attached 2 screenrecordings of the videos just getting pale

      Should i stay now on openGL?

Greetings


Von: Wessel Kroos @.> Gesendet: Friday, August 2, 2024 7:12:09 PM An: WesselKroos/youtube-ambilight @.> Cc: Bilal Talleb @.>; Mention @.> Betreff: Re: [WesselKroos/youtube-ambilight] inverted colors on specific youtube videos (Issue #252)

I'll close this issue for now due to no response. @0x2bilalhttps://github.com/0x2bilal Let me know if this issue is still relevant.

— Reply to this email directly, view it on GitHubhttps://github.com/WesselKroos/youtube-ambilight/issues/252#issuecomment-2265819272, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A7ACJ2O5KRXLBHWTSK7OTDTZPO4WTAVCNFSM6AAAAABKVYEQ4WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRVHAYTSMRXGI. You are receiving this because you were mentioned.Message ID: @.***>

WesselKroos commented 3 weeks ago

Strange, I do not see a message from 17 July in this GitHub issue. Maybe GitHub had a hiccup?

Thanks for the info. Then we can conclude that:

With this info, I suspect that the color shift happens when the video is not in a direct video overlay (MPO). If my hypotheses is correct you should be able to force the color shift, even when you do not scroll down via these steps:

  1. Make sure that you have updated the extension to version 2.38.10
  2. Enable the advanced settings
  3. Enable the "Video artifact workaround" setting (it's under the "Video" section) image
  4. You should see the incorrect colors right away

If that's correct you can report this bug to the Chromium browser developers:

  1. Go to https://issues.chromium.org/issues/wizard
  2. Sign in with a Google account
  3. Follow the steps in the Wizzard to create a new issue
WesselKroos commented 3 weeks ago

PS: Another thing you can try is to force the color profile in the browser to sRGB chrome://flags/#force-color-profile and relaunch the browser.

WesselKroos commented 2 weeks ago

I can now also reproduce the faded colors in the video when you scroll the page on Chrome. This also happens with the ambient light turned off. The only thing required was a Display P3 color profile for your monitor or force Chrome to the Display P3 color profile via chrome://flags/#force-color-profile .

So I think this is a Chromium bug since version 120.0.6092.0 (it's from about 10 months ago), but I never saw it because I had always forced Chrome to the SRGB color profile.

I've reported the bug to the Chromium developers: https://issues.chromium.org/issues/358587920

https://github.com/user-attachments/assets/bf44fc44-7133-42f4-8422-f343e2cea408