[pulseaudio-discuss] paprefs port setting

NicoHood pulseaudio-discuss at nicohood.de
Mon Oct 31 14:02:32 UTC 2016


Hye,

I am currently actively using pulseaudio for streaming audio over
network. I found RTP the most promesing method for me. However there is
a problem I ran into which I'd like to solve. I've also prepared a
possible solution.

My goal is to stream music via RTP and paprefs. Quick setup on the
sender side and quick setup on the receiver side if also pulse+paprefs
is used. Now my receiver is a raspberry pi which uses kodi + alsa as
pulse is too slow on it for some reason (general lag, even for local
playback). But kodi also can playback an RTP stream directly:

Create a file named pulse.strm with the content: rtp://@224.0.0.56:46400
Now the problem is that the port always changes, as paprefs does not set
any specific port. The module it uses is module-rtp-send:
https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#index38h3

I am wondering if you can set the default port for this module globally
via config file. If not the only way to fix this issue is to provide a
way for paprefs to use a fixed port. Due to the fact that the source
port is always random and the pulse sink listens to all ports it would
not matter much if the sender would always send with a fixed port. Using
a fixed port is simple to patch and works for me:

Just change line 537 of paprefs.cc to the following:

changeSet.set(PA_GCONF_PATH_MODULES"/rtp-send/args1",
Glib::ustring(loopbackEnabled ? "source=rtp.monitor loop=1 port=46400" :
"source=rtp.monitor loop=0 port=46400"));

Now paprefs creates a sender with the same port. You may want to use a
different port, but basically that'd solve the problem. And existing
setups would still work.

Is there a way to get this fix applied? Or are there any other
suggestions? FYI: the same also applies to vlc playback, not only kodi.

Cheers,

Nico



More information about the pulseaudio-discuss mailing list