Claas' Blog

PulseAudio RTP Home Setup

CLAAS VONDERSCHEN
-

PulseAudio is an application for proxying audio from applications to the hardware on POSIX OSes. It can do numerous transformations on the audio and supports extensions via modules. The software supports sending audio streams over RTP. Multipe sending and receiving parties are allowed, which is ideal for a home audio system spanning several rooms.

In our basic setup, there is one sending computer and one receiving computer. The goal is to have synchronous audio output on both computers.

Setting up the receiver

Load the rtp-receive module on the receiving party:

pacmd load-module module-rtp-receive

Setting up the sender

Load a null sink on the sender:

pacmd load-module module-null-sink sink_name=rtp sink_properties="device.description='RTP'"

This sink is used by applications for sending audio via RTP.

Load the rtp-send module:

pacmd load-module module-rtp-send source=rtp.monitor loop=1

The sound is looped back, so that we can receive it in the next step:

pacmd load-module module-rtp-recv sink=@DEFAULT_SINK@

Receiving the audio via RTP on the sending computer ensures, that the audio is synchronous across all devices.

Use the rtp sink for your application’s audio, which you want to share:

pacmd list-sink-inputs
pacmd move-sink-input SINK_INPUT_ID rtp
TAGS: