This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new!


Network your music with DAAP for Linux

By Nathan Willis on April 26, 2006 (8:00:00 AM)

Share    Print    Comments   

Apple's iTunes popularized the Digital Audio Access Protocol (DAAP) for simple networked music playlist sharing. Linux users can take advantage of it too. Linux users can choose from several easy-to-use DAAP servers for sharing music, and several DAAP-aware applications for listening to it -- as well as discover and tune in to other people's collections.

DAAP was developed at Apple as a simple extension of HTTP. A good repository of information about DAAP is available at DAAP clients and servers discover each other through ZeroConf and exchange basic information about their capabilities over HTTP, using the MIME type application/x-dmap-tagged and speaking on TCP port 3689.

Usage is equally straightforward. Servers send a list of all available songs and playlists. When a client requests a song, the server streams it back. Clients can periodically check with the server for updates on the available content.

The iTunes implementation of DAAP imposes an arbitrary limit of five unique client connections during each 24-hour period. In its original implementation, iTunes could connect to DAAP servers anywhere on the Internet, but Apple crippled the application starting with the 4.x release, and iTunes will now make DAAP connections on the local subnet only. The limitation is not part of the protocol, and the leading theory behind the change is that pressure was put on Apple from the major record labels to limit the service.

At your service

But enough about Apple. Those of us running free operating systems have several DAAP servers to choose from. daapd, mt-daapd, and deleet daapd are the most widely used. Out of the three, mt-daapd is the simplest and seems to have the most active development community, so it is the one we will explore here.

To install it, see the quickstart instructions available at Binaries are available for several Linux distributions, as well as some distro-specific installation guides.

Mt-daapd is dependent on libid3tag and gdbm for keeping track of the music, and requires a ZeroConf implementation such as Avahi for automatic service discovery. Startup configuration is done through /etc/mt-daapd.conf, and the sample file included with mt-daapd includes plenty of explanatory comments and should be enough to get you started. Specify in the file which directory contains the files mt-daapd will serve, and, if you like, set a password users will need in order to connect to the share.

The first time you run mt-daapd it will scan the shared music directory and index its contents, including file metadata such as the ID3 metadata in MP3s. Mt-daapd ships with metadata support for MP3, Vorbis, FLAC, and Apple's AAC, M4A, M4P, and M4B audiobook files. Note that mt-daapd will stream Apple's encrypted files, but those files will play only on computers that are authorized to play them.

Inside /etc/mt-daapd.conf you must specify an administrative password, with which you can access the server's built-in Web administration interface (remember, DAAP is built on top of HTTP) via http://localhost:3689. At this URI you can start and stop the server, rescan the shared music, and alter other configuration details.

When the server is up and running, DAAP-aware client applications can connect to it and browse the entire music collection and any server-side "smart playlists" you create. These playlists are automatically populated according to one or more rules defined in the file /etc/mt-daapd.playlist using a simple syntax documented within the file itself. The example playlists include "Recently Added," which includes all files added within the past 14 days, and "'60s Music," which includes all files with a Date tag in the 1960s. The mt-daapd.playlist file is fairly well commented, and includes a number of usage examples to help get you started.

The mt-daap project wiki has some advanced tutorials for getting more out of your server, including adding remote MP3 streams to the shared music collection, tunneling the connection over SSH, and transcoding audio on the fly to raw WAV output. This is useful if you need to connect with a client that does not support every codec; for instance, in my experience, iTunes for the Mac does not handle streaming Ogg Vorbis correctly, even though a Vorbis plug-in is available that works for local files.

The client is always right

But enough about Macs. Those of us running free operating systems have several DAAP-compliant audio players to choose from as well.

The simplest option is to use Rhythmbox. Charles Schmidt added support for DAAP to Rhythmbox as part of the 2005 Google Summer of Code. To use it, you need Rythymbox 0.9 or later, and GStreamer 0.10 (on which Rhythmbox depends). The newer versions of Rhythmbox and GStreamer have not yet made it into all distributions, so you may have to build it from source. If you do compile from source, be sure to pass the --with-daap flag to the ./configure command.

The Mono-based audio player Banshee also advertises DAAP support, but I was unable to get it to work on my AMD64 system. Several other apps cite DAAP as being in the works, including (intriguingly) MythTV and a variety of KDE players that depend on adding DAAP underpinnings to KDE itself. And, of course, the Windows version iTunes is known to run well under WINE.

Several Java-based audio players also support DAAP; the mt-daap and OpenDAAP sites recommend ourTunes, iLeech, and GetItTogether. Most of these seem to predate the DAAP efforts of the Linux-native players. Here again I had limited success on my AMD64 machine. The temptation for me as a writer is to launch into a tirade about the "write once, run anywhere" mantra bandied about by both the Java and Mono communities, and how it is essentially fiction unless you use a stock system on i386 hardware with the exact same JVM/.Net runtime as the developers used when building their app. Instead, I will just caution you that -- as with a lot of Java apps lacking large development teams -- success may depend on your patience and your willingness to tweak your Java installation.

DAAP versus the file server

Luckily, as DAAP support breaks into the mainstream, specialized solutions like these Java players will become less and less important. We will ultimately see DAAP support shipping in the preferred GNOME and KDE music apps. In another year, expect it to be as ubiquitous as Internet radio streaming is today.

That is unquestionably a good thing. The more music you have, and the more computers you use, the bigger the hassle it becomes to try to synchronize everything. Without a simple sharing solution like DAAP, the easiest way to manage a centralized music collection for multiple PCs is keep all the files together on a central server, shared through Samba or NFS. DAAP accomplishes the same goal with far less administrative overhead, and provides interesting features like smart playlists at no extra cost.

Share    Print    Comments   


on Network your music with DAAP for Linux

Note: Comments are owned by the poster. We are not responsible for their content.

daap server with recoding functionality

Posted by: Anonymous Coward on April 26, 2006 11:45 PM
I admin it has been a while since I last looked at the daap servers out there. Has anyone encountered a daap server that's capable of reencoding to a certain format on the fly? I'd really like that because I have music in various formats (mp3, aac, monkey audio, flac, vorbis) but I'd like to use my mac as a client and as the author mentioned, iTunes doesn't really handle much more than aac and mp3.



Re:daap server with recoding functionality

Posted by: Anonymous Coward on June 13, 2006 05:49 AM
mt-daapd is supposed to be able to recode files on fly now with latest development source.
Have a look at there webb forum and wiki.


mt-daapd works great

Posted by: Anonymous Coward on April 27, 2006 01:40 AM
I've been using it on a small network for a couple of years now I think - uptime same as the server itself, with as many as five simultaneous connections from iTunes clients.


lower back pain

Posted by: Anonymous Coward on May 28, 2006 06:35 PM
<tt>[URL=] Pain relief [/URL]
[URL=] Back Pain [/URL]
[URL=] Pain relief [/URL]
[URL=http://painreliefmedic.friendpages.c<nobr>o<wbr></nobr> m] Pain relief [/URL]
[URL=<nobr>i<wbr></nobr> nrelief.htm] Nerve pain relief [/URL]</tt>


any client for music library maintenance?

Posted by: Anonymous Coward on April 27, 2006 02:54 AM
I need a way for non-geek users to maintain the music library, using Windows client workstations. I.e., pop a CD into a client PC and rip tracks to the library, edit tags, etc.

Couldn't this be done with any front-end, if the library dir tree is shared by Samba on the server? Since I only need the music on the local net, what would be the advantage of daap over simple file-sharing?


Back Pain relief

Posted by: Anonymous Coward on May 28, 2006 06:35 PM
[URL=] Pain relief [/URL]
[URL=] Back Pain [/URL]
[URL=] Pain relief [/URL]
[URL=] Pain relief [/URL]
[URL=<nobr>.<wbr></nobr> htm] Nerve pain relief [/URL]



Posted by: Administrator on May 01, 2006 10:33 PM
Mt-daapd ships with metadata support for MP3, Vorbis, FLAC, and Apple's AAC, M4A, M4P, and M4B audiobook files.

Really? That didn't work for me on Ubuntu Dapper. I guess I should look at it a bit more (and I will), but is there anything simple I missed to get that to work?


iTunes preventing switch from WinXP to Ubuntu

Posted by: Administrator on July 06, 2006 12:44 AM
I'm currently a WinXP user at home (3 networked pcs), and have been seriously considering, and researching, switching some or all of them over to Linux (specifically thinking Ubuntu distro).
The reasons for wanting to switch are many, but pragmatically, I've been really disappointed with how often the various pcs seem to crap-out.
However, I am very hesitant to take the plunge as we are heavily reliant on iTunes. We've converted tons of WMA files to the iTunes MPEG-4 Audio File format, and have purchased a ton of music through the iTunes Music Store. Also, we both use iPods, which synch with iTunes.
So, my concern is whether or not I'll lose access to all that music.
Would use of mt-daap as a server of those files, and use of Rythmbox with GStreamer as the client to access work for me? Would we be SOL in using our iPods?
I don't want to make assumptions about what I'm gaining through the process of switching from XP to Linux without really understanding what I'm potentially losing.
Thanks in advance!


This story has been archived. Comments can no longer be posted.

Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya