As promised in yesterday's entry, I'm releasing my digital media management software (ztunes) to the world. It's hosted at github: http://github.com/briangoetz/ztunes. It is written in Ruby and based on "rake", the Ruby equivalent of "make". It currently has a long way to go but already does a lot.
You can download the Ruby gem here: http://github.com/briangoetz/ztunes/downloads. (It is not currently in any sort of gem repository.) It defines its gem dependencies, but you'll also need the Unix tools ffmpeg, flac, and lame. It will run on Linux and Mac but currently has some trouble on Windows since it is dependent on symbolic links for some of its functionality, which Windows doesn't support.
My motivation for writing this was that iTunes is really inadequate for managing a media library unless (a) you only want to play on iPod (or other Apple) devices and (b) you are willing to let iTunes be in control of ripping and encoding. This didn't work for us for two reasons: we have Squeezeboxes on all the stereos, and I want to rip my CDs to a non-proprietary, lossless format (that means flac, which iTunew doesn't support.) We also have music that has been aquired in various other forms (MP3s from Amazon, AAC from iTunes, WMA from Rhapsody) and want to be able to play all the music on all the devices, without transcoding it all down to a least-common-denominator. (In other words, if Squeezebox supports WMA but iPod doesn't, let Squeezebox play off the original WMA but let iPod play the transcoded version.) And this should be transparent to the rest of the family.
There are several basic tasks in managing the media library that zTunes automates:
- Content ingestion. I've got a "drop" folder, into which I want to drop the originals of my media, in whatever form, and have them be analyzed, metadata extracted, and filed into a unified library based on its metadata. My metaphor here is the gas tank of an M1 tank: you can pour anything combustible (gasoline, jet fuel, diesel, used cooking oil) into the tank and it figures out how to burn it. Currently it maps a media file to a filename by using the author/album/title tags for audio or the title tag for video; audio files are named like "The Who/Who Are You/Squeezebox.flac".
- Transcoding. Not all devices play all device types. So ingested content also needs to be transcoded into alternate formats, which are maintained as parallel directory trees. The transcoded trees are transient; they are merely shadows of the "authoritative" tree. Some files may need be transcoded to multiple formats; for example, video files ripped from DVD or transferred from TiVo might be transcoded to 480 x 320 video for iPhone but 320 x 240 for the older video iPods.
- Syncing. I use the Windows program "Tag&Rename" to edit the metadata tags on my media files, to normalize genres, naming details like "The Cars" vs "Cars, The", "Vol 1" vs "Disk Two", etc. When I edit the metadata on an "original" file, I'd like the file to be renamed accordingly, and metadata changes to be reflected in the transcoded copies. When I delete an original, I want the transcoded copy to go away. Etc.
- Device management. I would like to have a single directory for each device type, that I can point device-specific library management software (iTunes, Squeezecenter, Creative Explorer) at, and it will see the right view of the media library for that device (will only see files it can play; will see them in the "best" format available for that device.)
One thing it does not do yet is manage the integration of your external media library into iTunes (iTunes is particularly bad at dealing with files you didn't acquire through iTunes.)
See more in the README file here: http://github.com/briangoetz/ztunes/blob/master/README
I'm currently using this to manage a library of ~8,000 media files in half a dozen formats. I'd love to get some more users -- drop me a note if you're interested!