streaming to Airtunes (Airport Express) with PulseAudio

Previous Entry Add to Memories Tell a Friend Next Entry
So, being back in Australia, the sun is shining, I'm sat on my sofa and I can't help but feel like I'm on summer holidays. So I want to crank some Uh Huh Her on the stereo.

We have an Airport Express, but using would normally require using Steph's computer, or the computer downstairs. So instead I thought I'd give the support in PulseAudio a go.

It's pretty easy to set up. Install the (Debian/Ubuntu) packages paprefs pavucontrol pulseaudio-module-raop pulseaudio-module-zeroconf (Fedora packages might have different names). Run paprefs and tick the option to discover Airtunes devices.

paprefs

Then using pavucontrol you can set the output device for an application.

pavucontrol

It's not perfect yet, it can sometimes get stuck skipping, and you have to move the stream to your local computer and back to the Airport (apparently the buffering is just implemented using windowing, but maybe needs to be smarter?), but it's working pretty good. Still, it's insanely neat, and because it's in PulseAudio, you can redirect any stream you like (not just from your music player).

It's not just Airtunes either. You can stream to other PulseAudio servers (discovered over mDNS) as well as UPnP media renderers.
Posted 22/10/09 11:33 — 13 comments

Comments

From:(Anonymous)
Date:2009-10-22 04:32 (UTC)

oh dear lord

(Link)
you just...made.....my year.
From:(Anonymous)
Date:2009-10-22 07:55 (UTC)
(Link)
Personally, I prefer "pull" style operation to "push". That is, the ability to browse and select what to listen to at the end where the speakers are, rather than picking what I want to listen to at the computer then deciding to push that audio to the speakers.

The UPnP AV MediaServer stuff seems to handle that mode of operation quite well and doesn't have an encryption key lockout.

James.
From:[info]brokenhut
Date:2009-10-22 09:41 (UTC)
(Link)
This is some seriously cool shit. I was googling for Linux/Airport Express support recently and didn't see a single mention of PulseAudio. This certainly redoubles my enthusiasm for pulling the AE out of its box and having a play. Cheers!
From:(Anonymous)
Date:2009-10-22 15:27 (UTC)

Why linux will never be ready for the desktop...

(Link)
"It's pretty easy to set up. Install the (Debian/Ubuntu) packages paprefs pavucontrol pulseaudio-module-raop pulseaudio-module-zeroconf (Fedora packages might have different names). Run paprefs ..."

Yeah, 'pretty easy to set up' if you happen to know exactly which weirdly named packages to install. Not exactly your fault, but software installation is still one of the major weaknesses of linux. It's fine if you know the package to install, and it is in your distro's repository, but otherwise you pretty much have to google for ages/build from source.

Anyway, good work. Even if PulseAudio is a buggy pile of 90's KDE.
From:[info]zdzichu.openid.pl
Date:2009-10-22 16:19 (UTC)

Re: Why linux will never be ready for the desktop...

(Link)
Don't worry. In current paprefs you need only to click "Install..." when you are missing raop module. No need to issue cryptic commands. Hurray for PA/PackageKit integration!
See: http://pipebreaker.pl/dump/pa-raop/paprefs-raop1.png
From:(Anonymous)
Date:2009-10-22 16:20 (UTC)

Re: Why linux will never be ready for the desktop...

(Link)
AFAIK this feature has only been added recently, so it's understandable that UI integration is not complete yet. Which makes me wonder where users would expect to see this checkbox (in Rhythmbox/Banshee/Amarok? or in Gnome Audio Prefs dialog?), or whether there should be any checkbox at all (maybe Airtunes support could be enabled out of the box)?

This would make paprefs and pavucontrol unnecessary for normal users; and pulseaudio-module-zeroconf and pulseaudio-module-raop could be installed by default (or on demand, when the user clicks the hypothetical "show Airtunes stations" checkbox in Rhythmbox).
From:(Anonymous)
Date:2009-10-22 16:06 (UTC)
(Link)
Ouch. That is one nasty preferences dialog.
From:(Anonymous)
Date:2009-10-23 08:12 (UTC)

Progress

(Link)
Hi Everyone,

Glad you like the PA Airtunes support as I wrote it :)

It's not perfect but we're hoping to improve the latency and other issues in the next release but I can't say too much more about it just now :p

The preferences dialog is also changing, I'm ultimately bringing paprefs and pavucontrol together so there is just one app needed which will be less confusing overall.

I'm not really sure about putting dialogs etc. into the individual apps as that then requires whatever app you are using to specifically integrate into PA and know much more about it than it should (the audio apps should really, for the most part, be ignorant to the underlying sound stack).

A further thing we're probably going to do is write a new dock app outside of PA that does the detection of remote things (other PA, Airtunes, upnp, and maybe bluetooth too) and present the user with an easy UI to actually turn a detected device into an available device. This would get rid of all the -dectect modules we have in PA just now and give a bit of choice to the user.

This new UI is just in the planning stage and but I've made a start on the paprefs/pavucontrol merge.

Take care

Col
From:(Anonymous)
Date:2009-11-01 23:41 (UTC)

sorry to bother

(Link)
Hi there,

I've played with RAOP some months ago through gstreamer bit pulseaudio integration sounds lovely.
Just a newbie question:
I installed packages and checked the configutation alright but can't see the airtunes device showing off ?

What's the good way to debugg this ?
How can I make sure the airtune device to be discovered properly ?


Thanks for your help.

Paul, ubuntu 9.10 with some gnome/xorg? blanck screen bug sometimes
From:(Anonymous)
Date:2009-11-28 10:16 (UTC)

Can't see AirTunes

(Link)
I can't see the Airtunes device. I followed all steps in this otherwise excellent description. It would be great if I could connect my Ubuntu (9.10)
machine to this device.

Claus
From:(Anonymous)
Date:2009-11-30 18:12 (UTC)

Streaming to airport

(Link)
You've made my Karmic dreams come true! Thanks for putting this together....... D.in the USA
From:(Anonymous)
Date:2009-12-08 19:43 (UTC)

Unclick and reclick

(Link)
To get my Airtunes working, I first clicked the Make Discoverable Airtunes in paprefs, but then eventually noticed I hadn't installed pulseaudio-module-raop, so I installed that with aptitude, and things still didn't work until I unclicked Make Discoverable Airtunes in paprefs, closed it, then reopened it and clicked it. I was then able to find the name of my airport in under Playback (for Rhythmbox) in pavucontrol (which I accessed through the Volume Control in the Pulseaudio Device Chooser)
From:(Anonymous)
Date:2009-12-08 23:37 (UTC)

Re: Unclick and reclick

(Link)
and after I pause rhythmbox, if i click and unclick the enable airtunes clickbox, it will start working again. otherwise, it won't