dimtpap / obs-pipewire-audio-capture

🔊 Audio device and application capture for OBS Studio using PipeWire
https://obsproject.com/forum/resources/pipewire-audio-capture.1458/
GNU General Public License v2.0
298 stars 9 forks source link

No Audio capture from support.null-audio-sink #44

Closed marvin1099 closed 5 months ago

marvin1099 commented 5 months ago

So i have setup a few virtual devices but none of them can be captured (virt. speakers and mics) So i use this config for virt. speakers in pipewire.conf.d:

context.objects = [
    {   factory = adapter
        args = {
            factory.name     = support.null-audio-sink
            node.name        = "phone"
            media.class      = Audio/Sink
            audio.position   = [ FL FR ]
            adapter.auto-port-config = {
                mode = dsp
                monitor = true
                position = preserve
            }
        }
    }
]

for virt. mics i use the config:

context.objects = [
    {   factory = adapter
        args = {
            factory.name     = support.null-audio-sink
            node.name        = "micmirror"
            media.class      = Audio/Source/Virtual
            audio.position   = [ FL FR ]
            adapter.auto-port-config = {
                mode = dsp
                monitor = true
                position = preserve
            }
        }
    }
]

Here is my obs log: 2024-01-13 10-28-03.txt And here is my pipewire setup, but its a bit messy and complex because i use a gaming and streaming pc and send the audio from the gaming pc to the streaming pc: Screenshot_20240113_103122 As it says in the Title i seams that none of the virtual devices get selected, i can select alsa devices just fine. Well to be exact selecting one of these virtual devices works in the obs plugin gui but it wont spawn anything in the pw graph. Also when i then close the obs plugin gui it reverts to the last setting if a virtual device was selected. There seemed to to a similar issue but I am on ne newest version of this plugin (1.1.2-2; build with the aur package) i also tryed the version 1.1.2 from github. Im on OBS version 30.0.2 (from the aur obs-studio-tytan652). If you need any more logs just say so. Any help is welcome.

dimtpap commented 5 months ago

Try adding audio.channels = 2 in the properties of your sinks

marvin1099 commented 5 months ago

yo mean like this in the config (i will try that):

context.objects = [
    {   factory = adapter
        args = {
            factory.name     = support.null-audio-sink
            node.name        = "phone"
            media.class      = Audio/Sink
            audio.position   = [ FL FR ]
            audio.channels = 2
            adapter.auto-port-config = {
                mode = dsp
                monitor = true
                position = preserve
            }
        }
    }
]
marvin1099 commented 5 months ago

Jep that worked thanks