Solved Messy HDR implementation
#1
Kodi has some issues with HDR in Windows.  This has been an issue for years.  HDR enabled in Windows or not, Kodi has a mind of it's own.  If HDR is enabled in Kodi and I begin HDR content, it switches to HDR.  If I begin SDR content, Kodi switches to SDR.  This in itself isn't a problem, I love that feature.  The problem is Kodi leaves the display in SDR when I close it.  Or Kodi leaves the display in HDR when I close it.  It's super annoying.  I propose Kodi detect the current mode at startup and exit in the same mode if found it.  It's like entering a room, making a mess and cleaning up after.  Kodi is messy in this regard and leaves the room a mess
Reply
#2
Unrelated note, can you tell me which kodi for windows is working with HDR? The latest official 19.3 Matrix? Or the windows UWP /Exe by thexai. I currently don't have an HDR Tv so I can't test yet so I sideload ALL of em like crazy cavemen. If you're up to some testing i would be very happy ☺️

Addressing your issue, how about you also sideload Kodi 18 for handling SDR and use these experimental Kodi Matrix-es for HDR. It's really easy first rename your Kodi Matrix to KodiMain, then install Kodi 18. After that move the Kodi to another folder like Userprofile/Favorites/Kodi, create a shortcut and add -p flag
Reply
#3
Both the store version 19.3 and the installer version 19.3 both appear to act exactly the same for me on Windows 10 or Windows 11.  They both support HDR reasonably well other than the obvious lack of 12-bit Dolby Vision but that's more related to ffmpeg not having a license to decode it.  I don't really pay much attention to other Kodi forks except KDMC which does support DV but that's not really Kodi supporting DV, it's the Zidoo external media player and I doubt that wonderful device pays any royalties whatsoever lol.
Reply
#4
(2022-02-10, 10:03)MuonGold Wrote: Both the store version 19.3 and the installer version 19.3 both appear to act exactly the same for me on Windows 10 or Windows 11.  They both support HDR reasonably well other than the obvious lack of 12-bit Dolby Vision but that's more related to ffmpeg not having a license to decode it.  I don't really pay much attention to other Kodi forks except KDMC which does support DV but that's not really Kodi supporting DV, it's the Zidoo external media player and I doubt that wonderful device pays any royalties whatsoever lol.

Thank you for your clarification!I can sleep well, for now...until OCD triggered again hahah. Anyways, iirc the only way to get DV playback in Windows is to install Dolby Vision Extension (UWP) and native windows player (Movies and TV). Windows 11 OS might also help I think because I heard it got better at handling HDR.
Reply
#5
Official Kodi builds have always switched HDR and SDR modes on and off appropriately for me.  Maybe it's your device, how you've set it up, and/or how you use it causing you problems all these years.
HOW TO - Kodi 2D - 3D - UHD (4k) HDR Guide Internal & External Players iso menus
DIY HOME THEATER WIND EFFECT

W11 Pro 24H2 MPC-BE\HC madVR KODI 22 GTX960-4GB/RGB 4:4:4/Desktop 60Hz 8bit Video Matched Refresh rates 23,24,50,60Hz 8/10/12bit/Samsung 82" Q90R Denon S720W
Reply
#6
It's not that Kodi isn't switching HDR on and off that is the issue.  It's more that Kodi is ignoring the mode the device is in when Kodi starts.  Kodi leaves the device in whatever mode it last switched to.  Like if I play SDR content and close Kodi, it leaves my LG C1 in SDR mode.  If I start HDR content and close Kodi, it leaves the device in HDR mode.  Kodi has done this for years.  That part works great.  I suspect Kodi just doesn't have a feature to cleanup the mode and set it to what it was when it's closed.  I'd prefer if Kodi would cleanup after itself and restore the original mode when it's closed.
Reply
#7
I don't know what your device is but mine is a Windows 11 PC as you see in my sig. 

A PC is always in SDR mode and so should be any other device.  Windows HDR is off.  Same with GPU API HDR.  The HDR mode is off.  When HDR video is started, whatever software player you are using switches the display into its HDR mode.  When I use the Kodi internal VideoPlayer, the coded software decides if the video is SDR or HDR and either remains in SDR for SDR video or switches the display to HDR for HDR video using the Windows HDR API.  When I use an external player, the rendering software (madVR/LAV Filters) detects the type of mode and switches the display accordingly except it uses the GPU API.  There is no difference.  All that's happening is 2 ways to tell your display to switch modes.  When HDR playback is finished, that same software switches HDR mode off at the display and the device (PC in my case) is returned to SDR mode as it should be.  Nothing prevents mode switching, forgets to mode switch, or any other anomaly pre or post video playback. 

I use a Samsung 82Q90R but any and all 4k displays are controlled and will react the same.  This is why I'm replying to you.  You have a unique problem unique to yourself.  To imply that something isn't doing this or that properly and needs fixing simply isn't relevant to everyone else.  You'll need to diagnose your unique problem and that begins with making sure all your equipment chain is up to par.  Next your equipment settings.  Next is all your software chain up to par along with their settings.  Etc., etc.  Lastly, is something in your chain broken?  Do not confuse 'broken' with 'incapable'.  Start with the most basic of setups, confirm it's working, advance from there testing along the way until your culprit is revealed.  I can confirm for you, a simple official Kodi install will and does playback HDR perfectly.  When that HDR video is finished, the display will always be returned to SDR mode at the display.  The only time SDR mode is not returned at the display is if Kodi is crashed, shut down improperly, etc. and was not given the time to accomplish the task.
HOW TO - Kodi 2D - 3D - UHD (4k) HDR Guide Internal & External Players iso menus
DIY HOME THEATER WIND EFFECT

W11 Pro 24H2 MPC-BE\HC madVR KODI 22 GTX960-4GB/RGB 4:4:4/Desktop 60Hz 8bit Video Matched Refresh rates 23,24,50,60Hz 8/10/12bit/Samsung 82" Q90R Denon S720W
Reply
#8
(2022-02-11, 21:45)brazen1 Wrote: The only time SDR mode is not returned at the display is if Kodi is crashed, shut down improperly, etc. and was not given the time to accomplish the task.

I do appreciate the information but this is not entirely true or my issue with Kodi is not being understood.  To demonstrate, flip your Windows 10 or Windows 11 display setting to enable HDR.  When I do this, my LG C1 displays the HDR icon so I know HDR is enabled.  Then open Kodi, no change occurs here, Kodi simply opens.  I verify my display is still in HDR because I can see the brightness and color settings are still HDR.  Then play SDR content, Kodi switches the display to SDR.  I know this occurred because my LG C1 settings brightness settings are now for SDR content.  Now close Kodi and your display will be in SDR and you'll need to open the Windows display settings to re-enable HDR.  Kodi is not returning the display to HDR as I believe it should.  Instead, Kodi is leaving the display in SDR mode, forcing me to open the Windows display settings to re-enable HDR.  This is messy.  Kodi is not returning the display to the way it found it.

A quick edit to this, Kodi almost "ALWAYS" leaves the display in SDR after playing any content, HDR or SDR.  If I play HDR content after SDR content, Kodi switches to HDR and plays the content correctly.  If I close Kodi, the display is returned to SDR.  Again, messy and Kodi is not returning the display to the way it found it.

Another test, If I set my display to HDR, open Kodi, play HDR content, then close Kodi, my display is left in SDR.  Again, very messy.

The one and only way I've found where Kodi does not mess with my settings is when I open Kodi and do not play any content and close Kodi, my display is left in HDR.  This is the way it's supposed to work
Reply
#9
Why do you enable HDR in Windows before opening Kodi? Doing that will mean the colours will not be right for the desktop as for the majority of apps that can't play HDR video or edit HDR video the colours will not be right as they need the SDR colourspace. The recommendation is to leave the Windows setting off and let Kodi handle the switching, although I'm not sure if that is essential for proper operation.

I don't have any HDR displays so this is not something I can personally test.
Reply
#10
Mainly Because because modern media apps and games like Netflix and Cyberpunk won't do Dolby Vision or HDR respectively unless HDR is enabled before opening them.  That's kind of the major gripe and issue I'm having with Kodi.  I'm constantly having to re-enable HDR because Kodi's implementation is messy
Reply
#11
Basically you have a issue with "other" apps because "these" apps doesn't support auto toggle Windows HDR ON/OFF.

You should be complaining to "Cyberpunk" since you have a problem with these app (not Kodi).

The main issue is "Cyberpunk don't do HDR unless is enabled before".

If HDR is disabled and is played HDR content Kodi toggles HDR ON -------> OK
If HDR is enabled and is played SDR content Kodi toggles HDR OFF -------> OK
If HDR is enabled and is displayed Kodi GUI, toggles HDR OFF (because Kodi GUI is SDR) -------> OK

If you opens "Cyberpunk" and HDR is OFF, it does not turn ON ------> NG

https://www.gog.com/forum/cyberpunk_2077..._hdr/post5
https://www.gog.com/forum/cyberpunk_2077..._is_broken
Reply
#12
(2022-02-13, 23:02)jogal Wrote: If HDR is disabled and is played HDR content Kodi toggles HDR ON -------> OK
If HDR is enabled and is played SDR content Kodi toggles HDR OFF -------> OK
If HDR is enabled and is displayed Kodi GUI, toggles HDR OFF (because Kodi GUI is SDR) -------> OK
This is not correct and is also missing an important scenario.  Below is actually correct:
HDR disabled and HDR content played, Kodi plays HDR and exits with HDR disabled - OK
HDR enabled and played SDR - Kodi exists with SDR - NOT OK
HDR enabled and played HDR - Kodi exits with SDR - NOT OK
HDR enabled and Kodi GUI only - DOES NOT TOGGLE HDR OFF, DISPLAY REMAINS IN HDR (because Kodi GUI looks funky) - OK
Reply
#13
(2022-02-13, 23:02)jogal Wrote: Basically you have a issue with "other" apps because "these" apps doesn't support auto toggle Windows HDR ON/OFF.

Not exactly, none of those other apps switch my display mode, only Kodi is switching HDR off and leaving it off if any content is played.  Kodi is the minority in this respect, hence the reason I propose Kodi cleanup after itself and exit with HDR on or off depending on the mode it found when it opens.
Reply
#14
The only reason Windows provides a setting to turn HDR on/off is for ignorant programs that are incapable of using the API to do it automatically.  This on/off switch provides a means for users to force toggle HDR manually to engage HDR when needed and manually disengage HDR when not.  Thankfully Kodi is smart and controls Windows HDR on/off mode perfectly.

You suggest that Kodi is broken because it automatically engages HDR only when HDR video is played and disengages HDR mode when HDR video is finished?  You want Kodi to remain in HDR mode because 'other' programs you use are incapable of switching HDR and it's too much of a hassle for you to manually engage the Windows setting switch for them?  Your entire thread is becoming laughable imo.

I suggest you contact your other programs and inform them that Kodi handles HDR switching automatically and perfectly and inquire why their programs don't.  Be sure to tell them how cumbersome it is for you to be required to use the Windows 'dummy' HDR switch to do the job their programs can't.  Also remind them how goofy interacting with Windows looks when you simply leave HDR engaged constantly so it's ready to use their ignorant program.
HOW TO - Kodi 2D - 3D - UHD (4k) HDR Guide Internal & External Players iso menus
DIY HOME THEATER WIND EFFECT

W11 Pro 24H2 MPC-BE\HC madVR KODI 22 GTX960-4GB/RGB 4:4:4/Desktop 60Hz 8bit Video Matched Refresh rates 23,24,50,60Hz 8/10/12bit/Samsung 82" Q90R Denon S720W
Reply
#15
i have to chime in and say your other programs are the issue "lazy developers" I would never want to run my TV in HDR mode all the time the extra energy use would be such a waste, and windows and almost every other app doesn't support it, why would I want the kodi GUI in HDR what benefit would that provide me? only one I can think of is I don't have to wait for HDR to engage but then when i watch SDR content the wait would be there still and currently more SDR content than HDR

another prime example is disney+ and netflix apps on xbox don't auto switch to 24P when the api is there to allow it, why? lazy developers or developers who don't understand it's importance

you have come to the wrong forum to complain about one the best additions to kodi for many years(my humble opinion)
Reply

Logout Mark Read Team Forum Stats Members Help
Messy HDR implementation0