(2019-07-16, 01:59)brazen1 Wrote: [ -> ]I understand about the two different scripts. It's your instructions that are unclear. There is more input needed when using Kodi Callback such as the location of the script it's supposed to handle. Not just what you have instructed in your post for testers. In Callback, you must navigate to where you have the script located and save that input. 'Script executable file - browse'. You should add that to your instructions since not all of us are savvy especially me. There's actually two entries for that info which I found odd unless running more than one script at a time perhaps. At this point, I assume that has to be done too. Still it doesn't work for me.
I can't specify exactly where the scripts can be because each person can save it anywhere he/she wants. The location is not important for this to work. But I get what you are saying.
I also noticed the two entries and I don't get it either.
(2019-07-16, 01:59)brazen1 Wrote: [ -> ]Anyway, that said, I grabbed the dll's. Still does not function. However, I can manually execute either the .bat or the .vbs which in turn calls switcher.exe with no errors now since I have the dll's. Switcher then does indeed engage Windows HDR. Best of all, at display level. The problem is, Kodi Callback is not doing anything at the start of an HDR title or any other title even though it is pointed to the script and is set with the parameters you provided. Something is not correct here? Having never used it before, I'm unfamiliar but looking it over, it's pretty straight forward. The dependencies were installed along with it but perhaps other KODI settings prevent it from working? Most likely it my user error though. What that is... I've no idea? I've tried fullscreen and windowed. Gave up after that having bigger problems I'll explain below.
yes, the switcher do work, this was the reason why I started this whole quest to learn C so I could implement the switcher in Kodi.
The swither code compiles with Visual Basic 2017 just like Kodi. My fixed version for VB 2019 is not even needed for this.
As I've said, I don't know if this Kodi CallBack would work, I don't have access to a 4k HDR tv here, this is just an idea of how this could work.
I have a 1080p tv here and I can see the screen flash and if I alt+tab I can see a minimized cmd with the switcher running when I start a movie.
This gave me some hopes that this could work.
The thing is, the switcher opens up a dialogue box when triggering HDR this means it breaks the fullscreen from Kodi and when you revert back to kodi, it will kill the HDR set by the switcher.
That's why what I'm trying to do here is open it in the background.
I don't have the means to compile anything here either, or else I could just comment the lines of the switcher.exe code to remove the dialogue box.
So for 2 months what I did, is all we have.
(2019-07-16, 01:59)brazen1 Wrote: [ -> ]For years I've used other external players for HDR playback too such as MPC-BE with madVR handling the HDR duties. It relies on the nVidia private API to do the switching for my GTX 960. It looks and works perfectly. I also use DVDFab Media Player for HDR duties as well. It too looks and works perfectly. v.3 of it uses the private API to switch as well. v.5 of it uses Windows API to engage Windows HDR switch. I use all of them to this day plus a few others. PotPlayer, VideoPlayer, MPC-HC and PowerDVD too. In other words, I have a pretty good idea about calibrating everything to work harmoniously with no need to adjust anything after initial setups. Display HDR mode is display HDR mode no matter how you engage it.
VideoPlayer (KODI) I've used for HDR to SDR with pretty good results although it isn't passing through and isn't up to full potential. This is why I've had high hopes for your work and I'm testing with you. To introduce true HDR to the KODI internal VideoPlayer and make quite a few users happy. I haven't looked your code over but perhaps it can be modded at some point for AMD and Intel as well. In the mean time, this is a great start. Now for the meat and potatoes:
Ok, I understand what you are saying but let me stop you here and explain, the code provided here is for Nvidia only.
Unless someone decides to write some little tool for AMD or Intel and provide the source I don't have anywhere near the experience needed to pull this off.
The story behind why I started doing this is, everyone kept saying no to implement this so I went to Madshi forum's and asked for the documentation of the nvidia private apis.
Someone gave it to me, I googled the string that triggers the HDR and found the switcher on github.
That's why I'm trying this out. Nvidia provides code for HDR switching in it's documentation but I don't have the knowledge to take that piece of code and turn into a fully functional .exe or even put that inside a kodi build, I needed someone elses work to do this.
(2019-07-16, 01:59)brazen1 Wrote: [ -> ]I mentioned DVDFAB v.5 player above because it uses Windows API. I know what to expect from a player using it. I know I don't have to calibrate any differently whether using the Windows API or nVidia. Each looks perfect. However, VideoPlayer using Windows HDR looks far from perfect. It is waaaay too bright and washed out. This has always been the case. HDR to SDR looks much better in my environment. Perhaps others have better results using HDR titles, the KODI player, and Windows HDR switched on with an nVidia GPU passing it through. I've simply never had decent results. Feedback would be nice. KODI calibration settings are pretty much default. I toggled many of them trying to calm the picture down such as Render Methods, Scalers, Reinhart, player brightness and contrast, etc. I have no desire to try to calibrate my display for KODI since it's already harmonious with my 6 other players but figured I'd try just for testing. I also don't want to screw up KODI calibrations because it will affect my other non-HDR titles. You wrote that this is for nVidia. I expected it's API to do the switching. I don't understand why Windows engages its HDR switch? Could it be your compiled switcher is activating nVidia HDR and Windows HDR at the same time which would account for the blown out picture I see?
It's not calibration. It's just that Kodi, right now, doesn't support HDR so when you trigger it on windows everything is messed up.
Maybe even if we get the switcher working with Kodi Callbacks it will look bad, I don't know yet.
The reason why I think it can be correct is that it has the try10bitoutput option to be enabled so that indicates it will work.
My swithcer only has the nvidia apis. When using MadVR, I see the same blown out picture you mention if I alt tab into the desktop without stoping a HDR movie.
I believe this is caused by windows not pushing it's own desktop into the HDR color spectrum but still as we know Madvr is perfect with HDR.
(2019-07-16, 01:59)brazen1 Wrote: [ -> ]Any suggestions for a decent picture and automated switching via KODI Callback would be appreciated. Since you said all is working on your end, it's got to be something on mine. Keep up the good work when you have time. It's beginning to roll imo.
I did not say all is working on my end. I said I was able to get kodi to compile without errors, which was a big deal for someone without much coding skills.
I said I could get it to switch to HDR when I close kodi.
That means the code is working only the placement of the calling function is wrong and I have no idea where to put it.
When using Kodi Callback I can see the screen flash before the movie starts and I can see the script is running but since I don't have a 4k HDR TV here I have no idea if it's actually working.
That's why I asked if someone would like to try it out.