OBS -> Audio -> Zoom on Ubuntu

Jack.Hubbs

New Member
I have the Ubuntu 20.4 and ver. 26.whatever (latest) of OBS. It took a little bit of time to get video output from OBS to be a virtual camera input to Zoom. What I am having trouble with is getting sound to go from OBS to Zoom and out to meeting watchers. This is a one way trip, I have no need to receive sound back from Zoom to OBS. For my church I have speakers and music videos to display and it is not sounding very good right now (from church speakers into mic picked up by Zoom). Any help would be appreciated.
 

emptythevoid

New Member
If you're broadcasting pre-recorded media out of OBS, this should help. In a terminal, run these commands to set up a virtual speaker sink:

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

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

Now open OBS. Go to Settings->Audio. Under Advanced, set Monitoring Device to "Monitor of Virtual-Speaker." I also set Desktop Audio 2 to Virtual-Speaker, but I'm not sure this is required. Start your v4l2sink like normal.

In Zoom, set your Microphone setting to be "Remapped Monitor of Virtual-Speaker." This should do it, provided the rest of your audio settings are correct in OBS.

I've tried using this to also pipe a microphone through OBS first, and then to Zoom, and that introduced a lot of latency. If, for some reason, you need to switch to an actual microphone, do it within Zoom.
 

frisco

New Member
If you're broadcasting pre-recorded media out of OBS, this should help. In a terminal, run these commands to set up a virtual speaker sink:

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

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

Note that for the second line, since you don't actually need to remap any channels, it's simpler just to use a virtual source:

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

emptythevoid

New Member
Note that for the second line, since you don't actually need to remap any channels, it's simpler just to use a virtual source:

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

Noted. These instructions were left over from when I was trying to get the mic to pick up as an output from OBS and that was a bit of a mess. Thanks.
 

buggydad

New Member
Thanks! This worked great for me. In case anyone else is trying this configuration, here are two additional steps that I needed to do to get it to work:

1. Go to Settings>Audio>Advanced>Monitoring Device and change to Monitor of Virtual-Speaker
2. Go to Mic/Aux (or whatever your audio source is)>Settings>Audio Monitoring and change to Monitor Only
 
My system stopped working. I was using Ubuntu 20 LTS, and OBS. Last week software updates for Zoom and Ubuntu, maybe OBS too.

And my audio link to Zoom is dead!

My first thought was its a software issue, and its time I upgraded to Ubuntu 22 LTS. But that made no change.

My original ~/.config/pulse/default.pa file:
Bash:
# include the default.pa pulseaudio config file
.include /etc/pulse/default.pa

# null sink
.ifexists module-null-sink.so
load-module module-null-sink sink_name=Source
.endif

# virtual source
.ifexists module-virtual-source.so
load-module module-virtual-source source_name=VirtualMic master=Source.monitor
.endif
d

Which has worked fine for a couple of years. On a hunch I followed the setup on this thread, changing my file to:

Bash:
# include the default.pa pulseaudio config file
.include /etc/pulse/default.pa

# null sink
.ifexists module-null-sink.so
load-module module-null-sink sink_name=Virtual-Speaker sink_properties=device.description=Virtual-Speaker
.endif

# virtual source
.ifexists module-virtual-source.so
load-module module-virtual-source source_name=Remap-Source master=Virtual-Speaker.monitor
.endif

And this works!

I swear the volume is not as loud as before. We have a USB cable from the QU-24 into our Ubuntu Video control computer. Linux loads a USB driver - maybe that was updated too? Because I saw a couple of differences in the system before I upgraded to 22. Namely, Audacity could not use the QU as a source - it used to. And in Zoom, when I selected the QU as a microphone, I got some faint sound - dead silence before. In fact, that was why I routed it through OBS - so I could apply a 24 db gain to the QU input signal.

I post this here to help others, but if you know something more that would help me (and others) please post.

Thanks in advance,
Richard Cooke
 

rcooke

New Member
I create a small project based on @Broadways8701 proposal. I hope it works for you.

https://github.com/mauroalderete/virtualmic-pulseaudio

I have been using this solution these days for my work meetings using obs to generate the virtual camera together with the audio monitor and it works great.

I will try out your script, or maybe just steal a couple of lines! Either way, I thank you for your input!

I am the "St. Paul's Ajax Volunteer" who wrote the earlier posts.

Another chapter of my sordid story. A week or so after my last post, where I mysteriously got my sound worknig by making slight changes to my configuration, it stopped working again!

This time I dug deeper and found I had plugin issues with NDI - which is critical to us. To get that working, I had to switch to the latest OBS (29.1.1) but roll back the NDI plugin until OBS stopped crashing on startup (version 4.5.1). I also upgraded the OS to Ubuntu 22.04.2 LTS. That upgrade seemed to cause a problem forcing me to roll back NDI versions.

I am still using my Pulse config above. That is letting me get my OBS audio output into ZOOM. Although I have noticed two things since I updated the OS:
1. Zoom can now directly use the QU-24 USB outupt as a MIC input. It seems the QU USB driver has a new audio boost in it. In Zoom you still have to enable auto volume so Zoom can boost it more. The result is still "soft" though. When I first started this, we needed a 26 DBI boost in OBS. Now we only need 15 DBI. Maybe even 10 would work.
2. Something is causing the occaisional "logoff" of the active user! At first I thought the whole OS was crashing, now I can see its "crashing" the X-Window server, which closes all active apps, and logs out.

By some experiments I found out one fast way to cause the crash is to increase the quality level of the recording in OBS. If I change it to record the full resolution my camera puts out even at 30 FPS, the CPU % heads to 99% as soon as I hit RECORD. And then it crashes - presumably when it hits 100% on one or more cores.

I turned it down to HD recording 1280x720 30 FPS, 500 Kbits variable data rate. This seems to be more stable, but I just got a crash today while recording. So something else might be going on.

What I need some help with - unless this is what "virtualmic-pulseaudio" is for - is to get the local computer headphones fully working. The goal is to be able to HEAR what participants in Zoom are saying, and be able to talk to them.

I got the last part working, just had to activate the local headphones MIC in OBS, and now it can be used to talk to the zoom crowd. But when I tried to get the sound from zoom playing in the local headphones, every combination of settings, would result in CUTTING OFF my OBS sound out to zoom!

This might be eaiser if there was a way to control exactly WHAT audo device OBS sends its sound too. I get the impression its trying to use whatever the OS is set to. But does not always track that setting right.

Or maybe the "only" way to is create another virtual device for the return audio? Somethig zoom can play into, and I can use the OS to monitor in headphones?
 
Top