Ticket #366 (new enhancement)

Opened 3 years ago

Last modified 4 weeks ago

Implement compression for network audio

Reported by: candrews Owned by: lennart
Milestone: Component: daemon
Keywords: Cc: elreydetodo

Description

The other day I was trying to stream audio via a not-so-awesome wifi link to another system using PulseAudio. The available bandwidth was so low, the audio stuttered, and it just wasn't a good experience. It would be really nice to have network audio compression (lossless, I'd bet) used automatically. Even in the case where plenty of bandwidth is available, it's still nice to not use all of it, as all that bandwidth use slows down other apps (like my online video streaming that has the audio I'm streaming to another system). Thanks for all the great work!

Change History

Changed 3 years ago by elreydetodo

  • cc elreydetodo added

I've also experienced this on a wireless network with fairly good connectivity. It's especially a problem if you try to use RTP.

How hard would it be to pipe the outgoing audio stream (and eventually the incomming audio stream on the other system) through some sort of compression algorithm?

Are there any other existing audio streaming services that you need to stay compatible with? I.e. will it break any other clients or a protocol spec if we changed the transmission to be compressed data? It might be best to make this compression optional or configurable. Some devices that can handle the audio might not be able to handle the compression, like small embedded devices.

For non-rtp, is there any kind of buffer in place for the remote end that is receiving the audio stream?

Changed 3 years ago by paulproteus

I have experienced the same issue.

I've noticed that Apple's "Airport Express" encodes everything into ALAC to cut typical bandwidth usage down

I would be happy to discuss what might be a good strategy for Pulse, and I could possibly help in the implementation.

Changed 3 years ago by rusi

Here are some observations which show that it cannot be bandwidth alone:

1. Configure e.g. VLC to output via OSS and start it like that:

PULSE_SERVER=<your_server> padsp vlc Result: no skips at all, audio lags a bit, but ok

2. Configure e.g. VLC to output via pulse and start it

PULSE_SERVER=<your server> vlc Result: a few skips but annoying

3. VLC with pulse, redirection via paman

Result: loads of skips, unusable...

Guess it's got something to do with buffers and synchronization.

I'm posting this here since https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/273742 got associated with this bug ...

On Ubuntu 8.10 with pulseaudio 0.9.10 (and 0.9.13 via ppa)

Changed 13 months ago by Gagaman

Same issue here. Perhaps implementing a Vorbis encoding/decoding module? Any ideas?

Changed 4 weeks ago by rillian

Opus (http://opus-codec.org/) is probably a better idea than Vorbis.

Likewise flac for lossless.

Note: See TracTickets for help on using tickets.