toadjaune / pulseaudio-config

Scripts and notes for custom pulseaudio configuration
GNU Affero General Public License v3.0
240 stars 28 forks source link

Latency increases over time #2

Closed roblem closed 4 years ago

roblem commented 4 years ago

Hi,

On Fedora 32 and have a simpler setup where I am trying to output audio (along with a loopback webcam) from obs-studio to zoom (or any chat app) for creating a virtual webcam for teaching university classes. So the flow for the audio is:

microphone -> Obs Studio -> virtual_sink -> virtual_source -> zoom

I like going this route because I can add noise reduction filters, etc in obs studio before passing into zoom. But the problem I describe at the end occurs even with filters off. But the biggest reason, is that I get sync'd audio and video out of my virtual webcam without fiddling with offsets....for awhile that is.

This sets up the sink and source:

pactl load-module module-null-sink sink_name=Virtual_Sink sink_properties=device.description=Virtual_Sink
pactl load-module module-virtual-source source_name=VirtualMic master=Virtual_Sink.monitor source_properties=device.description=VirtualMic #virtual mic for zoom

Then in Obs Studio, I choose to "monitor" the Virtual Sink and in Zoom, I choose the VirtualMic. It works perfectly for awhile. At some point (usually after 5-20 minutes), I begin to notice that the virtual sink visually lags (via an audio mixer) my actual voice output by at least a second. When I view the recorded zoom session (zoom is recording), I see perfectly sync'd audio and video and then ridiculous lag after some minutes pass by. The only way to fix this is to restart the computer.

This happens whether zoom is connected or not. I realize you are sharing your config and not doing technical support but am curious if you ran into issues like this.

roblem commented 4 years ago

Apologies, after further digging a known Obs Studio issue. So closing.