[mythtv-users] How to find the input used in a recording?

Stephen Worthington stephen_agent at jsw.gen.nz
Fri Oct 23 02:46:15 UTC 2020


On Thu, 22 Oct 2020 20:32:05 -0500, you wrote:

>One of my tuner is bad and it produces 0 byte recordings whenever that 
>tuner is used. I am not sure which one it is. How do I find out from the 
>recorded program information? I mean, when I look up previously recorded 
>programs, I do not get input information. Is that kept in the database, 
>if so how do I get it?

On a recording, push the I key twice and scroll down if necessary to
find the "Recording Input:" field.  In the database, this is the
recorded.inputname field.  It does rely on you having set up the names
for the tuners in mythtv-setup so that you can differentiate them.
From SQL a query like this should work:

select chanid,starttime,title,inputname from recorded where filesize=0
order by starttime desc limit 10;

You can also look in mythbackend.log.  I do this grep command daily to
check for damaged recordings:

grep -a "overall_score=\"0" /var/log/mythtv/mythbackend.log

However, the log lines that relies on may only be there if you have
the "-v record" option set on your mythbackend command line.  I always
have that option set.  Here is the sort of message that grep will
find:

Oct 17 04:51:47 mypvr mythbackend: mythbackend[3235]: I TVRecEvent
tv_rec.cpp:826 (FinishedRecording) TVRec[92]:
FinishedRecording(10007_2020-10-16T15:51:26Z) damaged
recq:<RecordingQuality overall_score="0"
key="10007_2020-10-16T15:51:26Z" continuity_error_count="0"
packet_count="116465">#012    <Gap start="2020-10-16T15:20:00Z"
end="2020-10-16T15:51:27Z" duration="1887" />#012    <Gap
start="2020-10-16T15:51:47Z" end="2020-10-16T16:10:00Z"
duration="1092" />#012</RecordingQuality>

The tuner number is available as the [92] in TVRec[92] in that
message.  I believe all messages referring to a tuner will have the
tuner number in that format.


More information about the mythtv-users mailing list