Stream audio from any application to your AirportExpress

This guide is for Ubuntu 9.04 Jaunty Jackalope and will show you how to stream audio from any application to your AirportExpress. PulseAudio has built in support for AirTunes/AirportExpress with version 0.9.15. Unfortunately it did not make the Jaunty release, but installing it yourself is a small task. This guide will show you how. (Guide is updated for 9.10 Karmic Koala)



Update for 9.10 Karmic Koala:

Run the following command:

sudo aptitude install pulseaudio-module-raop pavucontrol paprefs

Then follow the steps below starting at number 5.




NOTE! Make sure your Januty installation is up to date with all the latest security fixes and update packages before going any further.

The first thing that has to be done is to add a new package repository and install it’s OpenPGP key.
1. Go to System->Administration->Software Sources. Select the Third-Party Software tab and press add. Paste the following:

deb http://ppa.launchpad.net/themuso/ppa/ubuntu jaunty main

and press add source. Press close. (If you do a reload now you will get an error. Ignore it.)
2. Right click the following url, choose Save Link As, and save the file to your desktop.

http://keyserver.ubuntu.com:11371/pks/lookup?op=get&search=0x0B47F0A6B88A1AA8

3. Again go to System->Administration-Software Sources, but this time select the Authentication tab. Press Import Key File button (down to the left). Browse and select the file you just saved to your desktop and press Ok. Make sure the new key gets imported, and press close.
4. To install the new packages write the following in a terminal:

sudo aptitude update
sudo aptitude install pulseaudio-module-raop pavucontrol
sudo aptitude dist-upgrade

5. Go to System->Preferences->PulseAudio Preferences. Under Network Access select both “Make discoverable network sound devices available locally”, and “Make discoverable Apple Airtunes sound devices available locally”. Press Close.
6. Reboot
7. Start Pulse Audio Volume Control (under Applications -> Sound & Video), hit the Output tab and select your AirportExpress and make it your default output device.
8. Start the application you want to stream audio from.

Enjoy :-)

  • Twitter
  • Facebook
  • del.icio.us
  • Digg
  • Google Bookmarks
  • StumbleUpon
  • FriendFeed

18 thoughts on “Stream audio from any application to your AirportExpress”

  1. I just finished installing everything, all worked well and was very easy, but after i change the airport to my default audio output, none of my multimedia applications will play their content. i.e. they load fine and all, but they wont move along their time spans as if there is something stopping them from playing?!

    Was hoping you might be able to point me on my way to a fix. Please note total noob at linux!

    1. Hi Matt.

      I am sorry but I haven’t seen that kind of behavior before, and really don’t have a clue what might be causing it. I don’t have a linux installation at hand right now which makes testing a bit difficult.

      Which applications have you tried?
      If you can give me an example I’ll see if I can find some time to set up a vmware image for testing.

  2. well i started off trying rhythmbox, after that failed i tried vlc and smplayer, none of which worked.

    im currently running on ubuntu 9.04.

    thanks for the reply and any help u may be able to provide!

  3. okay well strange progress from the last time i message. decided to go back for a final try and suddenly it started working! there is about a 5 sec delay for the music to stream but it works a charm! thank you so much for this handy fix!!!! and the best part is my music in now finally playing when streaming!!! dont know what was happening there…. but all the same it is working now and id like to thank you!

  4. This is just what I was looking for. Regretteably, I can’t get it to work on my Apple TV. The device is detected by PulseAudio (and shown as “raop.AppleTV.local”, which is pingable…), yet the ATV doesn’t produce any sound. When switching to the ATV as output device, there’s no more sound from the soundcard, but the ATV is also not outputing any…

    Whenever I try to adjust the volume of the ATV from my pc, PA crashes (“Connection failed: Connection terminated” and sometimes “pa_context_set_sink_volume_by_index() failed: Bad state’). And sometimes /var/log/syslog says:
    Sep 15 10:47:47 bollo pulseaudio[10629]: rtsp_client.c: Assertion ‘c->url’ failed at modules/rtp/rtsp_client.c:409, function rtsp_exec(). Aborting.
    Sep 15 10:47:52 bollo pulseaudio[10716]: pid.c: Stale PID file, overwriting.
    Sep 15 10:47:53 bollo pulseaudio[10716]: rtsp_client.c: Connection failed: Connection refused
    Sep 15 10:47:59 bollo pulseaudio[10716]: alsa-sink.c: ALSA woke us up to write new data to the device, but there was actually nothing to write!
    Sep 15 10:47:59 bollo pulseaudio[10716]: alsa-sink.c: Most likely this is a bug in the ALSA driver ‘snd_hda_intel’. Please report this issue to the ALSA developers.
    Sep 15 10:47:59 bollo pulseaudio[10716]: alsa-sink.c: We were woken up with POLLOUT set — however a subsequent snd_pcm_avail() returned 0 or another value < min_avail.

    Any clues? :/

    1. Hi Arne.

      Apple seems to have made some changes when they implemendted Airtunes into the Tv.
      Besides that Airtunes is running on a different port I don’t know what.

      I have seen the same thing with my RaopX project, but haven’t come around to try and debug it yet. I would guess that the raop module in pulse audio is also related to raop_play, and hence will have the same limitations.

      If you get it to work please let me know.

      -Hersson-

  5. Hey. Thanks for the info. All went well but when I reboot my laptop it finds the network but doesn’t find Airport Express. I have to unplug the Airport Express and plug it back it and then reboot my laptop. This seems to work but it is a pain. Any ideas on how I could fix this annoyance? Thanks.

    1. Hi Glenn.

      I took a quick browse through some of the posts at the apple support forum. People have had success in solving this issue in numerous ways. Here is a few suggestion after my 5 minute search. Hope it helps.

      Swiching AE from static ip to dhcp
      Changing channel for the wireless network
      Turning off 802.11n
      Switched router

  6. Is there an issue with the newer AirPorts? I have tried this setup every possible way. I can get it to play music to my AirPort Express, but it drops half a second of audio every two seconds. Things I tried:

    1. Removed NetworkManager in favour of WICD
    2. Remove WICD in favour of a completely manual WiFi configuration
    3. Changed from DHCP to static on both the AirPort and my PC
    4. Manually configured PulseAudio to use the AirPort (no detection)

    I think a fully static configuration should be better because there’s no detection of signals, IPs, devices etc. Yet it still drops audio.

    1. @Paul Rafferty.

      I have no experience with the newer AEs. Mine is from mid 2006.
      However I have read something about problems with drop outs when using the optical output.

      -Hersson-

    2. I have the same problem as Paul R. Is there any fix yet? I don’t have the know how to fix it my slef. Not that that’s going to stop me from trying

  7. This worked flawlessly for me, but I’m wondering if it is possible to set the output to multiple airports. With iTunes I can pipe music to any number of airport express simultaneously and still play it on the computer speakers as well. This solution doesn’t seem to support that. Any thoughts on this?

Leave a Reply

Your email address will not be published. Required fields are marked *


nine − = 8

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>