VideoRenderer
VideoRenderer copied to clipboard
MPC-BE auto change launch in FS does not work when rendering HDR video with MPC-VR
Specs: Windows 10 22H2 Nvidia 3090 Driver 526.98 MPC-BE 1.6.5.3 x64 MPC-VR 0.6.3.1956 x64
The issue I have is that when I open an HDR video (see image attached) rendered by MPC-VR (default options, see attached image) , the auto change display in MPC-BE does not work if the option "launch in Fullscreen" is selected (see attached image). If I remove this option, start the video (in windowed mode), then go to Fullscreen manually, the display switches as expected.
Opening an SDR video (x265 BT709) with the same setup and option work perfectly without having to go to windowed first, it only affect HRD video.
Also using the same setup and options with MPC-BE and Madvr (which I'm trying to move away from...) will work with both HDR and SDR video, so it seems to be pointing at MPC-VR.
Is this expected? Or maybe there is something I did not setup properly in MPC-BE and/or in MPC-VR?
Devs don't have HDR TV and can't test it.
If there is interest, you can help the developers in purchasing such a TV :).
Try set Auto Display HDR On/Off to used for fullscreen.
Try set Auto Display HDR On/Off to used for fullscreen.
No luck either, launching in FS with used for fullscreen option did not work.
The only thing that seems to work is to have this option at "always used", launch the video windowed and double click to go to FS. It seems like something goes wrong in the chain when switching from 120hz to 23.976hz + going fullscreen in the player at the same time as the renderer switching HDR to “on”.
Leaving the display at 120hz (so basically not using the "autochange fullscreen monitor mode") does work but the stutters make it unwatchable,
It does two switches in this situation, one for the fullscreen mode and one for turning on HDR mode. Looks like the HDR switch is attempted while the fullscreen mode switch is still in progress, hence it fails. Maybe the error code that it returns indicates this situation, and isn't a generic fail. If so, perhaps that could be used to retry after a short pause.
Check. mpc-be64.exe.zip
Check. mpc-be64.exe.zip
Tried this version. With the launch in FS option on, the display now swithes to HDR mode, but does not apply the "autochange fullscreen monitor mode" profile (so the display now stays at 120hz instead of going to 23.976hz).
This behaviour is exactly the same as with the older version when I turned off "autochange fullscreen monitor mode"
Well then, it remains to be hoped that the developers may someday have HDR TV. Unfortunately, there are no sponsors :)
I checked - I have the auto change launch in FS in the player and Auto Display HDR On/Off to used for fullscreen in MPC VR working fine.
I also checked Use Exclusive fullscreen.
My MPC VR settings:
Well for me it does not pass the metadata to the display if I auto change launch in FS MPC-BE. HDR is off in statistics. The only way I can get the metadata to the display is to start minimised and go fullscreen manually.
Triggering "convert to HDR" does work,, but this is not what I want to do.
Not a big deal, I'm used to it by now, but I tought I would report it.
Appart from this minor issue, MPC-VR has been great for me, thanks!
Try this latest git version, maybe help. MpcVideoRenderer-0.6.4.1994_git2023.02.02-1167b3b.zip
Update on this. Even the newer versions are still behaving the same
I recently found out that Alt-Enter vs Ctrl-Enter have 2 different functions in MPC-BE. Seems like launch in FS is acting more like Alt-Enter (FS same res) than Ctrl-Enter (FS) and seem to ignore the autochange FS resolution of the monitor options. At least that is true when using passthroug HDR metadata to the display in MPC-VR .
So the solution I came up with is to use an autohotkey script that is triggered by the detection of MPC-BE.exe process, which is sendinput (Ctrl-Enter) with a slight delay off 100ms after detection.
Not the most elegant fix, but it works perfectly. I now have FS with the desired resolution + refresh rate change along the HDR metadata.
I'm putting it here in case it can be helpfull either in troubleshooting the issue or for other users
Thanks
Is there anyone who'd be interested in testing out a fix? I don't really use this combination of features myself, so would be good to get someone who is affected by this bug. I just want to see how well it works for other people, if it crashes, etc.
There already is a delay option in the fullscreen settings page that can be used to solve the problem.
I've tried it out just now and sadly that does not seem to be the case. It's labelled pretty poorly, it does not 'delay' the auto-change, but just pauses playback on launch for x seconds which does nothing. As I said before, if anyone has an HDR screen and would like to be a beta tester, write a comment.
I have HDR monitor. My HDR TV don't plugged to PC and a can't test/debug.
Well if you decide to give it a go, here it is: MpcVideoRenderer.zip Obviously it works for me, but the whole HDR thing on windows is so janky, I wanna know if it even functions for other people.
Well since this was my issue, I will test the built posted above and report back
And no, adding the delay does not fix it, as JTGAming wrote, the auto-change, just pauses playback on launch for x seconds which does nothing.
@JTGaming, it works. It does take a bit longer for the image to apprear, around 3 seconds, but it fixes the issue. Its a keeper for me.
@JTGaming can you make the PR for the fix?
Yeah, this had me stumped for a good few days since there doesn't seem to be any documentation on these kinds of features from Microsoft. Took some trial and error to just get it to not crash instantly. I'll clean up the code and open a pr later tonight.
@JTGaming
I just found a case were the renderer will not initiate.
If I use RTX video HDR, sometimes the renderer fails to initiate, when this happen I get a blackscreen.
This actually is 100% reproduceable if I use a 4K SDR video with RTX HDR. On a 1080p SDR video (also with RTX HDR), it will fail the same way maybe once out of 4, not all the time.
I know this is a very specific scenario, but I tought I would report it.
What option is your "windows hdr" setting on - is it "allow turn on", or "allow turn on and off"?
Also, just to get this right: Your screen is in HDR mode, and when you play a 4K SDR video with RTX Video HDR on, it crashes on launch?
Also, could you give this one a try? MpcVideoRenderer_no-fix.zip I've disabled my code, but it's the latest build of source. It won't do anything for this bug, but I just want to see if it still crashes on your system - that way I can tell if it's my code that's causing issues, or if it's just RTX Video HDR being wonky. Just use the same settings as you did for the above build that caused blackscreen. I'm out of the country at the moment, so don't have an nvidia system to test on until next week.
Ok did some more testing.
Windows display HDR setting on Using "allow turn on"
You are right, using the no-fix built, I get the same result with the 4K SDR video.
With that said, with both built, disabling "launch in fullscreen" will lauch the video as expected (with RTX HDR), and double clicking to fullscreen will works as intended.
Are you using MPC-HC, by any chance?
Note: My 100ms script to Ctrl-Enter has the same result, but changing the delay to 250ms seems to fix it.
And no, I use MPC-BE
Okay, I'll try to look into it when I'm back home in a day or two. Sounds more like an RTX Video HDR implementation issue then, if it still happens on the no-fix version.
Could you try turning on 16bit and use dithering in mpcvr? That used to fix some crashing for me, but it does have a performance impact.
Turning 16bit float point + dithering fixes the issue with both builds you posted
That's good to hear. That's what i use myself since mpc-hc likes to crash with HDR content often. As long as you're not dropping frames and stuttering wildly (like my slow laptop for example), I'd recommend keeping 16bit+dither on for now. I'll update this thread if i manage to reproduce and debug this crashing.
But just to reiterate, the fix for display refresh rate not updating works fine as long as rtx video hdr is not involved, yes?