mpc-hc icon indicating copy to clipboard operation
mpc-hc copied to clipboard

MPC Audio Renderer fails to bitstream after switching to HDR mode

Open MistarMuffin opened this issue 1 year ago • 9 comments

Switching Windows 11 to HDR mode interrupts audio when using MPC Audio Renderer + bitstreaming from LAV. Audio can be restored by switching audio tracks within the file or by changing any setting in the MPC AR settings. This seems to reinitialize things.

I am not enabling Windows 11 HDR manually during playback but did confirm the issue by doing this. I am using the MPC Video Renderer -> HDR Passthrough to display -> Windows HDR -> All turn on/off settings.

Steps to duplicate:

  1. Windows set to SDR
  2. LAV Audio set to bitstream
  3. MPC VR set to turn on Windows HDR and passthrough metadata
  4. Open HDR video
  5. Screen flashes while HDR mode is enabled.

Result: Video plays in HDR but with no audio. Audio can be reinitialized by changing track within file.

I tested with SaneAR and audio bitstreaming continues after HDR is toggled.

I am using an NVIDIA RTX 3080 on Driver 560.70 with Windows 11 23H2 connected to a Denon AVR. Let me know if I can provide any more information.

Thank you.

MistarMuffin avatar Sep 19 '24 23:09 MistarMuffin

@Aleksoid1978 Maybe try to re-init one time automatically after a device is lost?

clsid2 avatar Sep 20 '24 00:09 clsid2

At the moment I don't have an A/V receiver connected and I can't test this case.

Aleksoid1978 avatar Sep 20 '24 02:09 Aleksoid1978

  1. As far as I remember, when I was watching HDR + sound bitstream - this did not happen.
  2. The code already has error handling AUDCLNT_E_DEVICE_INVALIDATED and at the same time a complete re-creation of the device occurs, etc. (the same thing happens when changing settings). So this is not the issue here.

Aleksoid1978 avatar Sep 20 '24 02:09 Aleksoid1978

@MistarMuffin Do you have "Default Sound Driver" selected? Test if same problem happens with explicitly selected device.

Possibly it is switching device when the HDMI output is temporarily unavailable due to HDR switching on.

clsid2 avatar Sep 20 '24 11:09 clsid2

I have had the output device set to DENON-AVR (NVIDIA High Definition Audio) throughout my testing. Would a video of the behavior be of any help?

MistarMuffin avatar Sep 20 '24 17:09 MistarMuffin

No, just use SaneAR instead.

clsid2 avatar Sep 20 '24 19:09 clsid2

For testing, you need to use the Debug version, then I will try to determine the reason from the Debug logs.

Aleksoid1978 avatar Sep 20 '24 22:09 Aleksoid1978

Do you test in MPC-BE ?

Aleksoid1978 avatar Sep 20 '24 22:09 Aleksoid1978

I had previously tested in MPC-BE but tried again and found something interesting:

I had been using standalone LAV filters in both MPC-HC and BE. I enabled internal filters in BE and found the issue was partially fixed. I narrowed it down to LAV Video vs MPC Video Decoder. With LAV Video, the audio is silent when beginning playback of HDR file. When using MPC Video Decoder, audio works fine. Switching between LAV Audio and MPC Audio Decoder does not matter. It is the video decoder that seems to make a difference.

I say the issue is partially fixed because bitstreaming still breaks if you toggle HDR manually during playback. This is not a common use case but just something I noticed.

Something else I noticed is that DTS bitstreaming is not affected. It is only Dolby tracks that drop out when HDR is toggled.

The issue persists in MPC-HC when using internal filters as they are also LAV. I installed the standalone MPC Video Decoder filter and confirmed it partially fixes the issue in MPC-HC as well.

My hypothesis is that MPC Video Decoder starts playback after the Windows HDR toggle has completed and that this keeps the issue from occurring at beginning of the file. It would explain why the issue is still present when manually toggling Windows HDR.

MistarMuffin avatar Sep 21 '24 02:09 MistarMuffin

I have yamaha receiver hooked up via HDMI. I might be able to reproduce this.

Can you provide the video and your settings?

adipose avatar Sep 21 '24 16:09 adipose

https://files.muffinworld.net/share/4nqBfehA

This is an HDR + Dolby Atmos demo.

image

image

image

image

MistarMuffin avatar Sep 23 '24 15:09 MistarMuffin

Show MPC Audio Renderer's Status when sound is on and when sound is off.

Aleksoid1978 avatar Sep 24 '24 03:09 Aleksoid1978

Status is identical in both states. Here's a screenshot:

image

MistarMuffin avatar Sep 25 '24 00:09 MistarMuffin

I could not reproduce this issue. I used all the settings exactly as you have them.

However, I am using a Yamaha RX-A2060. I realize this may not be feasible for you, but could you verify the same issue exists with other branded receivers?

adipose avatar Oct 22 '24 19:10 adipose

Might depend on receiver, tv, or even sound driver.

Perhaps disconnecting and reconnecting hdmi cable can trigger it as well?

clsid2 avatar Oct 22 '24 20:10 clsid2