[mythtv-users] OT: Linux Question

Jason Schloer schloer.jason at tangoinc.com
Thu Mar 11 15:57:09 EST 2004



-----Original Message-----
From: mythtv-users-bounces at mythtv.org
[mailto:mythtv-users-bounces at mythtv.org] On Behalf Of Joseph A. Caputo
Sent: Thursday, March 11, 2004 12:35 PM
To: Discussion about mythtv
Subject: Re: [mythtv-users] OT: Linux Question

On Thursday 11 March 2004 11:26, Jason Schloer wrote:
> 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

Sounds intriguing... off the top of my head, I'd guess this would 
require creating a new type of virtual filesystem, which would probably 
mean writing a kernel module.  You might want to google around for 
linux + virtual filesystem and see if anything like this exists.

In the meantime, the simple answer would be to set up a script or 
something to approximate this behavior.  If it were me, I'd consider 
writing a web interface that supported download of files, but which did 
the re-encoding on the fly before downloading.  As a matter of fact, 
I'd wager something like this already exists.  Google & Freshmeat are 
your friends!

-JAC
_______________________________________________
mythtv-users mailing list
mythtv-users at mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


I took a look and it seems like writing a virtual filesstem is the only way
thus far. I could make an addon to AVFS or write my own from scratch, but
nothing prebuilt thus far. 

The web page suggestion would work for re-encoding, but I wanted to share it
off with a samba share so that her windows box and it's odd Rio application
could access it. Thanks for  the tips though, I think it's pointing me in
the right direction. Now I just have to decide if I have the time to get it
done.

-Jason





More information about the mythtv-users mailing list