Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Washed out colors when streaming HDR #412

Closed
Topuz opened this issue Apr 16, 2024 · 25 comments · Fixed by #419
Closed

Washed out colors when streaming HDR #412

Topuz opened this issue Apr 16, 2024 · 25 comments · Fixed by #419
Labels
bug Something isn't working video Issues related to video decoder

Comments

@Topuz
Copy link

Topuz commented Apr 16, 2024

Moonlight Version

1.6.13

Device Type

webOS TV

Device Model

LG C2

Device OS

13.30.56

Host OS

Windows

Host Software

Sunshine

Host Setup

Host: Intel Core i5 13600K, nVidia RTX 3080, 32GB RAM, Windows 11 Pro 23H2.
Displays: Dell S3220DGF on host, LG C2 client.

Bug Description

When streaming HDR the colors are very washed out.

The HDR itself is turning on on the TV just fine, I get the notification in the corner and the larger dynamic range is visible, but the colors are off, especially the yellows and greens.

It's visible everywhere: on the desktop, in HDR YouTube videos, in games... I've tried various combinations of settings but the issue persists. It's especially visible in the yellows and greens, they're very muted, skin tones end up looking green-ish, reds look orange. It's also washed out compared to how the content actually looks on the host display while streaming, even though the host display is a much worse display than client.

When I stream HDR to my phone (Pixel 7 Pro) from the same host, this issue doesn't exist. I've even tried physically attaching the host PC to my TV via HDMI, and the issue does not exist either, it's only when streaming through Sunshine/Moonlight.
Update: I've just checked, the issue doesn't exist when streaming to HDR iPad, so it's only WebOS that's giving me issues.

I'm attaching example photos as well, but they're not 100% representative since the phone camera seems to be boosting saturation.

HDR On:
PXL_20240416_123300012

HDR Off:
PXL_20240416_123315166

HDR On:
PXL_20240416_123414682 MP

HDR Off:
PXL_20240416_123514901 MP

Reproduction Steps

  1. Turn on HDR in Windows on host
  2. Turn on HDR on LG WebOS client
  3. Start stream
  4. The colors are washed out compared to host

Expected Behavior

Colors should be accurate and match the host.

@Topuz Topuz added the bug Something isn't working label Apr 16, 2024
@mariotaku
Copy link
Owner

Might be related to #405

@Topuz
Copy link
Author

Topuz commented Apr 17, 2024

Still broken with the latest artifact build. Let me know if I can somehow help with testing.

@mariotaku
Copy link
Owner

I tried on multiple HDR-enabled displays but still can't replicate what you saw. Maybe it's because my TV doesn't have too good brightness.

Could you take some photos to show how it should be instead?

@Topuz
Copy link
Author

Topuz commented Apr 19, 2024

Ok, so I've done a bit more testing and it's definitely happening only when streaming to my LG C2. I even tried streaming from a different host PC to rule out that as a cause, but it's still happening.

Here's couple of photos that show the difference (hopefully). I've double checked that all HDR settings are identical, the only difference between the photos is that one is shot when connected directly via HDMI and the other one is streamed. The photos were taken on the fully reset Filmmaker mode.

Again, keep in mind that these photos are taken with a phone camera so the saturation is boosted a bit in both cases and that the difference when looking with my own eyes is even more noticeable.

HDR desktop via HDMI:
PXL_20240419_090639340~2

HDR desktop when streaming:
PXL_20240419_085549061~2

HDR content via HDMI:
PXL_20240419_091132237 MP

HDR content when streaming:
PXL_20240419_091232695 MP

@mariotaku
Copy link
Owner

Are you able to select picture mode when you connect HDMI, and when you stream via Moonlight?

It's possible that when you stream via Moonlight, video post processing has been turned off.

@Topuz
Copy link
Author

Topuz commented Apr 19, 2024

Yes, I can select picture mode in both cases, but they don't match. Whichever picture mode I choose the stream looks washed out compared to direct connection.

@mariotaku mariotaku added the video Issues related to video decoder label Apr 19, 2024
@mariotaku
Copy link
Owner

OK, I can notice some differences. When HDR is on, colors are less saturated compared to SDR or host display. I'm not sure why, but I'll try to tweak some settings to compare.

@Topuz
Copy link
Author

Topuz commented Apr 19, 2024

I think i narrowed down the issue, hopefully it will be helpful to you.

There's a secret HDMI Signaling Override menu on LG OLEDs that you can access by pressing 1113111 where you can adjust various things that are usually not available, including color spaces, but it only works for actual HDMI inputs. Since it only applies to actual HDMI inputs, this menu doesn't do anything while streaming since it's not an actual HDMI input.

Here's where the interesting part comes in: if I connect my Android box (which I don't generally use) via HDMI and open YouTube I can play with this menu since it's an actual HDMI input. When I select BT709 color space here the colors look washed out in exactly the same way as they look when streaming HDR via Sunshine/Moonlight. When I put the setting back to auto, it looks normal again.

Therefore, I'm quite sure it's a color space issue where the TV forces an incorrect color space when streaming HDR, but unfortunately I can't do anything to fix it on my end since this menu only affects actual HDMI signals.

Here are the examples, the change is very obvious and matches the original issue exactly:

Forced BT709 matches the HDR stream look (washed out):
PXL_20240419_153542927

Auto looks normal:
PXL_20240419_153557510

@mariotaku
Copy link
Owner

Thank you so much for exploring that. Are there more options other than BT709? The current version of moonlight uses BT709 as color space and I'm trying to support BT2020 as well. But I didn't see the difference on my TV.

If you're interested, the latest snapshot contains this change. #416

@Topuz
Copy link
Author

Topuz commented Apr 19, 2024

Yeah, there's BT709, BT601, REC2020 and DCI P3 as available options.
I'll try the snapshot as soon as possible and get back to you.

@Topuz
Copy link
Author

Topuz commented Apr 19, 2024

Just tested with the latest snapshot, unfortunately everything is still looking washed out.

@chocomega
Copy link
Contributor

I've noticed the same behavior on my TV (LG C1) and the latest snapshot does not seem to change how it looks as well.
According to Sunshine's log, the color space should be indeed Rec. 2020:

[2024:04:20:15:21:51]: Info: 
Colorspace         : DXGI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020
Bits Per Color     : 10
Red Primary        : [0.685547,0.303711]
Green Primary      : [0.251953,0.65332]
Blue Primary       : [0.148438,0.0644531]
White Point        : [0.313477,0.329102]
Min Luminance      : 0.1416 nits
Max Luminance      : 417.712 nits
Max Full Luminance : 417.712 nits
[2024:04:20:15:21:51]: Info: Capture format [DXGI_FORMAT_R16G16B16A16_FLOAT]
[2024:04:20:15:21:51]: Info: HDR color coding [Rec. 2020 + SMPTE 2084 PQ]
[2024:04:20:15:21:51]: Info: Color depth: 10-bit
[2024:04:20:15:21:51]: Info: Color range: [MPEG]
[2024:04:20:15:21:51]: Info: NvEnc: created encoder P1 10-bit two-pass

@Topuz in my experience, one way to mitigate the issue is to set the Color Gamut setting to Native instead of Auto.

@Topuz
Copy link
Author

Topuz commented Apr 20, 2024

Good to hear I'm not the only one with the issue.
Your solution though will just mask the real problem and not really solve it. It will look a bit better, but the colors will still be inaccurate. We could also apply a Vivid color profile or boost the Color Depth setting, but those would also just mask the real problem, like putting on a deodorant instead of taking a shower. :)

@chocomega
Copy link
Contributor

chocomega commented Apr 20, 2024

I do agree, it is not a solution and the TV should pick the correct color gamut based on incoming signal but in the meantime that mitigation works for my eyes. Just wanted to share it if others find it useful.

@FallingSnow
Copy link

I have a LG C3, enabled HDR by modifying the Nvidia Virtual Display EDID, and my HDR looks perfectly fine.

If you need me to test anything let me know.

@robsonbn
Copy link

I am also experiencing this. Only happens on HDR.

@chocomega
Copy link
Contributor

@mariotaku I've tried to mimic what xbmc is doing here by adding VUI data when setting HDR Info (see here for the test with hardcoded values) and it seems to work correctly but it is only for SMP.
Do you know how to achieve the same functionality with NDL (which has lower latency than SMP) ?

@mariotaku
Copy link
Owner

@chocomega After some quick researches, I have added a few fields in NDL_DIRECTVIDEO_HDR_INFO_T and it worked right away! No washed out colors anymore!

I really want to give you the credit for finding this. So I left SMP module untouched to let you finish that part, if you're interested.

@chocomega
Copy link
Contributor

@mariotaku please go ahead with the SMP module. I don't have a proper dev environment and relied on GitHub action to compile my test haha 😅. So you will certainly do it faster than me !

@mariotaku
Copy link
Owner

@chocomega Thanks again for the discovery! I'll make a new release to reflect your changes.

@drsno
Copy link

drsno commented Apr 24, 2024

On my LG C1, HDR now looks totally off. Especially the red is extremely saturated. Yellow is also displayed as that saturated red. In the LG display mode, it says HDR Select (Game Optimiser). Changing to another setting like HDR Select (Standard) does not change the redness. HDR was fine with the previous release.

@robsonbn
Copy link

It works like a charm now! The colors are so much better now, congrats guys!

@mariotaku
Copy link
Owner

@drsno Please create a new issue and provide more info like your host setup. Let's discuss over there.

@FallingSnow
Copy link

I also switched to 1.6.16 momentarily and the HDR seemed extremely saturated. I wonder if me and @drsno enabled HDR on our monitors similarly. Which is why it's working for some and worse for others.

@mariotaku
Copy link
Owner

@FallingSnow Please open another issue and let's move on to that issue for further discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working video Issues related to video decoder
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants