[HDR Metadata Passthrough] - Plex HTPC for Windows

It’s likely because the video is paused and MPV is told to queue the sdrBlack file but looks like it doesn’t tell it to resume playback. So with it waiting for this playback to complete, it never does because the file is paused.

2 Likes

Ah, that is probably the reason! I just checked how mpv cli would behave and it also pauses the second queued file… Is there something you can do to prevent mpv being stuck in the paused state?

I probably found the solution to the problem, well it works with mpv cli, so hopefully also with Plex HTPC. --reset-on-next-file=pause The second file in the queue is now played. mpv with all the settings is pure gold…

1 Like

Update on that one…

While fixing it with mpv cli, adding the option to the mpv.conf does unfortunately nothing, the issue is still there.

Another one…

This time it’s about D3D11… I have somehow got the dropped frame issue sorted…
Just by changing the gpu power mode from normal to max. With normal, I reliably got one dropped frame every 40s or so with frame timings at around 6000 to 8000µs, with the gpu power mode changed to max, even after 8 minutes I had no dropped frame and the frame timings were at around 500-700µs!! (5 minutes was the threshold for testing it)

I captured the gpu stats with GPU-Z and this is what I got =>

I guess to no one’s surprise the GPU and Memory clock is max (1777 MHz /1750 MHz in my case) with power mode set to max. It almost uses idle clocks for GPU and Memory with the default power mode. With power mode max, the power draw is 25w whereas with normal it’s around 10w for an Nvidia RTX 3050…

But three values surprised me… GPU load, Memory Controller load, and Video engine load. With max power mode, those values seem stable and less fluctuating, in general, they look “cleaner and better”. I have no idea what goes on with normal power mode but after seeing this it’s no surprise that we see some weird behavior…

@c_holzer Can you please retest D3D11 with max power mode on your system?

I can confirm this behaviour, playback is stuck with the sdrblack file, plex has to be closed and launched again to fix this.

1h, 5 dropped frames

1 Like

Well, that’s a significant improvement! Not perfect but way better! It’s also even better than Vulkan on your system if I recall correctly. Thanks for the quick response!

Not to derail the thread, just curious if the stats overlay is inside Plex HTPC or MPV directly? There have been a lot of times I’d like to enable the more detailed overlay in Plex (troubleshooting playback), but not sure of a way to do it.

The internal mpv stats overlay can be opened within Plex HTPC. You just need to rename the input.conf.md to input.conf inside the Plex HTPC AppData directory. Then you can open the overlay with I - capital i.

2 Likes

Wow, it really is already baked in there, so easy. Thanks for pointing it out!

That may explain why I don’t see anywhere near the number of dropped frames you have with D3D11. I had set mine to max power long ago because that fixed issues where it was dropping AUDIO frames. I have a video file that has occasional white text on a black background in the first couple of minutes (title credits). It would drop audio on during these text screen about 1/2 the time so over the course of several it drop audio multiple times. It didn’t matter if it was passthrough or decoding to PCM; it still dropped audio frames.
Perhaps this may be related to your audio issue in the other thread?

Even still, I would see the occasional video frame drop with D3D11 (I didn’t look at the stats but I could actually see it).

You shouldn’t actually do this but rather look at the file and make the input.conf be the example. There are other lines in the md file which are not intended to be interpreted by MPV.

It’s the built-in stats.lua script. There is more than one page (see the link for its keybindings). You can use other scripts and launch them via similar means. The MPV console also works.

If you mean my TrueHD issue, changing the power mode does not fix it. The issue is still present. :confused:

@gbooker02
May I ask if it is possible to also add an option to switch to a 10-bit 23/24p mode when HDR switching is enabled? It is quite difficult to get both worlds of 4K60 and 4K24p10Bit_4:4:4 with just HDMI 2.0 and windows with no automatic bit-depth switching. Forcing video output to 10bit limits the refresh rate to 4K30 (4:4:4) and pixel subsampling switches are also impossible. I also have never gotten it to work, forcing 23p to be 10 or 12Bit and 4K60p to be 8Bit as you have suggested with my Nvidia system. Right now I´m just having it set to 8Bit, which works for HDR but is not optimal.

Is this possible? Is there a windows API that exposes this?

So, I have my NVIDIA GeForce RTX 2060 Super set to 3840 X 2160 @ 30 Hz, RGB, 12 bit (no option for 10 bit). This is what Windows reports during 4k HDR playback. What do you think is actually being sent to the panel? I always wondered.

Your daily resolution is 3840x2160@30p@12Bit? If this is true, then you don´t have the problem I was referring to, as it’s easily within the HDMI bandwidth range and therefore switching to a lower framerate mode is perfectly fine with the 12bit. I´m also quite sure it’s sending a 12 bit stream to your TV but don´t quote me on that. (You need an AVR with HDMI statistic info or an HDMI “debugger” to be 100% sure)

My default resolution is 4K60 8Bit 4:4:4 and whenever I watch a 23pHDR file, the TV gets switched to 23pHDR8Bit, where it should preferably choose a 10 or 12 bit mode. That’s what I´m asking for. :wink:

Yes, I don’t mind the lower daily refresh rate because I only use the server for Plex.

Thanks for the reply!

Stupid question but why are you guys so eager to run 4:4:4 when content is mastered at 4:2:2 at best ?

Our HTPC doubles as a PC as well and textual content is still good enough at 4:2:2. Most would only run 4:4:4 for textual content.

Our HTPC has an RX580X set up to push 4:2:2 10 bit at 4k/60 and everything plays nicely including step down to 24 fps from 60 when Plex HTPC starts. Sure the Plex splash screen gets a bit unhappy (I think our intermediary AVR is causing that) and the usual screen refresh rate change black screen but it all plays nicely.

Whenever I use 4:4:4, on my HDMI 2b setup, I get HDMI speed issues and it really doesn’t improve anything with the media we watch anyway and nothing in terms of the textual content we see on our HTPC when it runs as a PC only (I know most would say it should but text to our eyes is perfect on 4:2:2)

If I try and push 4:4:4 4k60 (can only use 8 bit due to HDMI 2b limitations) with Plex HTPC screen refresh rate match enabled, I get no video, just audio. It is an HDMI 2b limitation for our setup. If I reduce to 4:2:2 4k60 I can select 10 bit and everything works. My AVR is reporting 4:2:2 4k 24p 10 bit when playing Plex HTPC.

I’m not aware of an API for this. I considered myself fortunate just to find one that switched HDR at all.

I am also limited to HDMI 2.0 (by the computer only as the AVR and TV support 2.1).

My normal resolution is 4k/60Hz/RGB 4:4:4/8 bit. I have configured the nvidia settings to use 12-bit for HDR 24Hz (IIRC done by changing the refresh rate and then changing the bit depth). So when I play content that’s in 23.976fps/HDR, I get 4k/23.976Hz/RGB 4:4:4/12 bit.
It’s also possible to configure it to use YUV as I have seen some TVs which have issues with RGB.

I checked mine by looking at the info the AVR states on the HDMI signal which gives the resolution/rate/color format/bit depth.

There is some rare content that’s higher than 4:2:2 but the more practical reason is on the high GPU presets, the KrigBilateral shader does a good job in the 4:2:2->4:4:4 upscaling. Without that, the lower presets still use resolution scalers for chroma which can still perform quite well in terms of visual quality.
So the question is: which does a better job of chroma upscaling: the TV or the computer? In cases where it’s the latter, you want RGB 4:4:4 from the computer to the TV.

1 Like

No thanks, crushed blacks for us with RGB 4:4:4 at 8 bit then the banding issues with 8 bit.

Dark content is better with RGB but HDMI 2b just doesn’t play well if you need 4k60 as well.

I should run a separate HTPC and run it at 4k30 but content we use just doesn’t make that sensible.

I still don’t get why Plex’s refresh rate switch breaks the camels back with HDMI 2b on our setup, suspect it’s the AVR but not sure.

I’ll stick with 4k60 at 10 bit 4:2:2. We see no visible difference using 4:4:4 and in fact a downside.

For us (and it must be just our inadequate setup).

HDMI 2b can do 4:4:4 with HDR (10/12 bit) as long as it’s 4K 24/30fps. Not something we can live with given the use of our HTPC.

With 4K 60fps we have to choose between 8 bit + 4:4:4 or 10/12 bit + 4:2:2 (with the latter being the correct choice for all our content)

Our panel is 8 bit and dithers to 10. Sending 12 bit doesn’t make sense, also given the media we use.

I do like what RGB full does with dark content but limits our bandwidth options.

One day I’ll upgrade everything to HDMI 2.1 … :frowning: