[mythtv-users] Order of transcode and userjobs

Jason Stone mythtv at oceansidemortgage.net
Sat Feb 18 01:13:44 UTC 2006


Cool thanks...

I'm sure I would have found that if I had looked harder.

I didn't really want to run the svn so I ended up adding the -l as enabled by default (in the source) in mythtranscode so that the cutlist would be enabled.

--Jason

Original Message -----------------------
> I was wondering if there was anyway to complete a user job before using
> transcoding (autotranscode to remove commercials).  I need the user
> job to run first so that the cutlist gets generated.
> 
> If not can you point me to where the order is defined and I'll see if I
> can modify it.

The order is defined by the code in JobQueue::QueueJobs() in
libs/libmythtv/jobqueue.cpp.

I've been considering making a setting for each of the User Jobs that would
allow you to run a User Job before the transcoder and flagger or between
them, but haven't got around to it.

For your purposes, you can edit JobQueue::QueueJobs() and do something like
move the following 2 lines up to inbetween where the transcode and commercial
flagging jobs get queued:

Move this (move, don't copy, otherwise it could get run twice):

    if (jobTypes & JOB_USERJOB4)
        QueueJob(JOB_USERJOB4, chanid, starttime, args, comment, host);

Up so it gets run between the transcoder and flagger like this:

    if (gContext->GetNumSetting("AutoTranscodeBeforeAutoCommflag", 0))
    {
        if (jobTypes & JOB_TRANSCODE)
            QueueJob(JOB_TRANSCODE, chanid, starttime, args, comment, host);
        if (jobTypes & JOB_COMMFLAG)
            QueueJob(JOB_COMMFLAG, chanid, starttime, args, comment, host);
    }
    else
    {
        // Run the flagger, then User Job #4, then the transcoder
        if (jobTypes & JOB_COMMFLAG)
            QueueJob(JOB_COMMFLAG, chanid, starttime, args, comment, host);
        if (jobTypes & JOB_USERJOB4)
            QueueJob(JOB_USERJOB4, chanid, starttime, args, comment, host);
        if (jobTypes & JOB_TRANSCODE)
            QueueJob(JOB_TRANSCODE, chanid, starttime, args, comment, host);
    }

If you really trust the flagger that much and are using SVN, then you can
use the new settings I just added tonight that allow you to specify the
command to run for mythtranscode.  You could just tell Myth to run the
following for transcoding instead of the default command:

	/path/to/your/bin/directory/mythtranscode -j %JOBID -V %VERBOSELEVEL% -p %TRANSPROFILE% -l

The '-l' is the only thing different than the command that would normally
get run by the JobQueue.  "-l" tells mythtranscode to apply the cutlist and
this option is only passed to mythtranscode when you manually schedule a
transcoding job, not when one runs automatically.  The setting is on the
JobQueue global settings page in mythtv-setup.

-- 
Chris

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



More information about the mythtv-users mailing list