steveseguin / vdo.ninja

VDO.Ninja is a powerful tool that lets you bring remote video feeds into OBS or other studio software via WebRTC.
https://vdo.ninja
Other
2.74k stars 755 forks source link

Allow for complex input/output audio routing of channels #276

Open steveseguin opened 4 years ago

steveseguin commented 4 years ago

audioroutesrc=3,4&audioroutesink=7,8 for example.

experimentally possible now. compatibility = low

ersheff commented 3 years ago

I made a similar request in #242 . I just wanted to add that many recent budget audio interfaces (like the Audient Evo models and newest Presonus models) have added Loopback features, which are essentially virtual audio channels hosted by the interface (or interface driver). For example, on the Audient Evo 8 I recently got, channels 1-4 are physical inputs/outputs, which channels 5-6 are the Loopback virtual channels.

This makes input/output mapping even more useful as it would completely eliminate the need for using an additional virtual device e.g. Blackhole. I have found that being able to use a single device/driver, rather than an aggregate device with Blackhole on macOS, has been more stable (e.g. can run at lower buffer sizes), and is certainly more convenient to setup.

chrismarquardt commented 3 years ago

you tested that with loopback, right? :D

steveseguin commented 3 years ago

The challenge I ran into so far is that I can only get this all working with Soundflower; other virtual audio devices either try to mix to 5.1 surround or just won't work.

Interesting comment about the new hardware interfaces and virtual inputs. neat.

My thought though is mainly to try to do the channel outputs to OBS, as one of the OBS devs said they could support 8-channels? It be a neat way to do recordings if each guest had their own channel in the final recording. If I can make OBS.NInja compatible with that, I think it is worth the time to pursue this sooner.

I also have a surround-sound microphone, and I would love to do selective speaker with live video; I just need to get the ~4 microphones or transfer correctly in. So far chrome crashes when I try it to transfer that over oBS.Ninja

ersheff commented 3 years ago

Sorry, I should specify that the Loopback functionality being added by audio interface manufacturers isn't the same as Rogue Amoeba's Loopback software. People like Audient and Presonus are just calling their extra virtual channels the "Loopback" channels.

I do wonder though that if what you've already tried would work in this scenario, considering that no other devices/drivers are involved?

I'll describe the setup I've been using - I'm using Max (audio software by Cycling 74) to do live-stream performances with friends in other states. The 4 of us join the same OBS.Ninja room with stereo flag for high-quality audio. We all hear/see each other in the OBS.NInja room (our individual view windows), and we load the scene view into OBS Studio for live-streaming.

From Max, I route my audio to output channels 1-2 locally on my Audient Evo so that I can hear myself with minimal latency (goes to the audio interface physical outputs), then using aggregate device functionality in macOS (which combines the Evo with Blackhole), I route the same signal to channels 7-8, which correspond to Blackhole 1-2. Then, of course, Blackhole is the input device in the OBS.Ninja room.

What input/output routing in OBS.NInja would allow me to do is forego the aggregate device altogether and just use the virtual Loopback channels of the Evo. So, in Max, I would still send my local monitoring audio to channels 1-2, mirror the same signal to 5-6 (the Evo Loopback channels), and in OBS.Ninja I would select the Evo as my input device, but the input channels would be offset to use 5-6 instead of the default 1-2.

If you have this only working with Soundflower in a beta version, I would be happy to test it with the Evo's virtual Loopback channels in the next week.