8

Recently I have fully switched from pulseaudio to pipewire. Everything is great except that the documentation is not too clear on how to setup network streaming.

My goal is:

  • Stream microphone audio from the main system to the secondary one
  • Get the audio output from the secondary and stream it back to the main.

Many people point me to Pipewire Docs, but they have 0 to no explanation of what those commands actually do.

What I tried:

Creating file ~/.config/pipewire/pipewire.conf with the contents of /usr/share/pipewire/pipewire.conf on both machines.

Adding this module to the main machine:

{   
    name = libpipewire-module-roc-source
    args = {
        local.ip = 0.0.0.0
        resampler.profile = medium
        sess.latency.msec = 5000
        local.source.port = 10001
        local.repair.port = 10002
        source.name = "ROC Source"
        source.props = {
           node.name = "roc-source"
        }
    }
}

Then adding this module to the secondary machine:

{   
    name = libpipewire-module-roc-sink
    args = {
        local.ip = 0.0.0.0
        remote.ip = 192.168.0.xxx
        remote.source.port = 10001
        remote.repair.port = 10002
        sink.name = "ROC Sink"
        sink.props = {
          node.name = "roc-sink"
        }
    }
}

This configuration works and creates an output sink on the secondary machine and input on the main, but it doesn't have any way to stream other devices and latency is just unusable.

I am not sure if roc is the way to go in this case so please correct me if I am wrong.

Using Arch Linux with pipewire-full-git roc-toolkit pipewire-full-roc-git on both machines

2 Answers2

6

Answer from here gist.github.com/savegame/pulse_sreaming.md

on Server, where headphones connected

pactl load-module module-native-protocol-tcp port=4656 listen=<Server_IP>

on Client where music play

pactl load-module module-tunnel-sink server=tcp:<Server_IP>:4656
-1

I was looking for a similar setup. I have virtual machines in KVM which I wanted to connect to pipewire.

I ended up by using a locally bridged network and connected PulseAudio on the VM over the bridge to pipewire's PulseAudio socket.

However I think it should be possible to do this with the module Protocol Simple or maybe with the module Protocol Native and expose it with socat.

muken
  • 1