Ticket #72 (new enhancement)

Opened 1 year ago

Last modified 1 year ago

Unicast RTP

Reported by: s2156945 Assigned to: lennart
Priority: normal Milestone:
Component: module-rtp-* Severity: minor
Keywords: unicast rtp Cc: pulse@wood.id.au

Description

RTP is only implemented in multicast.

Implementing Unicast RTP would be a great way of getting audio through non multicast friendly environments such as office networks where the users don't control the routers.

Change History

04/02/07 07:39:46 changed by s2156945

  • cc set to pulse@wood.id.au.

04/02/07 08:25:23 changed by ossman

Why not use the native protocol in such cases?

04/02/07 08:59:34 changed by s2156945

I using pulse to extend an audiorouting application using jack across the network.

Basically I have two remote consoles, each with microphone & speaker connected to a gumstix running pulseaudio. They both connect via RTP (2 mono streams to speakers, 2 stereo streams from microphones) to a central server running pulseaudio and jack. To separate the microphone streams I had to plug one microphone into the left channel and one into the right channel.

I did try module-tunnel with module-native and module-combine, but you can't connect a source (microphone via - module-tunnel) to a sink (module-jack-sink), without using module-rtp-send with loopback=1.

We had been developing this application with esd, but the clock drift between the remote consoles and the main server caused pops and clicks in the audio.

I'm happy to try anything you suggest. The application is in production with RTP, but we'd prefer to:

a) not be using multicast b) not be using stereo streams for the microphones when we could be using mono (See #73 and #74)

My coworker did compile pulseaudio for the gumstix, I think just with lots of --disable-this flags to configure.

04/02/07 09:20:51 changed by ossman

It sounds like your problem is connecting a source to a sink. But since you're using JACK, you should be able to do that loop in there? And if not, just do:

pacat -r -d source | pacat -p -d sink

And you'll have a loop.

(you'll probably need to tweak the buffering a bit in that example though)

05/30/07 06:59:00 changed by s2156945

I guess I am using pulseaudio to connect remote microphones and speakers to jack, at the same time as physical audio ports.

So the remote microphones and speakers appear to jack as jack_ports from pulseaudio.

This is all simple with one remote microphone and one remote speaker:

mono RTP stream to remote speaker mono RTP stream from remote microphone

When the remote microphone stream connects, pulse connects it to the default sink, which I have set to module-jack-sink.

With two remote microphones, when the RTP streams connect, pulse connects them to the default sink, mixing them together. My current hack is to send the two remote microphone streams as stereo, RTP source 1 sending microphone on left channel, silence on right; RTP source 2 sending microphone on right channel, silence on left. Pulseaudio mixes them giving me Mic 1 on left channel, Mic 2 on right channel.

The problems with this hack:

1) Have to send audio on multicast, can't do unicast (#72).
2) Have to send 2 stereo streams for 2 mics, 4 quadrophonic streams for 4 mics, i.e. exponential growth in traffic with system size. This would be fixed by either #73 or #74 being resolved. This would be less of a problem if it wasn't multicast (#72).
3) Stereo streams seem to swap after a while (#86) - this is killing me.

My current work around for 3 is my coordinating program will connect to the same socket that pacmd does, parse "info" output and assign the incoming RTP streams to the right sinks.

cheers,
Woody