AAC+ streaming from OSX

Streaming from OSX is complicated by the fact that there is no one tool that will currently handle everything for you. Nicecast is close, but at this time only supports MP3 and not AAC+.

In order to stream AAC+ from OSX, several tools are required:

  • DarkIce – an icecast compatible encoding/streaming tool (command-line)
  • Jack – an audio routing tool (grab the Jack2 OSX binary package)
  • SoundFlower – creates a virtual audio device for sound capture
  • libaacplus – AAC+ encoding library (grab the 1.1.0 version)
  • Xcode – Apple development environment. You can usually find a copy on your OSX install disc. This provides critical compilers and support applications allowing you to build libaacplus and Darkice from source.

In addition you will need to be familiar with using the OSX terminal, and some basic unix command line operations.

Step 1- Install Jack

The Jack package includes a standard OSX installer application. You will need to reboot at the end of installation.

Step 2 – Install SoundFlower

The SoundFlower package also includes a standard OSX installer application.

Step 3 – Build libaacplus

Open a terminal window and execute the following commands (in the directory where you downloaded the libaacplus-1.1.0.tar.gz file)

cd Downloads (or wherever you put it)
tar -xzvf libaacplus-1.1.0.tar.gz
cd libaacplus-1.1.0

Next we need to fix the autogen.sh script to use the GNU libtool instead of the Apple version.

cat autogen.sh | sed 's/libtool/glibtool/' > autogen2.sh

Now we can go ahead and build libaacplus

sudo make install

Step 4 – Build DarkIce with AAC+ and Jack support

tar -xzvf darkice-1.0.tar.gz
cd darkice-1.0
./configure --with-aacplus-prefix=/usr/local/lib --with-jack-prefix=/usr/local/lib
sudo make install

Step 5 – Configure DarkIce

Edit /etc/darkice.cfg to make it look like the following:

duration        = 0          # duration of encoding, in seconds. 0 means forever
bufferSecs      = 2          # size of internal slip buffer, in seconds
reconnect       = yes        # reconnect to the server(s) if disconnected

device          = jack_auto  # OSS DSP soundcard device for the audio input
sampleRate      = 44100      # sample rate in Hz. try 11025, 22050 or 44100
bitsPerSample   = 16         # bits per sample. try 16
channel         = 2          # channels. 1 = mono, 2 = stereo

bitrateMode     = cbr                   # average bit rate
format          = aacp                  # format of the stream: ogg vorbis
bitrate         = 64                    # bitrate of the stream sent to the server
server          = [your server address] # host name of the server
port            = 8000                  # port of the IceCast2 server, usually 8000
password        = [your password]       # source password to the server
mountPoint      = [your mountpoint]     # mount point of this stream on the server
name            = [your stream name]    # name of the stream
description     = [your description]  # description of the stream
url             = [your url]            # URL related to the stream
genre           = [your genre]          # genre of the stream
public          = yes                   # advertise this stream?

Step 6 – Start Jack

Jack usually installs to your Applications directory. Find the Jack dir, and run JackPilot.

Select ‘Soundflower (2ch)’ for both the input and output devices.

Select ‘Save’, then ‘Start’ to start the Jack service.

Step 7 – Configure OSX sound devices.

Open OSX Preferences and choose ‘Sound’.

Select ‘Soundflower (2ch)’ as the output device

Step 8 – Start Darkice

From a terminal window execute the following:


Step 9 – Play some music!

You may now start iTunes (or any other audio player) to begin playing your music.

Any audio that you play in iTunes will now be streamed online!

Step 10 – Enable local audio monitoring (optional)

By default you will not hear any audio from your local speakers when you start playing tunes in iTunes.

You can enable local monitoring of the Soundflower virtual device by starting the SoundFlowerBed application. (Installed with SoundFlower, use Spotlight to find it)

Step 11 – Install Outcast iTunes Metadata sync tool

Darkice currently does not have the ability to read track information from iTunes, which means that you will not get automatically updating track titles on your stream by default.

We have developed a custom tool which reads the title information from iTunes and feeds this to the Outcast streaming servers.

Download Outcast iTunes Metadata sync tool

Things to note about this tool:

  • This tool is currently a beta version and may be unstable or may not work on all systems
  • Please ensure iTunes is running before you start the sync.
  • You will need to enter your Outcast mountpoint and password information into the tool before you click start sync.