Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MPC Audio Renderer fails to bitstream after switching to HDR mode #3087

Open
MistarMuffin opened this issue Sep 19, 2024 · 12 comments
Open

MPC Audio Renderer fails to bitstream after switching to HDR mode #3087

MistarMuffin opened this issue Sep 19, 2024 · 12 comments

Comments

@MistarMuffin
Copy link

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 MistarMuffin changed the title MPC Audio Render fails to bitstream after switching to HDR mode MPC Audio Renderer fails to bitstream after switching to HDR mode Sep 19, 2024
@clsid2
Copy link
Owner

clsid2 commented Sep 20, 2024

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

@Aleksoid1978
Copy link

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

@Aleksoid1978
Copy link

  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.

@clsid2
Copy link
Owner

clsid2 commented Sep 20, 2024

@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.

@MistarMuffin
Copy link
Author

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?

@clsid2
Copy link
Owner

clsid2 commented Sep 20, 2024

No, just use SaneAR instead.

@Aleksoid1978
Copy link

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

@Aleksoid1978
Copy link

Do you test in MPC-BE ?

@MistarMuffin
Copy link
Author

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.

@adipose
Copy link

adipose commented Sep 21, 2024

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

Can you provide the video and your settings?

@MistarMuffin
Copy link
Author

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

This is an HDR + Dolby Atmos demo.

image

image

image

image

@Aleksoid1978
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants