clsid2 / mpc-hc

Media Player Classic
GNU General Public License v3.0
11.06k stars 491 forks source link

New MPC renderer doesn't work correctly with some 4K videos. #2865

Closed Ademar440 closed 3 months ago

Ademar440 commented 3 months ago

Like the title says, here are additional details.

MP4 format encoded with HEVC

General

Format : MPEG-4 Format profile : Base Media Codec ID : isom (isom/iso2/mp41) File size : 1.34 GiB Duration : 3 min 20 s Overall bit rate : 57.6 Mb/s Frame rate : 60.000 FPS Writing application : Voukoder (VEGAS)

Video ID : 1 Format : HEVC Format/Info : High Efficiency Video Coding Format profile : Main 10@ L5.1@Main Codec ID : hev1 Codec ID/Info : High Efficiency Video Coding Duration : 3 min 20 s Bit rate : 57.4 Mb/s Width : 3 840 pixels Height : 2 160 pixels Display aspect ratio : 16:9 Frame rate mode : Constant Frame rate : 60.000 FPS Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 10 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.115 Stream size : 1.34 GiB (100%) Codec configuration box : hvcC

Audio ID : 2 Format : AAC LC Format/Info : Advanced Audio Codec Low Complexity Codec ID : mp4a-40-2 Duration : 3 min 20 s Source duration : 3 min 20 s Bit rate mode : Constant Nominal bit rate : 262 kb/s Maximum bit rate : 262 kb/s Channel(s) : 2 channels Channel layout : L R Sampling rate : 48.0 kHz Frame rate : 46.875 FPS (1024 SPF) Compression mode : Lossy Source stream size : 6.26 MiB (0%) Default : Yes Alternate group : 1

In windowed mode the video looked like it was upscaled very very badly and in full screen it looked aliased, followed the instructions on the renderer and hardware acceleration device, no luck there.

Tried some different 4K videos, a lossless AVI encoded to RGB, this one works correctly and a MOV video encoded with apple prores, this one displayed correctly as well.

clsid2 commented 3 months ago

Likely caused by bad scaling quality of your graphics driver. Which GPU do you have?

Uncheck "use for resizing" in the video processor section. Then it will use Shaders for resize.

Ademar440 commented 3 months ago

That fixed it although GPU utilization is between 6% and 10% higher compared to the old renderer and my GPU is a 3080ti

THEtomaso commented 3 months ago

Same problem here.

I've got a HDR-compatible 1080p monitor (ViewSonic ELITE XG270), and when opening a 4K/HDR video, my screen goes black for a second, then the video starts playing with brightness and other settings all messed up! Perhaps this is by design, as all setting now should be tweaked in the graphics driver settings? Anyway, when stopping the video, everything goes back to normal.

By coincidence, I've got a Nvidia GeForce RTX 3080 Ti graphics card too, but I don't think that's the issue here.

Unchecking the "Use for resizing" option, like suggested by clsid2, makes the videos look a bit better, but it doesn't fix the main problem, which I described above.

I completely fixed the issue though, simply by disabling the "Use Direct3D 11" option for MPC Video Renderer all together, like this:

'View' > 'Options' > 'Playback' > 'Output' > 'DirectShow Video' > 'MPC Video Renderer' > 'Settings' > 'Use Direct3D 11' = *UNCHECK*

In MPC-BE, this option is actually disabled by default (apparently for good reasons).

clsid2 commented 3 months ago

It is switching the display into HDR mode. There are two solutions to prevent the screen from going black: 1) Enable HDR permanently in Windows settings. 2) Disable HDR passthrough. Then the renderer will tonemap to SDR.

HDR passthrough is only supported with Direct3D11, so if you disable that, you effectively disable HDR as well. So it seems you prefer not using HDR. I guess you bought a HDR screen for no reason?

The options of MPC Video Renderer are fully independent of MPC-BE. I am not sure what you are talking about.

Your problem is not related to that of the topic starter. Bad quality downscaling is NVIDIA fault of choosing bad scaling algorithm.

THEtomaso commented 3 months ago

There are two solutions to prevent the screen from going black

Thanks, this explains a lot.

--

HDR passthrough is only supported with Direct3D11, so if you disable that, you effectively disable HDR as well.

I just want to be able to play some occational HDR videos, which I happen to come by from time to time. Even with Direct3D 11 disabled, the "Convert to SDR" setting works just fine for this purpose.

--

it seems you prefer not using HDR.

Yeah, I'm actually not a fan of it.

--

I guess you bought a HDR screen for no reason?

I bought it for other reasons. It just happened to be HDR-compatible.

--

The options of MPC Video Renderer are fully independent of MPC-BE. I am not sure what you are talking about.

I'm talking about the 'MPC Video Renderer' setting called 'Use Direct3D 11'.. In MPC-HC, it's checked by default. In MPC-BE, it's unchecked by default (so HDR videos are actually converted to SDR, unless users change this setting).

--

Your problem is not related to that of the topic starter.

OK, sorry. ..but at least we have some workarounds here now, which perhaps other people will find usefull too.

--

Anyway, I appreciate your work very much, clsid2. Keep it up! 👍

clsid2 commented 3 months ago

I have created a pinned FAQ for MPCVR.