Skip to content

Instantly share code, notes, and snippets.

@savegame
Last active May 23, 2024 04:57
Show Gist options
  • Save savegame/58ae5966c58a71fda5d3800b335eb2f5 to your computer and use it in GitHub Desktop.
Save savegame/58ae5966c58a71fda5d3800b335eb2f5 to your computer and use it in GitHub Desktop.
PulseAudio / PipeWire streaming audio from Client to remote PulseAudio / PipeWire Server

We have Server machine, this computer with Headphones, and we have Client computer, this is remote PC with music =) On Server we should first open port for listening connections from Client :

# on ubuntu 
sudo ufw allow from <Client_IP> to any port 4656 proto tcp
# on fedora ( with firewalld ) 
sudo firewall-ctl --add-port 4656/tcp

note: port 4656 just for sample. you can use any port you want
than on Server, from current user add listening for connections

pactl load-module module-native-protocol-tcp port=4656 listen=<Server_IP>
Note: set real IP for listening, not localhost or 127.0.0.1, its should be IP avaliable from Client

then on Client add sink to remote Server

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

than, you should chose right output on Client, in KDE it looks like изображение
you can use pavucontrol for this too

Update from comments :
maybe add anonynous authorisation helps (thanks to @raldone01)

pactl load-module module-native-protocol-tcp port=4656 listen=0.0.0.0 auth-anonymous=true
@ModProg
Copy link

ModProg commented Apr 18, 2023

With pipewire there is a new player that in my experimentation worked quite well pipewire-roc:
https://gavv.net/articles/roc-tutorial-0.2/#linux-desktop-pipewire

@raldone01
Copy link

I had to add auth anonymous: pactl load-module module-native-protocol-tcp port=4656 listen=0.0.0.0 auth-anonymous=true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment