Streaming iTunes from Ubuntu
by Niel M. Bornstein
As part of my home network rejiggering, I wanted to start serving my music files from my desktop machine. In part, this is to save space on my iBook, and in part, it's just because I can.
I started by googling for a precise howto for my system. While this didn't turn up anything for Ubuntu, it did point me to mt-daapd, the multithreaded DAAP server. DAAP is Apple's Digital Audio Access Protocol, which is what iTunes uses to share music. mt-daapd also requires Howl, a cross-platform implementation of the Zeroconf standard (which Apple calls Rendezvous).
To set up my server, I first installed howl:
sudo apt-get install howl-utils libhowl-dev libhowl0
Unfortunately, there's no deb for mt-daapd in the Ubuntu universe. So I had to download the deb from SourceForge and install it like so:
sudo dpkg -i mt-daapd_0.2.0_sid_i386.deb
I created a directory /var/media/music for my music files, and copied some MP3s there for testing. Then I edited /etc/mt-daapd.conf to tell mt-daapd where to find music files, as well as some other details. Then I took a deep breath and started mt-daapd with its script:
sudo /etc/init.d/daap start
The admin web page (on http://localhost:3689 by default) came right up and showed me that mt-daapd was running, and had scanned four MP3 files.
For extra bonus points, I added mt-daapd to the runlevel startup scripts, so it will start every time the machine starts up:
sudo update-rc.d daap defaults
I fired up the iTunes player on my iBook and connected to the server. There it was! However, double-clicking on a song didn't do anything.
The mt-daapd log showed a variety of errors. After scanning the mt-daapd forums without finding an exact remedy, I decided to ditch the deb and installed the latest source tarball (version 0.2.1-pre2) instead. This required installing a few more dependencies (like libgdbm-dev and libid3tag0-dev), but all of them were available in the Ubuntu universe. I configured it to install in /usr/local, so as not to conflict with the version from the deb.
To make sure that the right version of mt-daapd starts up, I edited /etc/init.d/daap, changing the DAEMON variable to point to /usr/local/sbin/mt-daapd.
That one worked. I packaged up all the music files ripped on my iBook and copied them over to my Ubuntu box. Et voila! Now I had music streaming across my home network.
But I still can't play all my music files locally on the server, where the nice Harmon Kardon speakers are plugged in, because many of them are encoded as AAC. XMMS, my music player of choice on Linux, doesn't seem to handle AAC encoding.
Next step: finding and installing an MP4 codec for XMMS. I'll leave that for a future weblog.
Are you streaming iTunes on Linux?
5 Comments
| blech 2004-12-23 15:12:23 |
mt-daapd vs daapd, and a DAAP tailing concept I've used both daapd and mt-daapd over the last year to stream the majority of my music from a Linux server to various Macs. daapd is a bit more broken-up (you have to compile a patched httpd, for example) and a bit more primitive, but I've found it's a lot faster at sending the library to iTunes.
|
| mike3k 2004-12-23 18:55:40 |
It works for me I just installed it on my box running Debian sarge and I'm able to connect to it and play music from my powerbook. |
| michel@levy-provencal.net 2005-03-13 08:06:05 |
And what about reading itunes streamed music on Linux I would like to read some music streamed by my Powerbook itunes, on a PC working ubuntu...
|
| phoenix1029 2005-07-23 14:33:55 |
AAC playback Transcode Home Page: http://www.theorie.physik.uni-goettingen.de/~ostreich/transcode/
|
| shane.geiger 2005-12-14 09:00:58 |
aac with xmma sudo apt-get install xmms xmms-aac |
