[mythtv-users] Need help with custom mythtranscode User Job

Chris Pinkham cpinkham at bc2va.org
Mon Nov 14 23:15:56 EST 2005


> Okay, so I've decided to set up my main PC as a slave backend w/no 
> tuners.  What I want to do is set up a User Job to transcode selected 
> programs down to 352x240 MPEG-4 and save them on the slave's local disk 
> so I can watch them over a VPN at a remote location.  Here's my setup:
> 
> So, any suggestions on how to proceed?  I suppose I could patch 
> mythtranscode to take an output parameter...

For now, you could rely on the fact thay Myth opens the output file
with the following options:  O_WRONLY|O_TRUNC|O_CREAT|O_LARGEFILE.

So, in your user job, you should be able to create a link and trick
mythtranscode to writing to your local disk.

ln -s /mnt/video/chanid_startname.nuv /var/lib/mythtv/mythtv/chanid_starttime.mpg.tmp

Then when you're done, delete the
/var/lib/mythtv/mythtv/chanid_starttime.mpg.tmp link.  I think that will work
without touching /mnt/video/chanid_startname.nuv first, but you might
try that if mythtranscode fails.

I've attached a short script I wrote once as a sort of proof of concept.
The attached script will make a transcoded "copy" of the recording in
the database for you.  The new recording will have a starttime of
1 minute after the original and will have "(TRANSCODED)" appended to
the subtitle.  You could easily hack this script to do the link for
you as well as set the hostname to the hostname of your slave backend.
You probably would have to do something about the filename also since this
was written before the .mpg extensions were added unless you don't mind
your transcoded .mpg file still having a .mpg extension.

-- 
Chris



More information about the mythtv-users mailing list