Question / Help How to stop monitoring audio of an inactive audio device

I have been using a PC to run OBS, and recently tried to run the same set up on Mac.

I can play a video, or audio input, and get audio monitoring. BUT when I swap to another scene I can still hear the audio of the scene I just swapped from. This doesn't seem to go out on a stream or record, it just comes through the monitoring device. This makes it incredibly difficult to reliably know what is actually being streamed since all my audio devices will stay on no matter what scene, and no matter if they are in that scene or not.

As I said, I did not encounter this problem on PC and have gone through and identically matched the settings.

Am I missing something here, or is this a bug?
 

cesclapez

New Member
Same problem here, works on PC, not on Mac - OBS Studio 26.0.2
Blackmagic UltraStudio Recorder 3G audio source continues to be monitored even though it's inactive... super frustrating!
 

jonthomason

New Member
Exact same problem for me on Mac OBS Studio 26.0.2. I'm streaming live church events (to a pretty large virtual audience) and really count on monitoring to know what's being streamed. Unfortunately, I can't because even inactive devices (e.g. the mic, even when I have it turned off in a scene and am just streaming background music) still get monitored. Worth a bug report?
 

yellowdog

New Member
Greetings all!

Just to make it interesting, I have been using OBS for many months and just today, as I began to prep for my next event, this issue has presented itself. Historically, audio sources in non-active scenes have been "muted", however today, the audio sources are active no matter what. Like some of you, I am not leveraging OBS as a recorder or streamer, the output screen is used downstream (with audio and video). I can confirm that the inactive scenes audio do not appear in recordings or streams, but do appear in the monitor mix (which, again, Is my program out). I have confirmed that "settings -->audio -- Global audio devices" are all set to disabled. I can work around this issue by adding mute commands to audio sources as I switch scenes, but that is kludgy at best. As others have noted. This behaves as expected on the windows version of 26.0.2. I also tested with the 26.1 RC as well as the last V25 version, all behaved the same way. I am not clear on why this issue has suddenly presented it self. The mac obs machine has not been updated and my show from last week was in 26.0.2 (mac) and ran without incident. No system updates have been run.

Did any of the other posters to this thread solve the issue?

Thanks in advance.
 

jonthomason

New Member
In case anyone's interested, I wrote a little lua script to work around this issue. It simply watches for all microphones to be activated and deactivated (as you switch scenes, this happens, of course). Every time a mic is deactivated, it turns off the monitoring for it.

I searched only for mics (Core Audio devices) since other types of sources (e.g. playing VLC content) don't make any noise when switched away from. It's only hot mics that cause a problem for me.

I'm attaching the zipped lua file.

If you haven't used scripts before, you go to the Tools menu and select Scripts. Once there, hit + and locate wherever you downloaded this script to. Make sure you've unarchived this to be active_monitor_only.lua, not the zip file.

Once loaded, it just "works" and stays loaded until you remove it.

If you want to see what it's doing, select Script Log on the panel where you loaded the script and you'll see messages that indicate which devices have monitoring turned ON and OFF. This probably should be uploaded and maintained on the main script site, but my OBS time is done for today.

Let me know if you have any questions or if you find any bugs. I have only tested on my setup.

Jon Thomason
 

Attachments

  • active_monitor_only.lua.zip
    1.2 KB · Views: 141

kkphoto

New Member
This is awesome Jon! A perfect simple solution! This bug has been driving us crazy too and I just installed your script and works perfectly. Thank you for taking the time to share it with the community.
 

jonthomason

New Member
Glad this helped! I have a (completely optional) update. It has just one feature: I've found cases where I want a source (microphone) that should never be monitored. Even when this is the case, the earlier version of the script will always turn it on, even if you have it set to no monitoring.

The case when you might want this is where you're broadcasting from a house microphone that is going directly into the house mixer board. You want to broadcast it via OBS, but you're sharing the house mixer with the broadcast house system. Monitoring from OBS causes badness (echoes, feedback) because you're feeding a second, slightly delayed, version of the mic signal back into the mixer.

Turning monitoring off for this input solves the issue. It's somewhat bad because you aren't hearing exactly what OBS is broadcasting, but this is the compromise you have to make if you want to share a mixer between OBS and a house system.

In any case, whether or not that made sense, here's how you use it: you simply take the Audio Input Capture source and add ":nomonitor" to the name of the source. For example, my Audio Input Capture Source for my house system (which is mapped to the USB input from my mixer) was called House System. I renamed it to be House System:nomonitor, and my script now notices the :nomonitor and always leaves the monitoring off even when the source is active. This means that it will be sent to the broadcast, but will not be sent to the monitoring device. Email me if you have questions at jonthomason -at- me.com (replace the -at- with @).

There are no other changes in the script, so if this doesn't sound useful or this makes no sense to you, feel free to use the simpler one posted above.
 

Attachments

  • active_monitor_only.lua.zip
    1.2 KB · Views: 67

Brew

New Member
Hi Jon, this is a great addition thank you, I have two NDI sources that feed into my OBS session it there a way I can utilise this script to mute the inactive sources? This issue has been driving me crazy as my two contributors Skype>NDI>OBS their audio is being actively monitored all the time and I can't find a way to stop it.
 

Brew

New Member
Disable all global audio inputs. Set all source inputs to output only. Monitor the output from the Audio Monitor control panel. You'll hear only the currently active sources.
Nice one, I'd also missed out putting the audio monitor to my headphones,

I had also previously been adding the audio monitor send as a filter per input source, which is not needed.

Thank you.
 

jonthomason

New Member
Looks like I need to go check out the new Audio Monitor plug in. This is very much needed. Mine is very simple and doesn't address the broader issue of having more control over audio monitoring. Much needed. Just remember that my plugin is just to fix a bug where there is different behavior between Mac and PC. On the Mac, regrettably, *inactive* sources still monitor. They correctly are muted when inactive to the monitor mix on the PC. This plugin just searches for Core Audio devices and only mutes those. Unfortunately, per the question above, I don't know what the NDI input type is, apologies. If you get me some detail, I can try to see if I can locate this type of input and mute it, too. Sorry for my ignorance about NDI.
 

freetz

New Member
I only registered here to say thanks to @jonthomason for this desperately needed fix for our production tomorrow! I installed Audio Monitor as well, but either I wasn't understanding it correctly or it does not cater for the problem discussed in this thread.
I also had the same problem as @Brew that the NDI audio source from my camera was not muted with your script. It just needed an added condition so that the line would be
Code:
if source_id == "coreaudio_input_capture" or source_id == "ndi_source" then
You could also add a
Code:
print (source_id)
after
Code:
local source_id = obs.obs_source_get_unversioned_id(source)
, then it would print out the type of source that your system is using as well, in case you also need to mute others.
For the added NDI audio muting, I have attached the modified version so that others can pick right up.
Thanks a lot again, this is certainly a great community!
 

Attachments

  • active_monitor_only.lua.zip
    1.4 KB · Views: 66
Top