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

Subprocess nature of WebView2 based application prevents Application Audio Capture from accessing audio source. #9838

Open
cryptofyre opened this issue Nov 10, 2023 · 5 comments

Comments

@cryptofyre
Copy link

Operating System Info

Windows 11

Other OS

No response

OBS Studio Version

29.1.3

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/bnZtR8NSDSELFllS

OBS Studio Crash Log URL

No response

Expected Behavior

Audio should be effectively captured from the Application chosen in the window picker like it does with the generic Desktop Audio source.

Current Behavior

The application audio is not properly captured due to WebView2 being an underlying subprocess of the application(Cider), the audio source comes from WebView2 instead of Cider which in this case causes the Application Audio Capture source to not function properly.

Steps to Reproduce

  1. Download Cider (Alternatively, find another WebView2 based application that has audio playback)
  2. Attempt to use the Application Audio Capture in OBS to capture the 'Cider' window.
  3. No audio is captured.

Anything else we should know?

This is a known issue with WebView2 currently, but technically you could mitigate this for now by allowing OBS to see WebView2 sources. MicrosoftEdge/WebView2Feedback#2236

image
image

as for testing, if you need to acquire Cider for testing feel free to reach out to me and I'd happily set you up with a debugging copy you can use for testing.

Appreciate the hard work put into OBS, and I hope this bug report allows for more people to use both of our apps effectively soon!

@Fenrirthviti
Copy link
Member

This affects more than just webview2, as any application using a subprocess for audio output is affected. I thought we had a duplicate of this already, but this isn't technically a bug as we don't capture subprocess audio right now by design.

@cryptofyre
Copy link
Author

Hmm, alright.

Maybe WebView2 could be whitelisted a source as it's a common core dependency, least until Microsoft does something about the audio source naming.

@Fenrirthviti
Copy link
Member

Unfortunately, it's not that simple. We already tried the method provided as part of the API to capture subprocesses, but it's kinda hit or miss, and outside our control right now as I understand it:

PROCESS_LOOPBACK_MODE_INCLUDE_TARGET_PROCESS_TREE;

@cryptofyre
Copy link
Author

Ah bummer, I wish the audio layer got more attention from Microsoft's end. It's just so primitive right now.

@jbubik
Copy link

jbubik commented Feb 1, 2024

Same problem for the new MS Teams app. Based on WebView2 too.

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

3 participants