A while ago I thought about having my Spotify playlists streamed to my Playstation 3. My sound system is connected to that device, placed in my living room, so I needed to find a way to stream the whole sound output (also called “Stereo Mix”) from my Mac to the PS3. In this article I will explain how you can stream any sound from your Mac, for example Spotify, to any local device using WLAN, in this case my Playstation 3.
What do you need to stream your audio output?
Although this tutorial seems quite long, once you’ve made your way through it and configured everything (one-time only!), handling all this will be pretty easy, and it won’t take longer than a minute. It’s not really complicated to accomplish this, however you need four tiny tools (all of which are freeware though!):
- Soundflower (https://code.google.com/p/soundflower/)
- Shoutcast (http://www.shoutcast.com/broadcast-tools)
- MuSE OS X (http://files.dyne.org/.index/index.php?dir=%2Fmuse%2Fbinary)
- a Media Server App like Plex Media Server (http://www.plexapp.com/getplex/index.php) or for this tutorial PS3 Media Server (https://code.google.com/p/ps3mediaserver/downloads/detail?name=pms-macosx-1.82.0.dmg)
Now we can get started! Remember, if you want to stream Spotify, of course you need to have a valid account there!
Installation and one-time-configuration
After you have downloaded the above tools (you only need one of those Media Server applications), get started by installing Soundflower. Also install MuSE OS X and (in my case) the PS3 Media Server. You already got three of the tools ready! However, Shoutcast is not a real app, you can only run this tool using the command line (with the Terminal app that you can find on any Mac OS X device). So I recommend you to move the new shoutcast_server folder to a location of your choice that is easily reachable, for example I put it on my desktop.
Now you need to tweak some settings. Inside the shoutcast_server folder, open the file sc_serv_basic.conf with a text editor. All you need to change here is the line that says “password” as well as the “adminpassword”. Just type in two different passwords of your choice. If you want to, you can also change the “portbase” by removing the semi-colon and typing in another port number. Otherwise Shoutcast will stream on port 8000 (I left it as it is). When you’re done, save the file and close it. Now you need to make sure that you can later access your audio stream using the PS3 Media Server. To do this, access the Library folder by clicking on the Go To submenu in the Mac Finder menu bar and press down the alt-key to see and open this Library folder. Inside, go to Application Support -> PMS. You should see a file called WEB.conf, otherwise you can download it here. After you have opened it with a text editor, you see a long list of streams that have already been input there. If you don’t wanna use them, just delete them. Just be sure to enter the following line under # audio streams:
Replace <name-of-your-choice> with any name of your choice (for example Mac Sound Output) – this will be the name of your stream that you will later see on your Playstation 3. Replace <your-computers-local-ip-address> with your computer’s local ip-address (if you don’t know how to find it, read this article), and replace <the-port-specified-in-the-shoutcast-configuration-file> with the port number you set earlier (remember, if you didn’t change it, enter 8000). Don’t forget the colon in between! For example, your line could look like this:
Now save this file, and your one-time-configuration is done. Everything that follows now are the actions you always need to do to start your audio output stream.
Stream your Audio Output from Mac to any WLAN device
These are the actions needed to start your Mac audio output stream:
- Go to your Mac’s System Preferences -> Sound. For Output as well as for Input choose Soundflower (2ch). This allows Soundflower to grab your Mac’s sound output and use this output as input for your audio stream.
- Open the Terminal app. You need to move to your shoutcast_server directory. This works by typing in cd <path-to-the-directory> (where <path-to-the-directory> needs to be replaced with the path to the directory, for example cd Desktop/shoutcast_server). After that, type in ./sc_serv sc_serv_basic.conf to start your own audio server. The application will start, at the end it should say something like Listening for connection on port 8000 (or sometimes also 8001).
- Open muse-OS X. First, click on Status (so that you can see what you’re doing). Then click on Output Device until it said something like Closing output device: Soundflower 2ch. Then click on Input Device, but this time check that it says something like Opening input device: Soundflower 2ch. In short words: Output has to be closed, input has to be open.
- Now, still inside muse-OS X, click on Stream. A new window opens. There you will actually set up your audio stream and pass it to the Shoutcast server you just started before. First you need to click Add on the right side of Output Streams to add a new stream. Now choose the audio settings you want to use. I recommend to use Encoder Type: mp3, Mode: stereo, bitrate: 128, frequency: 44100. As you can see, muse-OS X currently only supports audio streaming up to 128 kbit/s. However, since the free and unlimited version of Spotify only streams up to 160kbit/s anyway, that’s not too much of a loss.
- After tweaking these audio settings, click on Add on the right side of Stream Servers. Now you need to enter the necessary information to send the audio to your Shoutcast server. For Host, enter localhost, for Port again use the port number you specified earlier (default was 8000). Leave the Mnt field empty. Name and Description can be anything you like. As Login Type, choose shoutcast, leave the Username field empty, and for Password you enter the password you specified in your Shoutcast configuration file (NOT the adminpassword!). When you’re done, click on Connect. Your audio stream is now running!
- All you need to do now is start the PS3 Media Server app. After it has connected to your Playstation 3, you can access your shoutcast stream from there under the name you specified earlier in the PS3 Media Server’s WEB.conf file.
Now turn on some sound to test it. You will probably notice a delay of a few seconds, but if you only want to listen to your Spotify music, that shouldn’t be a problem right? Oh, and another little hint: After you have set Soundflower 2ch as your Mac’s output, you won’t hear your Mac’s sound out of its speakers any longer, it will only be streamed to your WLAN device (in this case the Playstation 3). So if you still want to be able to listen to your audio on your Mac’s speakers at the same time, open the tiny application called “Soundflowerbed” that was installed automatically with Soundflower, and set the output settings from OFF to Built-In Output.
Congratulations, you should now be able to stream your Spotify music from your Mac to your Playstation 3! If you have any questions or if something doesn’t work, feel free to post a comment. And if you’re a Windows user, you might find that tutorial about streaming Spotify from Windows helpful!
Leave a Reply