CatxFish / obs-virtual-cam

obs-studio plugin to simulate a directshow webcam
https://obsproject.com/forum/resources/obs-virtualcam.539/
GNU General Public License v2.0
1.75k stars 341 forks source link

OBS-audio doesn't work properly in second OBS instance #50

Open Robyer opened 5 years ago

Robyer commented 5 years ago

Hello, I'm using your plugin to stream to 2 different services via 2 separate OBS instances. In OBS#1 I have my main stream and I wanted to output it's video+audio into OBS#2. Video works correctly as expected, but there are problems with capturing the audio.

I just added OBS-cam source to the OBS#2 and I see correctly the video and also I see the audio item of this OBS-cam source in mixer panel. But it doesn't output any sound into stream/recording. I don't even see the volume bars changing in mixer, so it seems there is no audio being received.

I looked into OBS#2's Settings / Audio and tried to select OBS-Audio in Desktop Audio Device or Mic/Auxillary Audio Device but it isn't there, there are only my real audio devices. Strange is that I see OBS-Audio in the OBS-cam source's properties (see next paragraph).

Then I opened OBS-cam source properties, and checked "Use custom audio device" and here I selected "OBS-Audio", pressed OK. At first it started showing the volume bar at maximum (which was wrong, seems like issue #47 ), but after stopping and starting again the VirtualCam in OBS#1 it started showing the volume bar correctly as it should. But in stream/recording is still no sound.

Weird is, that when I tried in OBS-cam source properties set Audio Output Mode from Capture audio only to Output Desktop Audio, it correctly started playing the correct sound from my speakers. Which means OBS#2 is receiving the audio and can process it, but for some reason it just won't use it with streaming/recording. Also note that when I selected *Output Desktop Audio", it stopped showing changes in volume bar again for the OBS-cam's source in mixer.

Am I doing something wrong or can this issue be fixed in the plugin? I'm using latest OBS Studio version 23.1.0 (64-bit) and obs-virtual-cam 2.0.3.

CatxFish commented 5 years ago

You don't do anything wrong. That is the current setting of this plugin. There are only 4 sink video device but only 1 audio sink device , so if the second instance find the sink device is occupied, it will just choose to stop working.

I know it's not make sense, but the multiple sink video is designed for the virtual-filter not for the multi-instance. So I don't do any modifications on audio , that is why you have this issue. Unfortunately currently I don't have many time for my side projects , so you may not see a workable version soon.

Robyer commented 5 years ago

@CatxFish I think you may misunderstood my "second OBS instance" title. It's okay that there is only single audio device provided as I don't want to use it in more than one "consumer".

I have OBS#1 with obs-virtual-cam plugin as producer and OBS#2 without obs-virtual-cam plugin as consumer. But problem is that sound isn't present in the stream/recording in OBS#2 no matter how I tried to set it. Please re-read my issue description to see that there might be something wrong either in plugin or in OBS Studio itself.

CatxFish commented 5 years ago

In that case, the audio still have some issues needs to solve. It looks like a timestamp issue on #47, it might be the same situation you are facing , but I haven't resolve it yet.

I think maybe you can use obs-ndi for this purpose .

Robyer commented 5 years ago

For now I solved it by using VB-CABLE Virtual Audio Device, configuring OBS#1 to use it as monitoring device in Advanced Settings and then enabling monitoring for all my audio sources in OBS mixer. Then in OBS#2 I just used VB-CABLE as audio input.

This works correctly, but it would be much simpler if OBS-audio from obs-virtual-cam was working correctly. Thanks anyway, at least the video from obs-virtual-cam is working good :)