[current category: main » media » musicstorage8]
MikeyP.com

About This Site
Main Page
About MikeyP
Subscribe to Feed

Apr 01, 2005

Serving Lossless Audio to iTunes with mt-daapd

Continued from musicstorage [musicstorage4, musicstorage6, musicstorage1, musicstorage2, musicstorage-solved3, musicstorage3, musicstorage-solved1, musicstorage8, musicstorage-solved2, musicstorage5, musicstorage7]

Among the requirements I've set for a Whole-House Music Storage system, two are:

  1. Support bit-perfect copies of my CD collection (likely via lossless compression)
  2. Support playback via iTunes

iTunes has native support for three bit-perfect formats: WAV, AIFF, and Apple Lossless Encoding. Of the three, WAV is the most widely supported among other audio players. Unfortunately, WAV files are not only large, they also do not contain meta-data like you'd find in an mp3 file. Meta-data is used to search and display song titles, artists, genres, and other information. Luckily, as I found in my research on audio server software, there are other ways to get music playback in iTunes, including support for other audio formats.

Thanks to the efforts of the open-source community (and Apple themselves for open-sourcing some key technology), you can stream audio to iTunes from a seperate server. This is done by installing and configuring software from either the daapd or mt-daapd projects. Both compile on Linux [Answers] and other Unix-ish operating systems (like OS-X [Answers]!), and both allow you to stream digital audio to computers running iTunes. They can also serve audio to other players that support Apple's streaming audio system, such as the Roku SoundBridge. mt-daapd is the more mature software, as its multi-threading ability gives it better performance. But there's more…

Recently, mt-daapd gained the ability to transcode [Answers] audio on-the-fly. This means that, in real time, mt-daapd can convert various digital audio formats to the WAV format, which is natively supported by iTunes. This gives mt-daapd the ability to serve any type of audio file format on the server to iTunes. Currently, mt-daapd has built-in support for FLAC and Ogg Vorbis audio files, so if you wanted, you could encode your whole music collection in the Lossless FLAC format and listen to it via iTunes. This works even though FLAC is not natively supported by iTunes. How cool is that? But there's even more…

The transcoder in mt-daapd is easily extensible. By editing a simple configuration file and a helper script, you can add support for new audio formats. With a patch to the powerful open-source media player MPlayer [mplayer, mplayersilent], I am now able to stream files encoded in the widely supported WMA Lossless format to iTunes! (More details here). Awesome! Meta-data from WMA files is not yet supported (as mt-daapd uses its own database to store meta-data from various audio formats), but there's nothing stopping this from happening soon other than some dedicated time from the enthusiastic mt-daapd developers.

For me, this makes mt-daapd one of the killer apps in a Whole-House Music Storage system, as it solves a key problem of using a single lossless compression format supported by all possible audio players. Way to go, mt-daapd crew!

category: /media |
3 writebacks and comments | Share/Save/Bookmark

Writebacks

First cut of wma metainfo parsing is done. You'll want to force rescans of .wma files… you can do that with:

 %sqlite /path/to/songs.db
  sqlite> update songs set force_update=1 where upper(type)='WMA';
  sqlite> .quit% 

So far it's only scanning artist, album, year, genre, that sort of thing. Next couple days I'll hope to fill it out more. Check it out! Leave feedback in the forums.

posted by: Ron Pedde | URL: nightlies.mt-daapd.org

I thought leading spaces was Tiki for codeblock. Apparently not. :)

posted by: Ron Pedde | URL: nightlies.mt-daapd.org

Whoohoo, great news Ron, thanks! (and DOH, looks like I have a bug in my Tiki writeback formatting hack… argh...)

posted by: MikeyP | URL: www.mikeyp.com
MikeyP.com

About This Site
Main Page
About MikeyP
Subscribe to Feed