multimedia over network II: pulseaudio

PulseAudio is a sound server. Applications feed music to PulseAudio, and PulseAudio decides what to do with it. For example, it can send the sound over network.

When I tried to use this feature for the first time, I failed. Therefore, I experimented with a more user friendly software (see multimedia over network I, and the second attempt was successful.

Actually, the second attempt is just a building a minimal working system.

My minimal “/etc/pulse/default.pa” looks as the following:


.nofail

load-module module-native-protocol-unix

load-module module-null-sink sink_name=rtp
load-module module-rtp-send source=rtp.monitor destination=127.0.0.1 port=1234 loop=1
set-default-sink rtp

Instead of the recommended way to run PulseAudio as “pulseaudio -D“, I avoid the daemon mode and use the debug mode:


$ pulseaudio -v

Streaming audio (without video) to self:


$ mplayer something.avi -ao pulse -vo null

To hear:


$ cvlc rtp://@127.0.0.1:1234

Again, the second test is to stream to self, but using an external IP. The third test is to stream to another PC.

According to the documentation, the option “destination” is “Destination multicast group for both RTP and SAP packets, defaults to 224.0.0.56”. I suspect it means “broadcast address”, but I’m not sure. For me, it’s enough to stream to just one leisure PC.

Leave a Reply