[mythtv-users] Replacing mythtranscode command with a custom script

Ronald Frazier ron at ronfrazier.net
Thu Sep 8 03:44:18 UTC 2011

> Does anyone have experience doing this successfully?
> I changed the command on mine to run a custom transcoding script based on
> the 'transcode wrapper stub' from the wiki.  When this runs it spits out an
> error in the log files:
> 2011-09-05 17:07:53.291 transcode: Transcode Errored: "Between the Lions":
> Autodetect (exit status 0, job status was "Starting")
> The script however seems to have worked correctly.  Does anyone know what
> may be causing this error?

Although I haven't actually used it in quite a while, I did setup a
custom transcoding script under mythtv 0.22. As I recall, the problem
is that the transcoding job is responsible for updating the job status
information in the database. Looking at my code, when I finish
successfully, I execute the following query:

UPDATE jobqueue SET status=272, comment='Done' WHERE id=<JOBID>

The value of <JOBID> would be passed into your script as one of the
command line parameters. For instance, my setting for
JobQueueTranscodeCommand is:

/usr/local/scripts/transcode_wrap %JOBID% %CHANID% %STARTTIME% %DIR%

I also don't know if there is a better, more official way to do it,
but this has worked fine for me in the past.

You can also periodically provide updated progress messages as the
script runs by setting status to 4 and setting comment to your
message. That message will then show up when you view the job in
mythfrontend or mythweb.

Ron Frazier

More information about the mythtv-users mailing list