Auto-transcode doesn't work

For discussion related to MythTV which doesn't belong in another forum.

Moderator: Forum Moderators

Post Reply
wrighch
Junior
Posts: 28
Joined: Tue Nov 01, 2016 5:58 pm
United States of America

Auto-transcode doesn't work

Post by wrighch »

I originally posted this to the Troubleshooting topic, but received no responses after several days, so I thought I'd post here to see if anyone can offer any suggestions.

I can't get MythTV's built-in auto-transcode to work. I'm running MythTV v28 (with fixes) on Linux Mint (Sarah). On MythBackend Setup > General > Job Queue (Backend Specific) I have checked “Allow transcoding jobs” and “Allow commercial-detection jobs” and have used Backend Setup > Recording Profiles > Transcoders to configure the “Low Quality” transcoder as I want it. I used Frontend > Manage Recordings > Schedule Recordings > Program Guide > (select a program) > Edit Recording Rule > Post Processing to check both “Commercial Flag new recordings” and “Transcode new recordings” and have specified "Transcode using Low Quality." The specified TV show records as expected, after which mythcommflag runs as specified for commercial detection. But no transcoding occurs. The mythbackend.log shows no entries whatsoever indicating that mythtranscode was even attempted. Nothing at all. If I use Frontend > Media Library > Watch Recordings > Select and right-click a recording > Job Options > Begin Transcoding > Low Quality, then mythtranscode runs and completes as expected.

I have tried with and without selecting commercial flagging and have tried checking and unchecking the backend Job Queue (Global) setting “Run transcode jobs before auto commercial detection.” Still, I see no evidence in the backend log that mythtranscode is ever attempted unless I invoke it manually after the recording completes as described above.

In the mean time, I've configured a User Job to run a script which invokes ffmpeg to do the conversion I need. I also successfully tested a User Job script which directly invokes mythtranscode from within the script; and that also successfully does the transcoding I'm interested in. But I can't seem to get the transcode to happen independent of a User Job. Can anyone suggest anything I am failing to do or any change I need to make to get mythtranscode to run automatically? Thanks.

cw
KennyB
Junior
Posts: 50
Joined: Fri Sep 25, 2015 3:56 am
United States of America

Re: Auto-transcode doesn't work

Post by KennyB »

There's a setting in mythtv-setup were you enter the executable path for the transcoder you want to use. Are you sure it's set to point to mythtranscode?
wrighch
Junior
Posts: 28
Joined: Tue Nov 01, 2016 5:58 pm
United States of America

Re: Auto-transcode doesn't work

Post by wrighch »

I assume you mean BackendSetup > General > Job Queue (Global) > Transcoder command. That setting is exactly as it was populated by the MythTV installer during initial setup. That is, the value is "mythtranscode" - no further path info is provided. I haven't tried setting it to "/usr/bin/mythtranscode" but wonder why I need to do that. When I manually invoke the transcode option by right-clicking a recorded program, the frontend has no trouble initiating mythtranscode. And, further, even if a full path specification were needed, I would still expect to see _something_ in the backend log indicating that an attempt was made to queue a transcode job and that some error or another was encountered. But there is nothing whatsoever in the backend log. And there is no mythtranscode.log either. The mythconverge recorded items indicate that autotranscode is set. But nothing ever happens unless I manually invoke mythtranscode.
wrighch
Junior
Posts: 28
Joined: Tue Nov 01, 2016 5:58 pm
United States of America

Re: Auto-transcode doesn't work

Post by wrighch »

I discovered my mistake. In Backend Setup > Recording Profiles, my MythTV Backend lists four items:
1 Hardware DVB Encovers
2 (A profile Group I defined using "Create new profile group)
3 Transcoders
4 (Create new profile group)

I selected #2 (the profile group I had created for myself) and, having done that, proceeded to select each Transcoder listed for the profile group, checking the "Enable Auto-transcode after recording" box for each. But I failed to do the same for the "Hardware DVB Encoders" profile group. When I went back and did that: Select the Hardware DVB Encoders profile group, and then, one-by-one, selected the Transcoder profiles listed for the profile group, and, for each of them, check the "Auto-transcode after recording" box; I discovered that scheduled recordings allowed me to select my own Transcoder profile and the auto-transcode occured as desired.

As an aside: Before I discovered the above, I created a UserJob that invoked mythtrancode directly rather than ffmpeg (as I had mentioned in my earlier reply). That worked even better than my ffmpeg UserJob after I discovered that UserJobs are started with "/" as the present working directory (PWD.) That would be OK except that mythtranscode, apparently, assumes it is running in a folder within which it has write permission. So it attempts to create its temporary file in its PWD. Since it does not have write permission in "/" the file create fails, but mythtranscode doesn't bother to check the status and blindly continue to transcode the specified file into nothing. When it completes the transcode operation, mythtranscode then blindly attempts to replace the original recording with its (non-existent) temporary file. That operation also fails, and again mythtranscode doesn't bother to check status and proceeds to delete the original recording file, leaving no recording at all!

The UserJob command I provided to invoke mythtranscode directly was: "cd /<pathname>/; mythtranscode -i "%FILE%" -p MyTranscoder"

In the above, <pathname> must be a folder for which the mythtv user has write permission, and "MyTranscoder" is the name of the desired Transcoder profile. Once I did that, the UserJob invoked mythtransocde as desired. But, as mentioned above, once I configured all of the Transcoders associated with the "Hardware DVB Encoders" Profile Group to enable "Enable Auto-transcode after recording" I was able to get auto-transcode to invoke mythtranscode automatically, and now I don't need any UserJobs!

Cheers!

cw
Post Reply