transcoding (Solved).

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
benlyboy
Newcomer
Posts: 9
Joined: Wed Feb 03, 2016 1:39 am
United States of America

transcoding (Solved).

Post by benlyboy » Sat Dec 15, 2018 5:36 pm

Hi
I been playing around with transcoding, but have run into a problem i was hoping some one can help with.
I was using this blog as a guide in my experimentation, http://blog.gorwits.me.uk/index.html%3Fp=340.html

But when I hit the transcode button it seems to work for a moment then errors out .

This is the log from the attempt.
Dec 15 11:34:08 backend1 mythbackend: mythbackend[1163]: I ProcessRequest mainserver.cpp:1738 (HandleAnnounce) MainServer: MainServer::ANN Monitor
Dec 15 11:34:08 backend1 mythbackend: mythbackend[1163]: I ProcessRequest mainserver.cpp:1743 (HandleAnnounce) MainServer: adding: backend1(5562e38bff50) as a client (events: 1)
Dec 15 11:35:52 backend1 mythbackend: mythbackend[1163]: E ProcessRequest mainserver.cpp:5337 (HandleDeleteFile) MainServer: Unable to find 1007_20180828000000.ts.tmp in HandleDeleteFile()
Dec 15 11:35:54 backend1 mythbackend: mythbackend[1163]: I MythSocketThread(87) mainserver.cpp:7643 (connectionClosed) Monitor sock(5562e38c18a0) 'backend1' disconnected
Dec 15 11:35:54 backend1 mythbackend: mythbackend[1163]: I MythSocketThread(101) mainserver.cpp:7643 (connectionClosed) Monitor sock(5562e38bff50) 'backend1' disconnected
Dec 15 11:35:54 backend1 mythbackend: mythbackend[1163]: I Transcode_19932 jobqueue.cpp:2088 (DoTranscodeThread) JobQueue: Transcode Errored: "American Ninja Warrior":"Las Vegas Finals Night 1": Autodetect (exit status 255, job status was "Errored")
The problem seems to me to be in this line "Unable to find 1007_20180828000000.ts.tmp in HandleDeleteFile()"

The only thing I found that came up on a google search was this page. https://www.reddit.com/r/mythtv/comment ... ode_error/ but the link the guy gives as having the answer no longer works.

Any help would be appreciated thanks
Last edited by Steve Goodey on Sat Dec 22, 2018 12:22 pm, edited 1 time in total.
Reason: Added solved.

User avatar
bill6502
Developer
Posts: 1355
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: transcoding

Post by bill6502 » Mon Dec 17, 2018 4:03 am

Right, the 'E' in the message stands for error ('I' = information etc.)

The code is searching for the file in a Storage Group. Which isn't printed in
the logs above.

I'd try transcoding from the command line, for example:

Code: Select all

mythtranscode --chanid 1091 --starttime 20181111060000 --verbose file:debug --logpath /tmp
and look for a line containing something like this: SG(Default): FindFile: Searching for '1091_20181111060000.ts'

The log output will be in a file under /tmp. It can then be searched
from your favorite editor etc.

This assumes your user or group has write permission in the Storage Directory
in play.

benlyboy
Newcomer
Posts: 9
Joined: Wed Feb 03, 2016 1:39 am
United States of America

Re: transcoding

Post by benlyboy » Thu Dec 20, 2018 2:17 am

Sorry i have been so slow in my reply, Christmas is a busy time.
i tried what you suggested this is the log that was generated...
2018-12-17 18:05:58.395730 C [16515/16515] thread_unknown mythcommandlineparser.cpp:2619 (ConfigureLogging) - mythtranscode version: fixes/29 [v29.1-13-g329c235] www.mythtv.org
2018-12-17 18:05:58.395749 C [16515/16515] thread_unknown mythcommandlineparser.cpp:2621 (ConfigureLogging) - Qt version: compile: 5.9.4, runtime: 5.9.5
2018-12-17 18:05:58.395751 N [16515/16515] thread_unknown mythcommandlineparser.cpp:2623 (ConfigureLogging) - Enabled verbose msgs: general file
2018-12-17 18:05:58.395797 N [16515/16515] thread_unknown logging.cpp:927 (logStart) - Setting Log Level to LOG_INFO
2018-12-17 18:05:58.406679 I [16515/16519] Logger logging.cpp:313 (run) - Added logging to the console
2018-12-17 18:05:58.407152 I [16515/16515] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Interrupt handler
2018-12-17 18:05:58.407164 I [16515/16515] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Terminated handler
2018-12-17 18:05:58.407176 I [16515/16515] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Segmentation fault handler
2018-12-17 18:05:58.407185 I [16515/16515] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Aborted handler
2018-12-17 18:05:58.407196 I [16515/16515] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Bus error handler
2018-12-17 18:05:58.407204 I [16515/16515] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Floating point exception handler
2018-12-17 18:05:58.407216 I [16515/16515] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Illegal instruction handler
2018-12-17 18:05:58.407227 I [16515/16515] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Real-time signal 0 handler
2018-12-17 18:05:58.407238 I [16515/16515] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Hangup handler
2018-12-17 18:05:58.407351 N [16515/16515] thread_unknown mythdirs.cpp:195 (InitializeMythDirs) - Using runtime prefix = /usr
2018-12-17 18:05:58.407355 N [16515/16515] thread_unknown mythdirs.cpp:197 (InitializeMythDirs) - Using configuration directory = /home/graham/.mythtv
2018-12-17 18:05:58.407438 I [16515/16515] CoreContext mythcorecontext.cpp:271 (Init) - Assumed character encoding: en_US.UTF-8
2018-12-17 18:05:58.407841 N [16515/16515] CoreContext mythcontext.cpp:599 (LoadDatabaseSettings) - Empty LocalHostName.
2018-12-17 18:05:58.407849 I [16515/16515] CoreContext mythcontext.cpp:607 (LoadDatabaseSettings) - Using localhost value of backend1
2018-12-17 18:05:58.407908 I [16515/16515] CoreContext mythcontext.cpp:852 (TestDBconnection) - Start up testing connections. DB 192.168.1.222, BE , attempt 0, status dbAwake
2018-12-17 18:05:58.507297 D [16515/16518] LogForward loggingserver.cpp:1399 (forwardMessage) - New Logging Client: ID: (#1)
2018-12-17 18:05:58.507387 I [16515/16518] LogForward loggingserver.cpp:146 (FileLogger) - Added logging to /tmp/mythtranscode.20181217230558.16515.log
2018-12-17 18:05:58.922957 N [16515/16515] CoreContext mythcorecontext.cpp:1768 (InitLocale) - Setting QT default locale to en_US
2018-12-17 18:05:58.922968 I [16515/16515] CoreContext mythcorecontext.cpp:1801 (SaveLocaleDefaults) - Current locale en_US
2018-12-17 18:05:58.923013 N [16515/16515] CoreContext mythlocale.cpp:123 (LoadDefaultsFromXML) - Reading locale defaults from /usr/share/mythtv//locales/en_us.xml
2018-12-17 18:05:58.930932 I [16515/16515] CoreContext mythtranslation.cpp:73 (load) - Loading en_us translation for module mythfrontend
2018-12-17 18:05:58.931013 E [16515/16515] CoreContext main.cpp:501 (main) - Couldn't find recording for chanid 1091 @

busbee
Junior
Posts: 31
Joined: Sun Oct 14, 2018 12:07 pm
United States of America

Re: transcoding

Post by busbee » Thu Dec 20, 2018 7:38 pm

I read that blog: nice write-up. We need more of those for myth-tv. I look forward to attempting some of those techniques....

So, your error looks like it is trying to delete a file that either does not exist, or it does not have permissions to.
When bill6502 was telling you to run it manually, he was giving an EXAMPLE, which you seemed to take literally.
It looks like you ran his example command for a channel and file that may not exist on your system. chanid 1091.
You might want to try the command for an actual recording on your system. From the log you gave:
1007_20180828000000.ts may be a good place to start. If that file exists in your mythtv recs folder, I think the default (ubuntu) is /var/lib/myth/recs/ folder then you can run the command:

First, see if the file exist and has the write spelling (date and time in the name) and permissions:

Code: Select all

ls -l /var/lib/mythtv/recs/1007*
The above command should give you a listing of the files from that channel. You should see something like

Code: Select all

-rw-rw-r-- 1 mythtv mythtv  519700361 Aug 29 01:00 1007_20180828000000.ts 

The date, time and size may be different... the important thing is the file name.

Side note: I just realized that this recording occurred at midnight.... which may have started on one day and finished on the next. Could that be part of the problem? If so, it would be a bug. But, I can't imagine someone not running into this before.

Check the Filename and the permissions. You need to have rw permissions. Either you need to be logged in as mythtv (sudo su mythtv) for the first rw- or your login is in the mythtv group which allows you to read and write if the second rw is there. My experience is that permissions is 90% of problems. Let me know if you need help with this or have no idea what I am talking about. Then you can run the following to test:

Code: Select all

mythtranscode --chanid 1007 --starttime 20180828000000 --verbose file:debug --logpath /tmp
# we are assuming that you have permissions to this folder, including write.
(I could be totally off here, and please don't think I am patronizing you, just trying to help.)

benlyboy
Newcomer
Posts: 9
Joined: Wed Feb 03, 2016 1:39 am
United States of America

Re: transcoding

Post by benlyboy » Fri Dec 21, 2018 12:15 am

Thanks for you reply
i'm not at home at the moment so I haven't had a chance to test the ideas you have given. But you post did make me think about something, mythtv uses directory groups, in my case I have three different directories as I have three HD's. Could this be part of the problem? As for permissions I believe mythtv has permission it is able to record and read files to and from these directories. But i will check.

thanks for the reply...

I'll look at the things you talked about when i get home .

benlyboy
Newcomer
Posts: 9
Joined: Wed Feb 03, 2016 1:39 am
United States of America

Re: transcoding

Post by benlyboy » Sat Dec 22, 2018 12:58 am

Hi.
Ok i had a chance to run a test..and you were right i had screwed up the last one. below is the end of the log file from the new test. as you can see its very different from the last.

I think these to line hold the clues but i'm not sure what i need to do next.
No video information found!
Please ensure that recording profiles for the transcoder are set

I think it found the recording ok as the log has the right path, Transcoding /var/lib/mythtv/disk_2/1030_20181215010000.ts failed

2018-12-21 18:49:57.133995 I [6936/6942] SendMessage mythcorecontext.cpp:448 (ConnectCommandSocket) - MythCoreContext::ConnectCommandSocket(): Connecting to backend server: 192.168.1.222:6543 (try 1 of 1)
2018-12-21 18:49:57.135555 I [6936/6942] SendMessage mythcorecontext.cpp:1665 (CheckProtoVersion) - MythCoreContext::CheckProtoVersion(): Using protocol version 91 BuzzOff
2018-12-21 18:50:07.344990 N [6936/6936] CoreContext transcode.cpp:118 (GetProfile) - Transcode: Looking for autodetect profile: Autodetect from 480i
2018-12-21 18:50:07.362763 N [6936/6936] CoreContext transcode.cpp:143 (GetProfile) - Transcode: Using autodetect profile: MPEG2
2018-12-21 18:50:07.362813 E [6936/6936] CoreContext transcode.cpp:766 (TranscodeFile) - No video information found!
2018-12-21 18:50:07.362816 E [6936/6936] CoreContext transcode.cpp:768 (TranscodeFile) - Please ensure that recording profiles for the transcoder are set
2018-12-21 18:50:07.366884 E [6936/6936] CoreContext main.cpp:733 (main) - Transcoding /var/lib/mythtv/disk_2/1030_20181215010000.ts failed
2018-12-21 18:50:07.366903 I [6936/6936] CoreContext mythcontext.cpp:1610 (~MythContext) - Waiting for threads to exit.
Thanks again

benlyboy
Newcomer
Posts: 9
Joined: Wed Feb 03, 2016 1:39 am
United States of America

Re: transcoding

Post by benlyboy » Sat Dec 22, 2018 11:48 am

Ok thanks everyone that posted for the help (-:

You guys gave me the tool i needed to fix this by showing how to get a log file.
I figured it out last night and it was as simple as ticking a box.
After researching on line and reading the log report, i thought it has to have something to do with the transcoding profile
i found them in "recording profiles=>transcoders" in the mythbuckend setup".
i knew from the log file it was using autodetect" profile: MPEG2".
I went into this profile and found a setting for "Enable auto-transcode after recording", i ticked this box and all worked as it should.

Thanks again for the help

benlyboy
Newcomer
Posts: 9
Joined: Wed Feb 03, 2016 1:39 am
United States of America

Re: transcoding

Post by benlyboy » Sat Dec 22, 2018 12:01 pm

how do you set a post to solved?

User avatar
Steve Goodey
Moderator
Posts: 82
Joined: Fri Feb 07, 2014 6:30 pm
Location: Colchester, England
Great Britain

Re: transcoding (Solved).

Post by Steve Goodey » Sat Dec 22, 2018 12:22 pm

Done. :D

Post Reply