[geeks] Dynamic files / filesystems?

Kurt Huhn kurt at k-huhn.com
Thu Jun 6 09:14:37 CDT 2002


> I'm building my multimedia store around a 100Gb drive in a PC to house
> primarily my ripped CD collection. I'd like to use FLAC (since I'm more
> concerned about quality than space) but my plans still require access to
> mp3s. Rather than have 2 duplicate directory trees storing FLAC files in one
> and the mp3 version on the other and the subsequent management headaches and
> unnecessary space consumption, I was hoping to somehow have a dynamic
> filesystem where the mp3 directory tree is but a shadow of the FLAC
> filesystem, and all reads of the mp3 version of a song actually trigger a
> JIT transform of the underlying FLAC file to mp3.
> 

I'm not familiar with FLAC other than knowing what the initials stand
for, but it seems likes a simple solution.  Say you have a directory
structure with FLAC files, and you want to mirror those files in MP#
format?  I personally would do this with a script using a combo of find,
a FLAC -> MP3 convertor, and a cron job.  So you have two identical
directory structures, one with FLAC files, one it MP3.  Set it to run
once a day at midnight or something...

So, find (with some flags) looks for FLAC files, compares the result
against the MP3 directoy and files, and if there's not a corresponding
match in the MP3 directory it converts the FLAC file to MP3 and inserts
it in the appropriate directory.

Not very elegant, but simple and easy to do.  I call this the 'brute
force' method :)
-- 
Kurt
kurt at k-huhn.com



More information about the geeks mailing list