[pulseaudio-discuss] Network stream for multiple pulseaudio sessions

Colin Guthrie gmane at colin.guthr.ie
Fri Apr 3 08:16:21 PDT 2009


'Twas brillig, and Andrea Martino at 03/04/09 15:54 did gyre and gimble:
> Hi all, I would like to use multiple instances of pulseaudio to
> capture applications' sound outputs (without redirecting it to the
> local speakers) and to stream them on the network, and I would like
> to hear your comments.

Sure, I'll try my best.

> My idea is to create multiple pulseaudio daemons (one for each user
> on the host) and to start sound-aware applications for each user
> using a separate pulseaudio instance (maybe using padsp in the
> command-line)

OK, each user having their own deamon is the intended setup so this is 
definitely not a problem.

Whether a users client audio app uses padsp is pretty irrelevant. 
Provided their app can talk to pulse, that is all that is needed. This 
can be an OSS app in combination with padsp or an alsa app via the 
alsa->pulse plugin or an app that support pulse natively.

> Then I would like to "forward" all the audio streams to a second
> server, that could maybe store them to disk or play them through the
> speakers). I read that pulseaudio supports RTP multicasting (with the
> module-rtp-send module), but I think this will not work in my case.
> 
> How could I forward all the audio streams to a given server?

OK, that is not a problem. Pulse support "tunnelling" via 
module-tunnel-sink. This allows you to create a sink for the user that 
actually opens a client connection to another pulse instance. It should 
be possible to configure each users pulseaudio daemon to only load a 
single sink, module-tunnel-sink, which connects to your specified pulse 
instance.


> How could the listening server get the "user-id" for the streams?
> (the server has somehow to match the streams with the users)

This is (AFAIK) not possible, but it should be fairly trivial to modify 
the module-tunnel-sink to make it add a "user" property to the proplist 
is uses when it opens it's stream to the server. The server will then 
know this info.

> In case I would like to program the backup server on my own (maybe in
> Java), what encoding/container options are supported? (For my needs
> uncompressed PCM would be enough, since the local LAN is fast enough
> for several streams)

Not really sure what you mean here, are you saying you want to implement 
a server system compatible with pulseaudio protocol? I wouldn't bother.. 
I'd just code a module (in C) for the server and work within the framework.

> Any advice or comment is welcome Thanks a lot Best regards Andrea

Hope this info helps.

Take care

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
   Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
   Mandriva Linux Contributor [http://www.mandriva.com/]
   PulseAudio Hacker [http://www.pulseaudio.org/]
   Trac Hacker [http://trac.edgewall.org/]




More information about the pulseaudio-discuss mailing list