Friday, January 8, 2010

A busman's holiday

Since I've been working way too hard, of course I decided to spend my XMas break...programming.  (  I had two goals: rewrite my digital-media handling software, and learn Ruby.  I'm pretty happy with what I accomplished on both counts.

The motivation to rewrite my digital-media scripts came from having too many conversations like the one below with Stuart Marks:

SM: Hey, you wrote a bunch of scripts to manage audio and video files, are you willing to share them?
BG: Well, in theory, yes.  But I'm kind of embarassed to show them to anyone...
SM: Let me guess.  Perl?
BG: Yep.
SM: I have a Perl story...
BG: Don't bother -- all Perl stories end the same way.

I'll post the full details soon -- including links to the software on github -- but for now I'll just outline the problem I was trying to solve:

  • Ingest digital media files in any format (MP3, AAC, WMA, WAV, FLAC, M4A, M4V, WMV, MP4, etc)
  • File them into a library based on their metadata
  • Additionally transcode them down to one or more "compressed" formats (MP3 for audio, iPhone-sized Mp4 for video) for memory-constrained devices, without letting go of the original
  • Organize them so that each device (iPod, Squeezebox, non-iPod MP3 player) can play all the media, in the best format that the device can recognize natively (Squeezebox supports MP3, WMA, and FLAC; iPod supports MP3 and AAC; Zen supports MP3 and WMA) or a transcoded form if it can't.  For example, for a given track whose source form is WMA, Squeezebox and Zen should see the WMA but iPod should see the MP3; for a track in FLAC, Squeezebox should see the FLAC but iPod/Zen should see the transcoded MP3. 



No comments:

Post a Comment