How to stream music over the network to multiple computers?
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:
load-module module-esound-protocol-tcp
load-module module-native-protocol-tcp
load-module module-zeroconf-publish
If you want to use RTP sender uncomment these lines the RTP sender module section:
load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100 description="RTP Multicast Sink"
load-module module-rtp-send source=rtp.monitor
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.