Soundcast between Linux

Is there any easy way to cast sound from my F34 notebook to be output by Ubuntu desktop host or Raspberry Pi in the same network?

Sometimes I want to watch a video or presentation with a good HD audio and instead of plugging the wires it would be much more convenient to send the audio stream with minimal latency over LAN.

2 Likes

It looks like you should be able to configure pulseaudio and avahi on your Ubuntu/Raspberry Pi systems so that they will advertise a TCP sound device that will show up in gnome-control-center:

I haven’t tried it.

Fedora had switched to PipeWire. I haven’t found any instruction how to do that with PipeWire, so going with PulseAudio seems the only choice. Going to try this one. Thanks.

Sorry, I don’t know much about it. There is however, a publications about PipeWire scheduled for tomorrow on Fedora Magazine: PipeWire: the new audio and video daemon in Fedora Linux 34 - Fedora Magazine (you might have to sign in on the site with your FAS account to follow that link).

In the article, Wim Taymans appears to suggest that GStreamer’s RTP and RTSP should be used for that sort of thing on PipeWire-based systems.

You might ask about it in the comments section of the article tomorrow since it is mentioned in the article.

I don’t see RTP and RSTP are being mentioned in the article, and it is not clear for me how to route audio to server with speakers.

Meanwhile I found this open PipeWire issue.

This is the section of the article that I was referring to. It is quite possible that I am misunderstanding what he saying though.

CS: You are also the creator of GStreamer, how do you see the two projects in terms of use cases?

WT: I see PipeWire as a much lower-level framework to move data around between apps and devices. It’s very good at handling raw audio and video and interfacing with devices. It’s not so good at muxing and demuxing and it does not want to do some of the higher level multimedia tasks such as implementing an RTSP server or handle transmuxing formats. GStreamer still remains ideally suited for those higher level tasks, muxing, demuxing, encoding, decoding, etc.

Play media over network (#865) · Issues · PipeWire / pipewire · GitLab got fixed with an instruction on using pulseaudio modules in Add Avahi zeroconf publish module (!756) · Merge requests · PipeWire / pipewire · GitLab

On playback server.

pactl load-module module-native-protocol-tcp port=9999
pactl load-module module-zeroconf-publish port=9999

On client.

pactl load-module module-zeroconf-discover

And it looks dangerous to run the native protocol without some kind of auth Modules – PulseAudio

Not sure what native Pulse Audio protocol could do. I’d prefer an unauthenticated server that can only play audio transmitted to it, but now I need also to research possible attacks on PulseAudio native tcp server and how to protect from them.

The solution could work, but now my paranoia hits in, and I want a more secure solution, so I opened new issue.