AirTunes-ish Linux

I spent last weekend with the guys behind Webcafe.dk and one of the guys had brought his AirPort Express with built-in AirTunes, which is really cool, so I started wondering if this could be done on Linux - and with all sound (not just music, but video and application noises also) so I could get rid of that annoying mini-jack in my Thinkpad.

After searching a little on google with no luck I decided to write my own client/server application, but before I got to it I talked to this guy ‘gnome’ on #ruby-lang @ irc.freenode.net and he directed me to NAS (Network Audio System), which was actually designed for such a task.

Setting it up turned out to be a piece of cake. Simply:

# apt-get install nas

on the server, and

# apt-get install nas nas-bin audiooss
$ export AUDIOSERVER=server:0

on the client. (Just a note here. When installing the NAS package you will be asked whether or not NAS should lock the audio device. Answer yes, that should give the most stable implementation.)

Now I can simply use NAS-aware applications (e.g. mplayer and alsaplayer has NAS support) and make them output sound to the server, which is connected to my stereo. Or I can use audiooss and run e.g.: audiooss xmms &, which forwards the XMMS output (if it outputs to OSS) to the NAS server.

Now I can play music, movies and stuff from my laptop over my network and still be completely wireless - and in Linux that is.

UPDATE: I just stumbled upon a NAS plugin for XMMS, which can be downloaded from ftp://ftp.stack.nl/pub/users/willem/. (Look for xmms-nas-0.2.tar.gz.)

5 Responses to “AirTunes-ish Linux”

  1. stffiiii Says:

    Thats well sweet. Job well done, mistah.

    (i want a laptop and wifi too)

  2. bjarke sørensen Says:

    How is the latency?
    I’d imagine that sound on a movie would be somewhat out of sync..

  3. Madsen Says:

    It’s _very_ close to zero when watching movies from the harddrive - I don’t feel the slightest bit of lag. But for some reason, when playing DVDs there are some issues… Not latency, but more like glitches in the sound… It’s like cut up…

    But I’ve disabled NAS for now, since it’s somewhat unstable, at least here (my server crashed 3 times in one day because of it!). So in order to prevent more crashes I’ve disabled it again untill I either find a solution or get myself a dedicated media-box.
    (I’m thinking of building a mini-mini box for sound only. Doesn’t need more than a small hard drive, a soundcard, a network interface card and a mother board…)

  4. bjarke sørensen Says:

    Or have it boot over network or using CD-ROM to reduce the noise and power-consumption..

  5. Madsen Says:

    I was actually thinking that I'd install it on a USB stick, so I could easily modify the installation on my laptop in case the networking fails. That would also eliminate hard drive noise.

Leave a Reply

 Theme Brought to you by Directory Journal and Elegant Directory