zTunes released - No Fluff Just Stuff

zTunes released

Posted by: Brian Goetz on

<p>As promised in yesterday's entry, I'm releasing my digital media management software (ztunes) to the world.  It's hosted at github: <a href="http://github.com/briangoetz/ztunes">http://github.com/briangoetz/ztunes</a>.  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. </p><p>You can download the Ruby gem here: <a href="http://github.com/briangoetz/ztunes/downloads">http://github.com/briangoetz/ztunes/downloads</a>.  (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.</p><p>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.</p><p>There are several basic tasks in managing the media library that zTunes automates:</p><ul><li>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".  </li><li>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.  </li><li>Syncing.  I use the Windows program "Tag&amp;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.</li><li>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.)  </li></ul><p>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.) </p><p>See more in the README file here: <a href="http://github.com/briangoetz/ztunes/blob/master/README">http://github.com/briangoetz/ztunes/blob/master/README</a></p><p>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! </p><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8803652895687747114-5758472055797344271?l=briangoetz.blogspot.com' alt='' /></div>
Brian Goetz

About Brian Goetz

Brian Goetz has been a professional software developer for 20 years. He is the author of over 75 articles on software development, and his book, Java Concurrency In Practice, was published in May 2006 by Addison-Wesley. He serves on the JCP Expert Groups for JSRs 166 (concurrency utilities), 107 (caching), and 305 (annotations for safety analysis). He is a frequent presenter at JavaOne, OOPSLA, JavaPolis, SDWest, and the No Fluff Just Stuff Software Symposium Tour. Brian is a Sr. Staff Engineer at Sun Microsystems.

Why Attend the NFJS Tour?

  • » Cutting-Edge Technologies
  • » Agile Practices
  • » Peer Exchange

Current Topics:

  • Languages on the JVM: Scala, Groovy, Clojure
  • Enterprise Java
  • Core Java, Java 8
  • Agility
  • Testing: Geb, Spock, Easyb
  • REST
  • NoSQL: MongoDB, Cassandra
  • Hadoop
  • Spring 4
  • Cloud
  • Automation Tools: Gradle, Git, Jenkins, Sonar
  • HTML5, CSS3, AngularJS, jQuery, Usability
  • Mobile Apps - iPhone and Android
  • More...
Learn More »