Server for DAAP, the digital audio access protocol
© deleet 2003, Alexander Oberdörster
daapd scans a directory for music files (mp3, aac, uncompressed) and makes them available via the Apple proprietary protocol DAAP. DAAP clients can browse the directory and retrieve individual files, either by streaming or by downloading them.
daapd is free software.
If you are upgrading from version 0.2.1 or earlier, please note the following:
- The tarball includes both daaplib and libhttpd-persistent now.
- If you have AAC files in your library, delete your cache file before upgrading. Otherwise, metadata is not added to their entries in the database.
If you have problems compiling, see the FAQ
daapd uses POSIX Threads. In addition to that, the following libraries have to be installed prior to daapd installation:
The following libraries are optional:
- howl (for Zeroconf/Rendezvous)
- mpeg4ip (for AAC metadata)
Please see their respective documentation for their installation process. In case of MAD, you only need libid3tag. It is distributed separately. In case of mpeg4ip, you only need mp4v2. See README.mpeg4ip included in the daapd distribution for details.
The daapd distribution includes libhttpd-persistent and daaplib. libhttpd-persistent is a modified version of David Hughes' libhttpd.
- daapd 0.2.4b. Two small changes to adapt daapd to the current versions of MaxOS X (10.4.x) and iTunes (6.0.4) (thanks, Antoine Reilles).
- daapd 0.2.4a. Bugfixes and additions to static playlists. daapd parses paths with backslashes correctly now; title and length info is read from PLS and M3U Extended files.
- daapd 0.2.4. Adds static playlists. daapd reads playlists in M3U, M3U extended and PLS format (specification). daapd adds all playlist it finds during the file scan to the list of playlists and adds all included files to the database. Files not found on disk are not added to database and playlist; relative paths are resolved. The order of the titles in playlists is preserved. daapd also forwards URLs to iTunes, so playlist entries can point to other servers or web radio stations. Only the http protocol is supported; AFAIK, this is a limitation of iTunes.
There are still some issues with playlists: Auto-update does not work correctly when playlists are deleted or modified (adding playlists works);
Title and length info (M3U Extended, PLS) is not parsed yet. This is only relevant for tagless files and URLs. Paths with backslashes are not parsed correctly.
- daapd 0.2.3d. Fixed a stupid bug in the howl callback. If you had problems with daapd showing up in iTunes (i.e. with the mDNS Responder), try this update. Thanks to Bruce Sheplan for this one.
- daapd 0.2.3c. The howl API has changed as of howl 0.9.6. daapd 0.2.3c reflects this (and is only compatible with this version).
- daapd 0.2.3b. Added support for Xing/LAME headers. This speeds up parsing of MP3 files and in effect the complete initial scan of the filesystem. Fixed a few memory leaks. Fixed an issue in the makefile.
- daapd 0.2.3a. Added auto-updates. Clients waiting for updates are automatically notified of changes in the database. Currently, the whole database is sent; support of incremental updates (delta) is forthcoming. libhttpd has changed to support the new version and is now at version h.
- daapd 0.2.3. daapd scans the filesystem periodically now. This happens in a separate thread. Transmissions are compressed with gzip now. This can be turned off with -z (useful on slow machines and fast connections).
- daapd 0.2.2c. daapd should handle large files much more gracefully now (less thrashing, streaming starts faster). This only required a small change in libhttpd (which is now at version g).
- Made a few changes to documentation and makefile for clarification. Added a FAQ.
- Nathan Williams submitted ports of daapd to pgksrc. The package is tested with all combinations of 32/64-Bit, low- and high-endian architectures.
- daapd 0.2.2b. Fixed a bug in the mp3 duration calculation routines. Under certain circumstances, this caused iTunes to chop off tracks at the end. Thanks to Yann Bizeul for pointing this out.
- daapd 0.2.2a. Changed a few things to make daap compatible with iTunes 4.5. This includes changes in libhttpd, so make sure it is rebuilt as well. Added support for encoded AAC files: daapd streams .m4p files now, but the client has to be authorized to play them (thanks to Dustin Rue for the suggestion). Added a stub for a future admin interface. Pointing a web-browser to "SERVER-IP:3689/admin/rescan" causes daapd to rescan the database.
- daapd 0.2.2. Added support for MPEG4/AAC metadata (thanks to Robert Böhrs and Stephen Lee). Added service advertisement (DNS-SD) via howl (thanks to Sandy McArthur). Added a daemon mode (thanks to Dirk-Willem van Gulik). Fixed a bug that files that appear more than once in a directory structure get added multiple times. daapd ignores duplicates now (thanks to Mikol Graves). Added an rc script for linux/sysv init to the distribution (thanks to Mykle Hansen). daaplib and libhttpd-persistent are now included in the distribution.
- daapd 0.2.1d. Renamed libhttpd to libhttpd-persistent to allow both versions to be installed at the same time. This became neccessary because libhttpd-persistent turned out to be incompatible with the old version. Added support for comments / the ID3 comment field (thanks to Remi Gurski). If you have problems compiling, check that you have libid3tag >= 0.15.0b installed.
- daapd 0.2.1c. Automatic rescan of all the files on client connect is now off, because daapd turned out to be unresponsive during this process so all existing client connections are disrupted. Added an option for turning it back on. Thanks to Lee Lindquist for pointing this out.
- Quick fix: daapd 0.2.1b. Fixed a file descriptor leak (thanks to Ronald Rael Harvest).
- Apple released iTunes 4.1 today, als well as a version for Windows (v4.1 as well). daapd seems to work flawlessly with both. Apparently, there have been no changes to the sharing protocol.
- daapd 0.2.1 released. Added preliminary support for uncompressed audio and AAC. No metadata is read in yet. Added Unicode support. Fixed lots of bugs. See release notes for details. libdaap changed as well, so get the new version, too.
- bugfix to libhttpd. libhttp should be less CPU-hungry now when streaming files. Thanks to Eric Shelton.
- daapd 0.2 released. daapd uses libid3tag now (from MAD) instead of id3lib. libid3tag is significantly faster than id3lib and easier to compile. daapd also calculates track durations accurately now, skipping/jumping in mp3 frames is now possible and daapd looks for deleted files and removes them from the song database. Download the new version of libhttpd (d) and MAD as well.
- tiny bugfix to libhttpd. On Linux, daapd hogged the CPU after the directory scan. This is now fixed.
- daapd 0.1b released. The song database can be dumped to a file and re-read later to speed startup. Some small bug fixes and enhancements as well. libhttpd has changed, too.
- daapd 0.1a released. This is just a small bug fix that should fix the SEGFAULTs some people have experienced. iTunes 4.0.0 compatibility and authentication are fixed as well. Note that libhttpd was changed, too, so you have to download the new libhttpd as well (and recompile and install it prior to daapd compilation).
daapd has been tested on the following systems:
- MacOS X 10.4.5 (gcc 4.0)
- Linux kernel 2.4.25 (i386, gcc 3.3.2)
- FreeBSD 4.9-RELEASE (i386, gcc 2.95.4)
- OpenBSD 3.4 (alpha, gcc 3.3.4)
- SunOS 5.8 (gcc 3.2) - no howl yet
but it should compile and run on most POSIX systems with minimal changes. Please contact the author if you manage to run daapd on systems not listed here.
DAAP is an http-based protocol for serving music content (and probably other media, too) over TCP/IP networks. DAAP was established by Apple iTunes 4.0 in April 2003. Official documentation is not available to date.
Further information on DAAP:
You can contact the author at daap at deleet dot de.