LinuxDevCenter.com

oreilly.comSafari Books Online.Conferences.

We've expanded our Linux news coverage and improved our search! Search for all things Linux across O'Reilly!

Search
Search Tips

advertisement

Streaming iTunes from Ubuntu

   Print.Print
Email.Email weblog link
Discuss.Discuss
Blog this.Blog this

Niel Bornstein
Dec. 23, 2004 05:38 AM
Permalink

Atom feed for this author. RSS 1.0 feed for this author. RSS 2.0 feed for this author.

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.

Niel Bornstein is a Senior Architect for Novell's Systems and Resource Management Business Unit specializing in data center automation.

Are you streaming iTunes on Linux?
You must be logged in to the O'Reilly Network to post a comment.
Post Comment
Full Threads Newest First

Showing messages 1 through 5 of 5.

  • mt-daapd vs daapd, and a DAAP tailing concept
    2004-12-23 15:12:23  blech [Reply | View]

    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.

    However, I've generally been happier with mt-daapd, despite the speed of connection; recent versions support the compilation tag (TCMP, I believe) in ID3v2.3, which is supported really nicely in iTunes itself, and its logging, playlist and configuration support all seem more mature.

    One idea that I never did get around to- and given the changes in my network setup now I've moved, I'm unlikely to- is the concept of tracking the DAAP server log and playing the same song on the Linux box as well. That would give you the ability to use the iTunes interface to pick songs, while also using your better speakers to listen to them. (You'd have to be careful if you get multiple DAAP sessions, and there's the problem of the Mac making noise at the same time, but I'm sure these can all be worked around). Anyway, it's a nice idea to think about, perhaps.

    I await the results of your search for AAC playback with interest.
  • It works for me
    2004-12-23 18:55:40  mike3k [Reply | View]

    I just installed it on my box running Debian sarge and I'm able to connect to it and play music from my powerbook.
  • And what about reading itunes streamed music on Linux
    2005-03-13 08:06:05  michel@levy-provencal.net [Reply | View]

    I would like to read some music streamed by my Powerbook itunes, on a PC working ubuntu...

    Is there a way to do it?

    Do you know it exists a linux software that can be client of itunes stremed media?

    Thanks for your help.

    MLP (michel at levy-provencat dot net)
  • AAC playback
    2005-07-23 14:33:55  phoenix1029 [Reply | View]


    Transcode Home Page:
    http://www.theorie.physik.uni-goettingen.de/~ostreich/transcode/

    Guide to ripping and encodeing under linux:
    http://www.bunkus.org/dvdripping4linux/en/single/index.html

    Monitor These lists for changes to the CVS sources of XVID
    http://edu.bnhof.de/pipermail/xvid-devel/


    Unoffical Debian APT sources I use (with apt-pinning testing/unstable)

    # Video Packages like transcode, mplayer, xvid
    deb http://marillat.free.fr/ testing main

    # Video Packages like transcode, mplayer, xvid
    deb http://marillat.free.fr/ unstable main

    ##RAREWARES AAC/MP4 (faad2, faac, aac/mp4 playback plugins)
    deb http://pessoal.onda.com.br/rjamorim/debian/ ./

    ##RAREWARES MAIN (lame, lame-ha, lamip, cue2toc, shntool)
    deb http://rarewares.hydrogenaudio.org/xmixahlx/debian/ ./
    deb http://xmixahlx.dyndns.org/debian/ ./

    # mkvtoolnix
    deb http://www.bunkus.org/debian/unstable/ ./


    those are some media sources to add to your sources.list for debian sid. I don't know how that works w\ unbuntu but last i checked unbuntu already had the packages they just needed to be installed. xmms should then work with it.
    question i am on debian sid, what are the sources you used to get howl and mt-daapd. are they part of the standard or did you find them somewhere else? thanks
  • aac with xmma
    2005-12-14 09:00:58  shane.geiger [Reply | View]

    sudo apt-get install xmms xmms-aac

Showing messages 1 through 5 of 5.

Return to weblogs.oreilly.com.



Weblog authors are solely responsible for the content and accuracy of their weblogs, including opinions they express, and O'Reilly Media, Inc., disclaims any and all liabililty for that content, its accuracy, and opinions it may contain.

Creative Commons License This work is licensed under a Creative Commons License.



Advertisement

Sponsored by:

O'Reilly Media

©2009, O'Reilly Media, Inc.
(707) 827-7000 / (800) 998-9938
All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.
About O'Reilly
Academic Solutions
Authors
Contacts
Customer Service
Jobs
Newsletters
O'Reilly Labs
Press Room
Privacy Policy
RSS Feeds
Terms of Service
User Groups
Writing for O'Reilly
Content Archive
Business Technology
Computer Technology
Google
Microsoft
Mobile
Network
Operating System
Digital Photography
Programming
Software
Web
Web Design
More O'Reilly Sites
O'Reilly Radar
Ignite
Tools of Change for Publishing
Digital Media
Inside iPhone
O'Reilly FYI
makezine.com
craftzine.com
hackszine.com
perl.com
xml.com

Partner Sites
InsideRIA
java.net
O'Reilly Insights on Forbes.com