[mythtv-users] OT: Linux Question

Jason Schloer schloer.jason at tangoinc.com
Thu Mar 11 11:26:51 EST 2004


Okay this is pretty offtopic, but I want it for my Myth box, so I figure I'd
pick the brains of this well rounded list. 
The challenge is I want a fake directory setup which mirrors an actual
directory (lists files, etc.), but runs a script on the files when they are
accessed. Details follow:

Basically I'm putting all of my CDs onto my myth box for use with Myth
Music. I've then shared the directory out with Samba so that I can access it
with windows boxes, etc. I just bought my girlfriend a new MP3 player and
transferring to it works like a charm, however I've been encoding all of my
CDs at high quality since I'll be playing them out of my stereo. But at high
quality she gets very few songs on the 128MB that come with the Rio. So what
I want to do is setup a directory which would mirror the mp3 directory and
run a script on each file as it is accessed, so that I can recompress it on
the fly. As it is I run icecast with ices to listen to my music at work, so
I know I can recompress to 56kbps quickly and with decent enough quality for
cheap earbud headphones. So in theory if I had this I could create a virtual
directory like /var/music/recompress/56k or /var/music/recompress/128k. Then
whenever I transfer a file from the directory it would recompress it. Then I
could share it with Samba and get the files at lower quality automatically. 

Anyway, without rambling further, is this possible with existing features
and tools in linux? Or will I need to look into writing something myself?
Thanks in advance for the help

-Jason Schloer




More information about the mythtv-users mailing list