With yesterday’s release of PipeWire 1.0, I’d like to give some praise to a PipeWire module I discovered a few weeks ago. I have been looking for a solution to stream audio from my computer to my smartphone. As an iPhone user my options are quite limited. On macOS I tested Rogue Amoeba’s Airfoil which is used in conjunction with Airfoil Satellite on the iPhone and probably uses RAOP/AirPlay under the hood. This works and is easily configured from the Mac as well the iPhone. However latency is a problem and not consistent such that manual adjustments have to made every time. And most importantly this is not an option for Linux systems.

With PipeWire version 0.3.76 released in July, two new modules were introduced: vban-send and vban-recv. As documented in the Wiki, the VBAN protocol is currently the only protocol other than Netjack2 that offers low latency streaming and as far as I know has a companion app for iOS (and Android). VBAN is a simple UDP protocol developed in 2015 which not only supports audio streaming but also MIDI and apparently there are already quite a few implementations.1 I wish I had found this earlier.

To enable and configure the vban-send module for PipeWire, I use a drop-in file at ~/.config/pipewire/pipewire.conf.d/vban.conf:

context.modules = [
  { name = libpipewire-module-vban-send
    flags = [ nofail ]
    args = {
      destination.ip = "10.42.0.111"
      local.ifname = "eth0"
      sess.name = "Stream1"
      stream.props = {
        media.class = "Audio/Sink"
        node.name = "vban-sink"
        node.description = "VBAN@iPhone"
      }
    }
  }
]

After restarting PipeWire this adds an output sink, as long as eth0 is up. If you have destination.ip set up correctly and switched your desired application to said sink2, you can then start the VBAN Receptor Lite app on your iOS device and simply click the play button. Note the use of the default setting of sess.name to "Stream1" to make it work with the free version of the VBAN Receptor app, as you can’t change the name in the app. The free version has the additional restriction of muting playback after about thirty minutes until you acknowledge a pop-up, so go ahead and purchase the full version.

So far VBAN works extremely well for me. Latency is pretty much non-existent. Watching videos is no problem, especially considering that I am not just using the iPhone as a speaker but instead have it in turn stream via a proprietary Bluetooth variant to my hearing aids.3 Maybe play around with the network quality setting in the app, if it doesn’t work as nicely. The only remaining issue is that PipeWire fails to load the module if the network device is not up, but a restart of PipeWire is quick and loading the module at runtime is also an option.