-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
|
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: