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
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.

Comments on this weblog
Full Threads Oldest First

Showing messages 1 through 5 of 5.

  • aac with xmma
    2005-12-14 09:00:58  shane.geiger [View]

    sudo apt-get install xmms xmms-aac
  • AAC playback
    2005-07-23 14:33:55  phoenix1029 [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
  • And what about reading itunes streamed music on Linux
    2005-03-13 08:06:05  michel@levy-provencal.net [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)
  • It works for me
    2004-12-23 18:55:40  mike3k [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.
  • mt-daapd vs daapd, and a DAAP tailing concept
    2004-12-23 15:12:23  blech [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.

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:

Sign up today to receive special discounts,
product alerts, and news from O'Reilly.
Privacy Policy >
View Sample Newsletter >
  • Youtube
  • http://www.youtube.com/OreillyMedia
  • Twitter
  • Subscribe
  • View All RSS Feeds >
O'Reilly Media

800-889-8969 or 707-827-7019
Monday-Friday 7:30am-5pm PT
©2011, O'Reilly Media, Inc.
All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.
  • About O'Reilly
  • Academic Solutions
  • Contacts
  • Customer Service
  • Careers
  • Press Room
  • Privacy Policy
  • Terms of Service
  • Writing for O'Reilly
  • Community
  • Authors
  • Forums
  • Membership
  • Newsletters
  • RSS Feeds
  • User Groups
  • More O'Reilly Sites
  • igniteshow.com
  • makerfaire.com
  • makezine.com
  • craftzine.com
  • labs.oreilly.com
  • Partner Sites
  • PayPal Developer Zone
  • O'Reilly Insights on Forbes.com