-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
[Feature Request] Support HDR for Windows and MacOS #393
Comments
HDR is currently only supported and tested on SteamOS (and maybe with some hackery, other Linux systems). There's nothing that prevents Windows or MacOS support, is just that nobody has yet done the work required to get it running. |
Makes sense. A documentation opportunity also exists for things like this. The github.io doc site could benefit from a having a features page with a table indicating what chiaki-ng's features are, and which platforms each is supported on. The fork has been built up so much at this point (hooray!) that the advantages and use cases can be confusing for new users. If there is appetite for this doc I could put something together and PR. |
@cgarst theoretically libplacebo supports HDR on Windows as mpv has hdr in Windows using libplacebo. However, it was just never tested on our end and there is likely some configuration that needs to be done, etc. to get it working. I'll try with my Windows PC connected to an HDR monitor and get back to you. As for the other features, they should pretty much all be cross-platform. |
For MacOS it correctly works but it crashes when the application is closed when HDR is selected. Tested on m1 MacBook Pro with internal hdr screen |
@nowrep i noticed it crashes even when not connected to an hdr monitor if H265 HDR is selected as the codec and streaming begins. Once you quit the stream and try to close the app the app crashes. Could you look at this since I remember you had a Mac system? |
I don't have a mac to easily test this, sorry. I suggest posting here the crash log from macos. And maybe also using debug build. |
@nowrep here is the bt from the crash when using HDR. I also attached the log from the crash using H265 HDR as the codec crash-h265-hdr.log as well as a log from a non-crash close using H265 as the codec non-crash-h265-sdr.log
also here is a bt of all threads
|
Testing on windows 11 22H2 HDR works with amd radeon 23.19.12-240220a-403852C-AMD-Software-Adrenaline-Adition and windows driver 31.0.21912.14. Also I used d3d11va for hw decoder bc my computer doesn’t support Vulkan. @cgarst just confirming you enabled hdr for your hdr compatible monitor in windows settings and have downloaded the latest amd drivers via https://www.amd.com/en/support/download/drivers.html? You can update the driver via the app on that page once installed. |
@streetpea Good news - my HDR is working as well now when I select d3d11va decoder. The "auto" decoder option uses Vulkan which causes a black screen on here. I thought I tried d3d11va before but maybe there was some other issue going on during that test. My driver is the latest version vetted by Asus for this laptop listed as "31.0.22060.5000 (Adrenalin 23.20.60.05) DCH / Win11 64". Thanks for looking into this! |
@cgarst @nowrep vulkan hw decode w/ HDR not working appears to be an issue with libplacebo, see: haasn/libplacebo#272 and HDR rendering using vulkan and the amd driver on Windows. Ideally this would work as vulkan is better than d3d11va on Windows because it has zero-copy. |
@cgarst just to confirm Vulkan works you if you don't select hdr 265 as the codec (I.e., you use h265 instead)? |
@streetpea Yes, can confirm selecting H265 (not HDR) with Vulkan works. |
@nowrep @cgarst I opened an issue for libplacebo for problems with windows vulkan hw decoder w/ HDR here: haasn/libplacebo#287 |
On my end, while the stream does work on d3d11va, it results in a washed out HDR image. I'm experiencing this issue on Windows 11 24H2 (build 10.0.26100.1591.ge_release_svc_prod3.240820-2119), with an NVIDIA RTX 3070 running on the latest driver (560.94) |
@MapleHinata are you sure you are activating hdr in the associated game? Please go to the menu of the game and confirm hdr options are toggleable. Many times this requires the hdr monitor/tv connected to the ps5 to be on (there must be an hdr monitor/tv connected to the ps5 to enable hdr images to be sent to chiaki-ng bc that is how the ps5 knows to create hdr frames). Otherwise it is likely that you are streaming sdr content to the hdr colorspace (i.e., pc has hdr activated but ps5 isn’t generating hdr images). |
@streetpea Yes, I'm certain HDR is enabled, it works under the official Remote Play Client, on my Steam Deck OLED with Chiaki, and, while I can't go to the PS5 Settings menu under Chiaki, games show up HDR calibration options. chiaki-ng 2024-09-06 1_24_33 PM.zip Here's captures of Honkai: Star Rail, showing off the HDR calibration options |
Ok, i figured out the problem, apologies, i sent an older log by accident. Pay attention here: If i use a tool to force Chiaki to output with a 16-bit swapchain, it renders correctly. |
I'm also attaching below a DebugView of Chiaki This seems to be a libplacebo bug? Why is preferring HDR10 (VK_FORMAT_A2B10G10R10_UNORM_PACK32 + VK_COLOR_SPACE_HDR10_ST2084_EXT) over scRGB (VK_FORMAT_R16G16B16A16_SFLOAT VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT), which is the format Windows uses for HDR natively, especially when it's decoding video with VK_FORMAT_R16G16B16A16_SFLOAT anyway... |
@MapleHinata i don’t believe scrgb is supported by libplacebo for Vulkan. See https://github.com/haasn/libplacebo/blob/efb89342b0c19b9773226624651839686172e88b/src/vulkan/swapchain.c#L93 Meaning VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT is skipped here https://github.com/haasn/libplacebo/blob/efb89342b0c19b9773226624651839686172e88b/src/vulkan/swapchain.c#L163 and a relevant comment here haasn/libplacebo#11 (comment) @MapleHinata You could make an issue to support scrgb with libplacebo if you would like. |
@MapleHinata not sure what you mean by decoding in 16bit the decoder format is 10 bit P010LE see chiaki-ng/lib/src/ffmpegdecoder.c Line 212 in a9781cf
|
I had just this issue and can confirm the monitor/TV is indeed off and theres no HDR in the game. is it not possible to force PS5 to stream HDR even with the Display Device for the PS5 is off? I am under the impression that its not, since Remote play is not designed with HDR in mind (PS Portal doesnt have HDR). But if there's a workaround i'd love to know about it. |
@lyndonguitar remote play was built with hdr in mind (for ps5) and hdr is explicitly supported via remote play. It’s just that remote play can only stream what the console is giving it and the ps5 itself only knows to use hdr when the given tv tells it that it can (it’s supported). Otherwise, it would be displaying an unsupported format to the tv and would look washed out (because no tone mapping is taking place). PCs do the same thing. It’s just that with a pc you can install a dummy sw that emulates the hdr signal (in essence explicitly overriding the built in protection yourself so that you can force the system to do what you want with the knowledge that you don’t care if the stream to the pc screen itself looks like crap bc you’re remote playing) but you can’t install that on ps5 bc it’s a closed system. Potentially, Sony could add in the ps5 fw that if hdr is enabled via remote play force hdr on and display that content (prioritizing it over the display on the tv which may not even be in use) but they haven’t done that for the ps5 (at least not in the games I tested) @lyndonguitar as for your question of streaming remotely using hdr when the tv is off it depends on the tv. Ultimately, the answer is that if the tv sends the message that it’s hdr compatible while off (or rest mode) then the ps5 will stream hdr when the tv is off. Otherwise it won’t. Some tvs do, others don’t. For example, from user feedback the lg oled tvs before c2 (prior to 2022 model) don’t send the signal when off, but lg oled tvs starting with c2 (2022 model on) do send the signal when off. As for the portal they probably wanted to keep costs down as much as possible and an lcd screen is cheaper than an hdr oled one. |
I am having an issue with my M3 MacBook Pro. When I select HDR it does not engage HDR on my built in display, causing a washed-out image. When viewing HDR in other apps like photos it properly makes the display brighter |
@kalafalas can you post the log output with verbose logging enabled? Also what are your stream settings (stream tab in settings) for your PS5 (hdr isn’t supported for ps4) |
@kalafalas in your logs it says it is using hdr
|
Yeah it seems like it's sending the HDR stream which is why it's washed out, but macOS is still displaying the app in SDR, washing everything out instead of increasing the brightness |
@kalafalas that log is for the display not for the stream from the PlayStation. You can tell the stream itself is using HDR from this log:
Specifically the end that says dynamic range: hdr |
Then why doesn't it work? |
@kalafalas when I tested on my M1 Mac it seemed to work but crashed on closing the app as mentioned above. Are you playing an HDR game and is your connected hdr tv on (some tvs work without it on but for testing turning it on eliminates that being the issue. That is required for an hdr signal to actually be sent from the PlayStation since this only happens if a connected tv sends a signal to the PlayStation telling it that hdr is supported. Otherwise, it will be enabled in settings but won’t actually send an hdr signal. If it still doesn’t work in that case I guess you could mess with your display settings and see if setting it to hdr10 helps at all. |
Yes, I'm playing an hdr game with an hdr tv connected and hdr is displaying properly when I remote in via iOS. Ok I just tried something new. I went into the video custom render settings > color and set brightness to 0.05 and contrast to 1.2 and it seems to be displaying how I expect now, maybe a bit flatter than it's supposed to be. Not sure why |
@kalafalas were you using custom renderer settings before? |
Nope |
It sounds like what you’re doing is toning down the brightness so it’s within the sdr range. |
These custom settings result in a much brighter presentation than the surrounding SDR interface shrug |
What you’re describing sounds like it’s using hdr when the screen doesn’t support it (at least not at the brightness level it’s using). In other words, it’s outputting a brightness the screen can’t fulfill making everything washed out. If you were using an sdr colorspace it would tonemap fixing this. Can you check your display settings for the display? It sounds like maybe it is outputting hdr but it’s not properly configured so it’s setting a nits level beyond what the display supports. So when you turn down the brightness, it’s finally hitting the nits range of the display and so is no longer washed out. |
Other hdr apps on my Mac do not have this issue, like photos or QuickTime. |
@kalafalas I just retested and it works fine on my M1 MacBook Pro running MacOS Sonoma. It’s not washed out. |
@kalafalas do you have optimize video streaming while on battery turned on by chance? |
@kalafalas also do you have your ps5 set to output hdr at 1600 nits (you can change this by configuring hdr in the ps5 settings) |
@kalafalas please try HDR video (P3-ST 2084 as the preset) since I don’t think it’s xdr capable (just hdr capable). When I switched from hdr to xdr it got washed out as you described. |
@kalafalas also HDR no longer causes a crash at exit on MacOS with this build [Note: You need to be signed in to GitHub to download] |
Describe the bug
When switching to "H265 HDR (PS5 only)" on a Windows machine with HDR display, the stream opens with a black display. Uncertain from documentation is HDR is intended for Windows or only Steam Deck.
Debug Log
chiaki_session_2024-08-19_02-20-49-553553 - Copy.log
To Reproduce
Steps to reproduce the behavior:
Expected behavior
An HDR stream appears similarly to the official remote play app
Screenshots
#000000
Desktop (please complete the following information):
Additional context
HDR is working in official remote play app on same device.
The text was updated successfully, but these errors were encountered: