-
-
Notifications
You must be signed in to change notification settings - Fork 198
Add VBAN Receiver plugin provider #2498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
|
Sending some 🎁 os your way! Your PR looks good to me, just waiting for you to address the todo's before merging. |
|
Marked as draft as there are still some TODO's left - please hit the "ready for review" button once you are ready with the PR. |
|
FYI: The optimizations to handle PlugInSource in MA are now merged in dev. For point 3 I'll see what we can do. |
|
Thanks for the heads-up, been trying out the latest changes. 2.7.0b5 On 2: First transition from MA -> plugin source, it works ok, audio plays first time and plugin is shown as active source in UI. After that:
Can supply logs if required but I think squeezelite is your test player anyway so should be reproducible. On 3: 👍 On 4: Due to the UI bug with 2. I haven't been able to test the new changes fully yet with my plugin. |
|
Tried things out with the vban plugin this time. vban sender/receiver/PluginSource.audio_format all set at 44100/16. Don't know if the intent is for MA to output at the same rate as the source to save conversions, but it's using the highest supported sample rate as set in the player's settings. When MA's final output format is using a higher sample rate than the source, the audio plays slowed down. |
This PR is a plugin provider to allow MA to act as a VBAN (PCM over UDP) protocol receiver:
https://vb-audio.com/Voicemeeter/vban.htm
https://vb-audio.com/Voicemeeter/VBANProtocol_Specifications.pdf
Use case
Stream whole system or per-app audio into MA as a kind of network AUX input.
Requirements
A VBAN sender.
Their website has some very advanced apps for routing Windows system audio over VBAN, which I still need to try dabbling with. In the VBAN Receiver plugin settings, match the stream configuration settings.
Pipewire-based systems have vban_receive/vban_send modules https://docs.pipewire.org/page_module_vban_send.html.
Testing
I've been using pipewire which is working well, so testing is focused on this method. A couple of pipewire config files are required, one to set up the vban sender and the other to prevent the output sink for squeezelite changing on pipewire events.
~/.config/pipewire/pipewire.conf.d/01-vban.conf
~/.config/pipewire/pipewire-pulse.conf.d/squeezelite-static-target-object.conf
The vban_send module creates an audio sink, available as an audio output in the desktop enviroment sound manager for routing whole system or per-app audio to.
Alternatively, start an instance of squeezelite, setting -s option to the dev server:
/usr/bin/squeezelite-pulse -o vban-sender-aiovban -n VBANsender -s localhost -m 01:00:00:00:00:01This squeezelite MA player will now function as a VBAN sender for plugin testing - whatever is played is converted to VBAN packets and loopbacked to localhost:6980 for reception by this PR's plugin and out to any standard MA player.
Use a standard MA player to listen: player's UI burger menu entry: Select Source -> VBAN Receiver. Due to MA buffering there will be a good few seconds of delay before audio is heard.
Of course to really test it out, best try starting the sender on another device and check performance over the LAN (change destination.ip in 01-vban.conf and -s option in squeezlite). I started a sender on my prod MA server and used the VBANsender player to stream VBAN to the VBAN Receiver plugin on my dev server - takes a bit of UI juggling and can get a little confusing sometimes when debugging issues 😃
In my testing it's working well over wired and wifi, but obviously every network is different so YMMV.
qpwgraph is a GUI pipewire graph manager which is very useful for visualising and patching pipewire nodes, as is 'wpctl status/inspect' cli command.
Issues
The plugin is multi instance, but due to how the underlying aiovban module currently works with MA, each instance must have a different Sender IP address and UDP port configured in the plugin settings, so no using multiple VBAN stream names from the same sender IP. Working on a fix in aiovban.
At least with squeezelite players, selecting the plugin as a player's source will play the audio stream, but the frontend UI will not reflect this or show the plugin as the active source. The WS msg
player_updatedshows the player's active_source is still the player_id mac, not the plugin's source_id. In 2.7.0b3 the spotify connect plugin also has this issue now, so maybe a regression from recent refactoring?If a plugin is in use by player1, MA UI will show the plugin as selectable for player2, but MA server checks and prevents this. I think for this kind of plugin it would be nice to allow player 2 to become the active listener and kick player1 out.
Audio delay between initiating playback and hearing the audio. I read the Discord comments re: possibility of reducing delays in MA's PCM handling for the local audio plugin proposal, so that would be very welcome and appreciated here too!☺️ , any improvements on lowering MA's PCM processing audio delay would be sweet!
I've used VBAN to watch a video and stream the app audio out ceiling speakers with imperceptible lip sync issues, which was pretty nice. This was using pipewire to link the output of the VBAN receiver source node direct to the HW sink for minimal delay though. Instead of fiddling on the cli it would be great to use the MA UI to select the plugin source for a player and have MA switch to a low delay "raw" pcm mode. Probably have to mess with buffers on the squeezelite side too. Anyway, the video application is a niche use case within an already niche plugin
The large list of supported VBAN PCM sample rates in the plugin configuration UI is grabbed from the aiovban source - not sure if these should be paired down to a subset compatible with MA?
Todo
Docs
Plugin icons