[mythtv-users] User Job fails.

A. F. Cano afc at shibaya.lonestar.org
Thu Jan 14 19:27:36 UTC 2016


On Thu, Jan 14, 2016 at 07:12:32PM +1030, Mark Perkins wrote:
> 
> > On 14 Jan 2016, at 1:34 pm, A. F. Cano <afc at shibaya.lonestar.org> wrote:
> > 
> > Hello everyone,
> > 
> > I've set up a frontend on an underpowered machine that can't keep up with HD,
> > so I've tried to set up "UserJob1" to try to do automatically what I've been
> > doing from the command line:
> > 
> > nice -n 20 mythffmpeg -i <file>.mpg -target ntsc-dvd <file>SD.mpg
> > 
> > This gets cumbersome fast trying to figure out what files go with what shows,
> > so I set up UserJob1  ("Convert to SD") to execute this (in mythtv-setup):
> > 
> > mythffmpeg -i %FILE% -target ntsc-dvd %FILE%
> 
> I haven't tried this but I doubt it will work as input file and output file
> are the same file. If it did / does note that it will destroy the original

That had occurred to me, so I also tried:

mythffmpeg -i %FILE% -target ntsc-dvd %FILE%SD

With the predictable result of the output file name being
1253_20160113180000.mpgSD but it also failed with the same message.

> file. Also I assume when you are running your command from the command line
> you change directory to the correct recording directory first, I don't know

Correct.

> what directory is used as the current directory for myth scripts but I doubt
> it will be the correct recording directory so you will need to incorporate
> the %DIR% parameter into your myth command line. Finally it is different to
> the line you are using top as it does not have the addition of 'SD'. Oh you

The thinking was that since I checked "keep the original file", myth
would take care of the renaming, as well as whatever else it might need
to know about the new SD recording to be able to handle it like any
other recording.  Maybe I was assuming too much.

> may need to double check mythffmpeg is located in your system path but I
> think it should be.

It's in /usr/bin/

> My suggestion would be to create a basic script that takes the %FILE% as
> input and does the sed (or equivalent for your preferred script language)
> conversion to create the desired command line. I imagine it should only
> be a few lines long.

Absent a more native way of doing this, I'll probably try that.  I am
concerned, though, that doing this in a detailed script is doing it
outside of myth and thus how will myth handle the new transcoded video?

> Although to be honest, I bet one of the bash script experts on this list
> could write the whole script on a single line to put direct into myth but
> I'm no expert so I would need to figure it out and test it. Maybe one of
> them will chime in.
> 
> > 
> > The menu entry appears in the jobs menu and running it starts the process
> > (I also checked "keep the original file" so I still would have the original HD
> > version) but when the backend finally starts the job I get this:
> > 
> > I JobQueue: Started Convert to SD for 'POTUS 2016 with Brian Lehrer" recorded from channel 1253 at 2016-01-13T10:00:00Z
> > I Starting process manager
> > I Starting IO manager (read)
> > I Starting process signal handler
> > I Staring IO manager (write)
> > E JobQueue: User job 'mythffmpeg -i 1253_20160113180000.mpg -target ntsc-dvd 1353_20160113180000.mpg' failed.
> 
> This is interesting. The input and output are different file names
> (different channel number 1253 versus 1353). I'm not sure how that has
> come to be.

That's probably my typo.  I copied this manually from one screen to another.
The computer on which the backend is running is different from the one
I'm writing these emails on.

> > 
> > What am I doing wrong?  My guess is that the command line is somehow not
> > correct.
> > 
> > Ideally I would like the transcoded SD video to appear in the frontend screen
> > next to the original so I can watch it, delete it or do any other action to
> > it.  The most likely outcome is that I would watch the SD video, delete it
> > and either delete the HD version or mark it as watched.
> > 
> > How can I achieve this?
> 
> Not easily and not in a supported way. The recommendation I think would be
> to give both the original and new SD version files a name that was parseable
> by mythvideo and move into a video storage group if you wanted to maintain
> both a HD and SD version of the same recording.

Having no clue as to how to do that, can anyone chime in with the
details?

> ...



More information about the mythtv-users mailing list