Closed ParasiteDelta closed 1 year ago
That does sound like a niche use case and I find it a bit improbable that I would implement it into pipeswitch as it would probably involve quite a bit of work, and I'm not sure how wanted this feature would be outside of this specific use case. Fun idea though!
I do streaming myself with OBS as well, and it is actually what prompted me into developing pipeswitch in the first place, but instead of everything by default going into OBS and then being selectively discarded, I pipe everything by default to just my physical audio sink, and then have separate rules for the specific applications which I want routed into OBS.
This has worked well for me because then I can also create separate Jack Input clients for ie videogameinput
and musicinput
, or firefoxinput
etc. which I can then switch based on the scene I'm currently on. Ie. here is my link for video games:
[link.games]
source = "elden ring.*|world.*of.*warcraft.*|.*star.*wars.*|gow.*|terraroa.*|Beat.*Saber.*|.*dorfromantik.*|.*witcher.*|.*lego.*|AShortHike|FMOD Ex App|Fallout"
sink = "videogame.*"
This ends up being quite a hefty list and hard to maintain in the end, which is why I've created issue #5 to make it a bit easier when I have the energy.
I can understand that this would be a hassle if you're very often switching the applications that you would like to stream audio from, which does sound like a difficult problem to solve. Do application-specific default audio-sinks not work for this? Thanks for your input anyhow!
Well, that was fast.
True, default program-specific sinks would work, but the main issue was that any new program stream would automatically connect to the sink set as the default AND whatever sink specified in Pipeswitch. True, I'm pretty sure I can tell Wireplumber or Pipewire to not automatically route the audio for a given list of programs or streams, but then it becomes a matter of which service runs first.
The overarching issue is that this specific layout with virtual sinks that I'm using is what I'm used to coming from Windows and Voicemeeter Potato, where you have three virtual I/O devices and you can set one of them as your default while manually piping specific applications to the other two either from the program's audio settings or from the Windows mixer. Janky, but it worked. However, after reading about your setup, I feel pretty stupid for not implementing it that way in Linux, where only set audio goes to OBS rather than omitting specific audio.
Either way, thanks for your patience and help. Knew it was a stupid question.
So, I'm guessing that it's a bit out of scope or is otherwise not doable, knowing my luck, but I cannot find a single lead for this even in documentation for Pipewire and Wireplumber, and this program is exactly what I need, so I figured I would pose the question here:
Is there any way to, when Pipeswitch matches a source, purge the existing connections for that source (in Helvum or pw-viz, simply disconnecting the wires from the source to the sink), then connect that source to the target sink? The closest thing I've found is maybe using Wireplumber, but that requires that the Wireplumber match run before the Pipeswitch match, which is either tricky or inconsistent.
The goal is to get a basic setup for split audio with OBS on Linux, where the main audio (the majority of all programs) goes to a virtual sink (VS-a, for clarity) and would ideally be the system default for audio. Select programs, such as Spotify, FreeTube, etc, would go into a different sink (VS-b) and be omitted from the audio in OBS. However, both sinks would go to my physical audio interface. The current problem is that setting VS-a as my default makes (in example) Spotify route to both VS-a and VS-b, with -a being default and -b due to the routing via Pipeswitch. I cannot find any kind of inherent functions or keywords that might work, let alone what might be implemented here, so I was just wondering if I was overlooking something, or if that is even possible.
Great software, simple and straightforward, so sorry if this is a stupid question. It's about 07:00 at the time of writing, so my brain's gone. Keep up the good work.