[mythtv-users] Transcoding files

Jon Larson jtlarson at u.washington.edu
Wed May 23 17:52:27 UTC 2007

> On 05/22/2007 07:25 PM, Darryl Merritt wrote:
>> Everytime I think of a good idea, someone has already done it.. so I'll
>> ask here first.
>> Is there a script or application that will monitor the jobqueue and start
>> transcoding jobs on a host that is not running as a mythbackend or
>> frontend?
> Just run mythjobqueue on the server.  Install Myth on the server and 
> configure it as a remote backend, but don't run mythbackend, run 
> mythjobqueue, instead.
I'm doing this very thing with a modified version of pdatranscode. I 
needed to modify it because the directory supplied by the jobqueue 
always refers to the recorded file by it relative path on the original 
recording server--i.e. if you store your recordings in /var/video on the 
mythbackend, the server that is running the jobs will look for the 
recordings in it's own /var/video folder.

If you only have one mythbackend, just set up a nfs share to the 
recording directory with the same folder path as the backend  and the 
problem is solved.

In my case I have three backends with storage, so I inserted a find 
statement into the script so that it can locate the true path to the 
# code for adding Find function to pdatranscode
#this goes near the beginning of the script with the other 'use'  
use File::Find;

#I place this section directly after the "normal command-line argument 
processing" section
print("Myth says the directory should be $config{dir}...\n");
print("finding file directory...\n");
find (\&wanted, '/mnt/mythtv/tv/', '/mnt/mythtv2/tv/', '/mnt/mythtv3/tv/');
print "The file was found in $config{dir}\n";

#this goes in the subroutine section
# Loop to find file path on multiple backends...
sub wanted {
    if ($_ eq "$config{file}") {
        $config{dir} = "$File::Find::dir";

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-users/attachments/20070523/0059c5df/attachment.htm 

More information about the mythtv-users mailing list