Virtual Audio Cable for Zoom

aracloud

New Member
Hi,

Is there a way to send Audio from Microphone throught OBS to feed into Zoom online meetings?

How can this be acieved?

Thx ara
 

aracloud

New Member
Your answer lies right there in your subject line :)


Install Virtual Audio Cable, set that as your monitor in OBS, set your sources in OBS to 'monitor and output', and set virtual audio cable as your mic in Zoom.

Use the OBS Virtual Cam to send your video.

You should be good to go!

I use Linux... I know that VB-Audio offers Virtual Adio Cable but for Windows only AFAIK...
 

REDzero5

New Member
I hate to ask dumb questions, but I am using Windows, and I've installed Virtual Audio Cable, and I can select that in Zoom, but I can't quite figure out the middle two instructions here. I don't see a place to add a 'monitor' in OBS, and while I see Audio Output Capture in Sources in OBS, I don't see how to add 'monitor and output'. Any help appreciated -
 

TomB

New Member
I realise this is late and a thread bump, but this is the first result on google and I just spent several hours working this out.

A combination of trial and error and a post by Christopher Donham here: https://unix.stackexchange.com/questions/576785/redirecting-pulseaudio-sink-to-a-virtual-source provide the solution. Christopher's script:

Code:
#!/bin/sh

# This created something I could see in OBS.  Set it as the monitor device in Settings->Audio.  Then
# turn on monitoring for the microphone and the video.

pactl load-module module-null-sink sink_name=Virtual-Speaker sink_properties=device.description=Virtual-Speaker

# Now I need to take the monitor stream from the Virtual-Speaker and turn it into a source that Zoom can use
# as a microphone.

pactl load-module module-remap-source source_name=Remap-Source master=Virtual-Speaker.monitor

Christopher recommended going into OBS settings, and setting the monitor to the new device. However, this causes audio lag so the audio is about 0.3 seconds behind the video. Instead:

1. Open OBS
2. Turn monitoring on for one of your devices (it should play through your speakers/headphones to begin with)
3. Run Christopher's script
4. Select "Remapped Monitor of Virtual Speaker" as your microphone in teams/zoom/etc

Leave OBS on the default monitor, it seems to detect the virtual speaker automatically and switch itself to it. If you go into OBS settings and set "Monitoring Device" in the advanced section of audio settings, it causes an audio delay. I have no idea why.
 

cosmok

New Member
Thank you very much for this. What do you mean by "2. Turn monitoring on for one of your devices (it should play through your speakers/headphones to begin with)", could you maybe elaborate on that or say, where you set which option to what? Should I set my microphone under advanced audio settings to "monitor and output" or do you mean something elese?
Thank a lot in advance. :)
 

Avistreams

New Member
Your answer lies right there in your subject line :)


Install Virtual Audio Cable, set that as your monitor in OBS, set your sources in OBS to 'monitor and output', and set virtual audio cable as your mic in Zoom.

Use the OBS Virtual Cam to send your video.

You should be good to go!



I just wanna say I was not being able to solve this problem at all. But a search landed me here. I am a windows user and it worked like a charm really. thank you so much
Truly appreciate it. Life Saver!
 

AndyDelgado

New Member
@aracloud I ended up using PulseAudio Volume Control to get my audio routed where I want it to go. I also use PulseEffects to add EQ and other effects to my mic before it gets to OBS.
 

cekuhnen

New Member
set your sources in OBS to 'monitor and output',

Thank you for this tip. I spend around 3 weeks looking this up till I reread your post and realized that to monitor you need to turn this on in advanced audio settings too and not just select VB Cables for monitoring in the main audio settings.

Again thank you !

So many youtube tutorials just go overboard here.
 

cekuhnen

New Member
Thank you very much for this. What do you mean by "2. Turn monitoring on for one of your devices (it should play through your speakers/headphones to begin with)", could you maybe elaborate on that or say, where you set which option to what? Should I set my microphone under advanced audio settings to "monitor and output" or do you mean something elese?
Thank a lot in advance. :)

Here is made you a quick tutorial


in short
make an audio input with a mic
in settings turn on monitor and select the vb cable

THEN and this is often overlooked or not explained online
go to edit > advanced audio settings > turn on monitor and output on
 

cosmok

New Member
Aw, so kind of you to make a short video! However, where did you get the VB cable from? Is there one for Linux?
 

cosmok

New Member
Thanks to the post of @TomB and the stackexchange thread he linked, especially due to a comment in there, I finally figured out how to get my audio re-routed through OBS into Zoom / Skype without delay between sound and video:
  1. Start OBS
  2. pactl load-module module-null-sink sink_name=Virtual-Speaker sink_properties=device.description=Virtual-Speaker
  3. OBS -> Settings -> Audio -> Monitoring Device: Virtual Speaker
  4. OBS -> Advances Audio Settings -> Microphone: Monitoring on
  5. pactl load-module module-remap-source source_name=Remap-Source master=Virtual-Speaker.monitor
  6. Start Zoom / Skype, Choose Monitor as Microphone
  7. Close OBS
  8. Restart OBS
Now, I can finally use the OBS audio filtering as well. :) Thanks to everyone!
 

RockBastard

New Member
Your answer lies right there in your subject line :)


Install Virtual Audio Cable, set that as your monitor in OBS, set your sources in OBS to 'monitor and output', and set virtual audio cable as your mic in Zoom.

Use the OBS Virtual Cam to send your video.

You should be good to go!
Its taking noise suppression to a new level utilizing OBS's new RNNoise in Zoom and Skype Calls, Many thanks!
 

RockBastard

New Member
Your answer lies right there in your subject line :)


Install Virtual Audio Cable, set that as your monitor in OBS, set your sources in OBS to 'monitor and output', and set virtual audio cable as your mic in Zoom.

Use the OBS Virtual Cam to send your video.

You should be good to go!
Your answer lies right there in your subject line :)


Install Virtual Audio Cable, set that as your monitor in OBS, set your sources in OBS to 'monitor and output', and set virtual audio cable as your mic in Zoom.

Use the OBS Virtual Cam to send your video.

You should be good to go!
I get quite a bit of sound degradation, it sounds a bit muffled, when sending my sound to Zoom or Skype from OBS using Virtual Audio Cable, any ideas?
 

JustPaul

New Member
Thanks to the post of @TomB and the stackexchange thread he linked, especially due to a comment in there, I finally figured out how to get my audio re-routed through OBS into Zoom / Skype without delay between sound and video:
  1. Start OBS
  2. pactl load-module module-null-sink sink_name=Virtual-Speaker sink_properties=device.description=Virtual-Speaker
  3. OBS -> Settings -> Audio -> Monitoring Device: Virtual Speaker
  4. OBS -> Advances Audio Settings -> Microphone: Monitoring on
  5. pactl load-module module-remap-source source_name=Remap-Source master=Virtual-Speaker.monitor
  6. Start Zoom / Skype, Choose Monitor as Microphone
  7. Close OBS
  8. Restart OBS
Now, I can finally use the OBS audio filtering as well. :) Thanks to everyone!

I know this is a couple months old but its something I need to figure out.
SImilarly I am trying to use OBS as my Mic Audio Source for Zoom as well as play videos with audio from OBS to Zoom. I can get it to work however when I play the video I can't hear it on my end but everyone in Zoom can.
What am I missing to get the audio to be heard by those in Zoom and myself?
And I apologize I don't understand what to do or what steps 2 and 5 are.
 

frisco

New Member
Here is how I accomplish this using pulseaudio. Basically what we need to do is create 2 new sinks and one new source. I'm going to name them as follows:
  • to_obs will be a new sink that goes to OBS and is recorded in OBS, but where the sound is not sent upstream. This will be used for audio from your videoconference, which you don't want to send back upstream. It will also go to your speakers.
  • to_obsmon will go to OBS to be recorded and sent back upstream. You would use this, for example, if you were were playing a video for people in your zoom chat, and want the audio both recorded and sent upstream.
  • from_obs will be a source for sound coming out of OBS.
The complication here is that the only way to get sound out of OBS is through the monitor device, and there is only one. So while in an ideal world you would have two audio output streams from OBS, send one to zoom and both to your speakers, we are going to have to approach this differently. Instead, we'll have pulseaudio direct both to_obs and to_obsmon to your speakers, and will send the audio output of OBS just to zoom, not to any real devices.

So then this is what you need to put in ~/.config/pulse/default.pa. Note that to test this out, you can paste these into pacmd if you want to test things out. Also a reminder that to kill pulseaudio, you can run pulseaudio -k, and then it will re-read your new default.pa when it restarts (which may be automatic for many configurations). In my example, my real microphone is called nt5 and my speakers are called something complicated, so I'll just call them speakers here for simplicity. You'll have to edit accordingly.

Code:
load-module module-virtual-sink master=speakers use_volume_sharing=no sink_name=to_obs sink_properties=device.description=To_OBS

load-module module-virtual-sink master=speakers use_volume_sharing=no sink_name=to_obsmon sink_properties=device.description="To_OBS\ (Monitored)"

load-module module-null-sink sink_name=from_obs sink_properties=device.description="OBS\ monitor\ sink"
load-module module-virtual-source source_name=from_obs master=from_obs.monitor source_properties=device.description=From_OBS

load-module module-echo-cancel aec_method=webrtc source_name=aec_mic source_master=nt5 sink_name=to_obsaec sink_master=to_obs use_master_format="true" aec_args="analog_gain_control=0\ digital_gain_control=1"

Okay, let me break down what is going on here. In the first two lines, we create "virtual sinks." A virtual sink is a sink that just passes audio along to another sink. Why is it useful? Because each sink has its own monitor. So anything you play to to_obs or to_obsmon will just come out of your speakers (because of maseter=speakers, which you will have to replace with the real name of your speakers from the output of pactl list short sinks). But, it will be possible for OBS to distinguish what you've sent to to_obs from what you've sent to to_obsmon.

Next, we create a third sink called from_obs. This is a null sink, meaning pulseaudio will just discard the audio played to that sink. Again, the reason this is useful is that the null sink has a monitor source. Hence, even though the audio will not go to any real audio device, we want zoom to send the from_obs.monitor audio back upstream. The slight problem is that zoom will not give you an option to use a monitor source, because zoom thinks you want to use a real microphone, which should look like a hardware audio device. So this time we solve the problem using a virtual source, which, you guessed it, just copies data from some other source. We create a source called from_obs that just copies audio from the monitor of the from_obs sink, called from_obs.monitor. (Yes, there is both a source and a sink called from_obs.) Zoom will happily let you select the virtual from_obs source even while it hides from_obs.monitor.

Now you have to configure OBS. Under Settings -> Audio, you should configure two desktop audio devices. The primary one will be "To_OBS", and the second one will be "To_OBS (Monitored)" (which are the descriptions of to_obs and to_obsmon respectively). Also in the Audio settings, under Advanced set the monitoring device to "Monitor of OBS monitor sink." Next, in the audio mixer panel, click the gear for any audio source and go to "Advanced Audio Properties". Make sure that "Desktop audio" is set to "Monitor Off," while "Desktop Audio 2" is set to "Monitor and Output." Finally, on your microphone source, you will probably want to click filters and add a Noise Suppression filter (RNNoise). I also add a compressor to mine. Then in the Zoom Audio settings, set "Suppress background noise" to "Low," because now OBS is doing your noise suppression.

So in my experience what I've described so far is good enough to work with zoom, but isn't quite good enough for webrtc-based conferencing systems like google meet. In these systems, people complain that they hear themselves echo, presumably because OBS is inserting delay that messes with the browser's echo cancellation. So if you have that problem, you will need one more trick, which is to do the echo cancellation inside pulseaudio. That's the purpose of the final line in the default.pa snippet above. The way echo cancellation works in pulseaudio is that you have to feed audio through in both directions--it's essentially a virtual source and a virtual sink in one.

Hence, to make use of echo cancellation you need to do two things. First, instead of sending your zoom audio to "To_OBS", you'll want to sent it to "To_OBS (echo cancelled with NT5)" (recall that NT5 is the name of my microphone--it will be something else for you). Second, instead of selecting NT5 as your microphone, you will want to select "NT5 (echo cancelled with To_OBS)". With this, there is only one tiny problem left. Sending your zoom audio to the echo-cancel sink "To_OBS (echo cancelled with NT5)" has no disadvantages--you can just do that all the time. However, there will be a slight degradation in audio quality if you use an echo cancelled microphone. So what you really want to do is send the echo cancelled microphone upstream, while recording your real microphone in OBS.

To record your raw microphone while sending echo-cancelled audio upstream, you need to go into OBS Settings -> Audio and select two microphone devices. For the main mic, choose the echo cancelled source. For Mic/Auxiliary Audio 2, select your raw mic device. Now once again to to Advanced Audio Properties and click "Monitor and Output" (or "Monitor only") for the main Mic (which is echo cancelled). Deselect all the track recordings so you don't record this. Then for Mic/Aux 2 (the non-echo cancelled one), make sure it is set to "Monitor Off" and that recording is selected.
 

frisco

New Member
I know this is a couple months old but its something I need to figure out.
SImilarly I am trying to use OBS as my Mic Audio Source for Zoom as well as play videos with audio from OBS to Zoom. I can get it to work however when I play the video I can't hear it on my end but everyone in Zoom can.
What am I missing to get the audio to be heard by those in Zoom and myself?
And I apologize I don't understand what to do or what steps 2 and 5 are.

I'm breaking this into a second message because my previous message was long, and told you how to set up your audio for zoom, but not how to play a video. There are many ways to do this, but a frustrating issue is that OBS supports only one monitor source. Hence, while what I just describes will send the audio of a media source upstream just fine, you won't be able to hear it yourself, which could be kind of annoying. There are several ways of doing this, so let me tell you mine. Note that I use videos just for short demos where quality doesn't matter. If you are teaching a cinematography class or something where dropping a frame or downsampling video would be bad, then it's possible that this is a suboptimal approach.

I use the mpv command-line video player as follows:

Code:
mpv --x11-name=ForOBS --audio-device=pulse/to_obsmon myvideo.mkv

There are two tricks here. First, it's important that I'm sending the audio to pulse/to_obsmon. This means the audio will be recorded by OBS and also sent upstream to zoom. To show the video, you just run this command and add a "Window Capture (Xcomposite)" source in front of your scene to show the video (this is where you could potentially lose frames or resolution)".

The second trick is that I'm using the --x11-name option to set the X window class name. Many X11 commands let you do this, which is a good way to signal to OBS that you want to show the window. So on my system I just have a single scene for sharing windows and specify which window to show by the command-line. For example, while I seldom show videos, I more often do little command-line demos. I can quickly bring up a terminal with the command:

Code:
urxvt -name ForOBS -fn "xft:Dejavu Sans Mono-21" -geometry 87x25

and now this is what people will see instead of mpv.
 

JustPaul

New Member
I'm feeling a little slow, I apologize but I also thank you for replying such a detailed explanation.

I don't know where any of those codes go or how to do them " "virtual sinks" and such.
Any way to get a dumbed down version of what you explained?
I am needing to figure this out on MAC os Big Sur
I guess what I need to know is What apps do I need - What needs to run and how do I need to set it up?
 
Top