Results
I want to be able to walk from one room to another and hear the same song playing. Like you do if you were listening to the radio in all rooms.
I want that effect but I want to listen to my own music, can this be done?
Materials
- Ubuntu laptop.
- Mac computer.
First alternative
- I have found and setup the software according to this answer
- All of the softwares in both computers and server is setup how should I continue? http://www.pulseaudio.org/wiki/FirstSteps
Yes, with pulseaudio this can easily be done. You will need to install and run paprefs that makes your sound devices available over the network.
These settings allow both sound sources and sinks to be published over the network, ideally to another pulseaudio server.
In case you have your server setup without desktop manager you will need to install a sound system first (see this question). You can then edit
/etc/pulse/default.pa
uncommenting these lines in the Network access section:If you want to use RTP sender uncomment these lines the RTP sender module section:
The pulseaudio server needs to be started as a daemon with
pulseaudio -D
in case it's not yet running. For optimizing sound qualitity settings in the/etc/pulse/daemon.conf
may be adapted to personal needs.An alternative method to stream audio in your network would be to setup an Icecast Server (see this question).
I didnt have to do anything out of the ordinary. I have twin netbooks both with PulseAudio and fairly no name hardware from intel. How I set it up went a little something like this.
run paprefs on both your server and client. On the server, make sure you have have the multicast settings enabled, and the server bits checked. like so
and the multicast bit
On the client, enable the bit about finding network enabled devices and set your output device to the virtual network device via pavucontrol
viola you should have some magic now
Your best option is called Music Player Daemon (mpd).
https://secure.wikimedia.org/wikipedia/en/wiki/Music_Player_Daemon
It is a client server application. You store your music on the server, then connect with your clients (lots of people can do it at once) and control the server.
It is already in ubuntu, just apt-get install mpd
And also some good documentation: https://wiki.archlinux.org/index.php/Mpd
MPD can stream music, so you can have lots of clients (or speakers if you so wish to call them) to play the music.
But don't really expect any good quality. Streaming spoils sound badly (no matter if you use mpd or pulseaudio). It's a much better idea to connect real speakers to the server and use the laptops only to control it.
With this solution you can stream your system audio whereever you want..
the key here is the ALSA loopback capabilities. so first you need to enable loopback device in ALSA, which will appear in the PulseAudio Volume Control as an input device (and an output device as well).
this device then can be added to an mpd server:
where hw:1,1 is the loopback input device can be listed with the command
aplay -l
then you need to configure a http output plugin for the mpd. the following example would look like in
/etc/mpd.conf
that is it. Select the looback device for your audio source in Volume Control Playback tab.
Finally, you can use VLC or any other stream renderer at the destination point using the httpd url address:
http://192.168.1.38:8000
This answer is also available here
To add to lazyPower's answer I' would like to comment that the "pulseaudio server" is where the audio devices are located (in my case it's the bluetooth headphones connected to laptop) and the "pulseaudio client" is where the audio is played to the network selecting the audio sink device. I spent a few hours before realize that.
I'm not sure if something like this can be achieved with DLNA/UPnP since I'm not familiar with it myself, but throwing some links here in case it helps:
Though a quick search result would suggest that it's not possible to sync...
There is no good solution(yet). There is AVB but its support for 802.11 is limited to time synchronization.
If you want to stream to an Android phone, you can use Foobar2000 on the server and BubbleUPnP (payware) on the client.
foobar_v1.2.5.exe
$ wine foobar2000_v1.2.5.exe
~/.wine/drive_c/Program Files/
)ufw
is not blocking the relevant trafficThe approach has the advantage that if you pause on the Android, it will accummulate a buffer (since the server is still sending).
Tested on Ubuntu (Wine version
1.5.28-0ubuntu1~ppa1
) and Windows.