[mythtv-users] User Job fails.

John Pilkington J.Pilk at tesco.net
Thu Jan 14 09:38:34 UTC 2016


On 14/01/16 08:42, 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 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 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 may need to double check mythffmpeg is located in your system path but I think it should be.
>
> 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.
>
> 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.
>
>>
>> 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.
>
>>
>> Thanks for any help.  I keep getting more and more amazed at the flexibility
>> of mythtv every time I think of something new I'd like and it appears to be
>> possible out-of-the-box, but unfortunately with all that flexibility comes
>> some complexity.  Kudos to the developers!
>>
>> PS: the backend is 0.27-5 from deb-multimedia.org running on Debian
>> Jessie and the frontend is 0.27-5 compiled from source downloaded from
>> mythtv.org.
>>

Yes, it looks as if the error is using %FILE% for both input and output. 
  The suggestion to put at least the output file into a Video Storage 
Group seems good, but I haven't examined exactly how the parsing of job 
parameters works.



More information about the mythtv-users mailing list