obs-pipewire-audio-capture
obs-pipewire-audio-capture copied to clipboard
Capture problems for devices with multiple ports
TL;DR: Something is not working correctly when attempting to capture multiple disjoint audio streams from a single multiple port audio interface, in particular I get a mix of all the audio received by the pipewire sinks configured for the device in some capture sources. The audio streams are indeed disjoint when correspondingly recorded in Audacity.
I'm using OBS 30.1.2 and the 1.1.4 binary release of the pipewire audio capture.
The interface (Berhginer UMC404HD) has 4 input and 4 output ports, which appear in Pipewire as:
- inputs/sources
- capture_FL (input 1 on interface: mic 1)
- capture_FR (input 2 on interface: mic 2)
- capture_RL (input 3 on interface: line in 1)
- capture_RR (input 4 on interface: line in 2)
- monitor_FL (output monitoring)
- monitor_FR (output monitoring)
- monitor_RL (output monitoring)
- monitor_RR (output monitoring)
- outputs/sinks
- playback_FL
- playback_FR
- playback_RL
- playback_RR
My goal is to recreate my jack setup; 4 sources corresponding to a stereo mic pair (through filters, and direct) and a stereo line input (through filters and direct) which are captured in 3 audio streams in the output video: a mix of the filtered mic and line audio, and a stream each for the unfiltered mic and line audio.
To do this I create 4x Pipewire input sources, all with the same device selected (UMC404HD 192k). This results in 4 new Nodes in the Pipewire graph (viewed with qpwgraph),"OBS Audio Capture [OBS]" and co. By default they each have 4 audio sources (monitor_{FL,FR,RL,RR}) and 4 audio sinks (input_{FL,FR,RL,RR}) which are connected to the corresponding "capture_" sources from the audio interface; in this configuration, all 4 sources receive the same audio (a mix of all 4 inputs) as one might expect, but this is not what I want, I therefore disconnect all the links to the OBS Audio Capture nodes and reconnect as follows:
- Filtered mic pair
- Interface capture_FL -> OBS Audio Capture [OBS] input_FL
- Interface capture_FR -> OBS Audio Capture [OBS] input_FR
- Raw mic pair
- Interface capture_FL -> OBS Audio Capture-1 [OBS] input_FL
- Interface capture_FR -> OBS Audio Capture-1 [OBS] input_FR
- Filtered line in pair
- Interface capture_RL -> OBS Audio Capture-2 [OBS] input_FL (same behaviour if I use input_RL)
- Interface capture_RR -> OBS Audio Capture-2 [OBS] input_FR (same behaviour if I use input_RR)
- Raw line in pair
- Interface capture_RL -> OBS Audio Capture-3 [OBS] input_FL (same behaviour if I use input_RL)
- Interface capture_RR -> OBS Audio Capture-3 [OBS] input_FR (same behaviour if I use input_RR)
If I look at the Audio Mixer volume meters (or correspondingly the audio in a recorded video), my filtered mic pair and raw mic pair both capture only the mic audio. The filtered line in pair and raw line in pair both capture the line audio and the mic audio.
My hope is to get to the bottom of the problem, and potentially see a more refined configuration mechanism to allow the routing to be part of the OBS configuration (vs me having to wire things up using the pipewire command line, or qpwgraph).