9

I have two computers. Computer A is running Ubuntu 11.10 with Gnome Clasic. Computer B is running Mythbuntu 11.10. Computer B has a sweet digital audio sound system.

I want to play music from Banshee on Computer A, but have the sound output sent over the LAN and come out on computer B's speakers.

I found this question which indicated I should use something called "paprefs" to acheive this. So, I installed paprefs and then in the "Network Server" dialog, I selected these settings:

paprefs

And then... I have no idea what is supposed to happen. I checked the paprefs home page, and all they say under Documentation is "There is not much to say. Just run paprefs and see for yourself."

I don't see anything happening or any way I'm supposed to make the connection from Computer A to Computer B.

How is this supposed to work? Can someone provide clear instructions on what one does to actually make the connection?

Ideally, the hope is that I can have a set up that allows me to always play certain applications, like Banshee, over the LAN using Computer B's sound system. In other words, once set up, it is the default, and does not have to be manually reconnected every time.

8

The least complicated method to send audio from one Pulse Audio server to another over the LAN is to use the RTP/Multicast feature that you are able to set up using paprefs Install paprefs.

On the sender:

paprefs screenshot showing "enable multicast/rtp sender" checked and "send audio from local speakers" selected

Choose your local soundcard or choose a separate device you can select as audio output from Audio Preferences.

On the receiver:

paprefs screenshot showing "enable multicast/rtp receiver" checked

By doing so audio will be sent from the sender to the receiver via your LAN.

  • Thank you for this. I did this settings as you described, yet if I play Banshee on the Sender, I'm not hearing it on the Receiver. I also don't see any network sound device in pavucontrol or any gnome sound settings. Are there no other steps I need to take? – Questioner Oct 22 '11 at 16:07
  • Got it sorted. I had to: 1. Reboot both machines. 2. On the Sender machine, go into sound settings, and under the "Output" tab, select the network sound device. – Questioner Oct 22 '11 at 17:11
  • Just did this. Got massive lag and it made the server PC really sluggish... possibly something I'm doing wrong, but as it only involves ticking two checkboxes, I don't really know what could go wrong. – Greg Apr 24 '13 at 12:06
  • @Greg: depending on your network, and on the audio content (bitrate!) this streaming method can be quite demanding. In case you have issues try to reset pulseaudio with pulseaudio -k this occasionally helps. – Takkat Apr 24 '13 at 20:16
  • Pulseaudio has a "very high" priority. Maybe that's the reason for the sluggish server... – Rodrigo Mar 22 '17 at 9:27
1

The below example shows how to create a pulseaudio TCP tunnel to forward sound from computer alpha to computer beta. In my case, both computers are running Ubuntu 14.04.

On alpha (the source computer) append the following lines to /etc/pulse/default.pa:

.fail
load-module  module-tunnel-sink  sink_name=beta  server=tcp:IP_ADDRESS_OF_BETA:4713
.nofail

(Choose any unique value for sink_name. I arbitrarily chose to use the value beta.)

On beta (the destination computer) append the following line to /etc/pulse/default.pa:

load-module  module-native-protocol-tcp  auth-ip-acl=127.0.0.1;LAN_NAME

In the above, LAN_NAME and IP_ADDRESS_OF_BETA will be specific to your computers and your LAN. For example, they might be:

LAN_NAME            =  192.168.1.0/24
IP_ADDRESS_OF_BETA  =  192.168.1.10

After making the above changes, restart pulseaudio, first on beta, then on alpha. The order matters. I restart pulseaudio with pulseaudio --kill. I run pulseaudio --kill as my pesonal UID (not as root), as pulseaudio is already running as my personal UID.

If everything worked successfully, you should now see the tunnel on the Output Devices tab of pavucontrol on alpha. When an audio source is playing, you should be able to route the source to the tunnel on the Playback tab of pavucontrol on alpha.

As long as the tunnel is intact, you should also be able to see the tunnel on the Playback tab of pavucontrol on beta. If the tunnel disappears, restart pulseaudio, first on beta, then on alpha. The tunnel is only created when pulseaudio starts on alpha.

Note 1: This example assumes pulseaudio is running on both alpha and beta. As of 2016, pulseaudio runs by default on Ubuntu, and has for years.

Note 2: This example does not use Avahi Zero-configuration networking. Avahi may be enabled by default on Ubuntu, but I have disabled Avahi on my systems. On my LAN, beta (the destination computer) always has the same IP address, and I know that address.

Note 3: The above auth-ip-acl grants access to any device on the LAN. Pulseaudio also supports other (more secure) authentication methods. I use auth-ip-acl to simplify configuration.

More information can be found at the following pages:

https://raspberrypi.stackexchange.com/questions/8621/how-to-set-up-a-pulseaudio-sink https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Network/#index2h2 https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules/#index14h3

0

See this guide for another simple method which allows you to select from the servers' sound cards on the client.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.