New Install Marking all Recordings as Damaged.

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

Moderator: Forum Moderators

mattq
Newcomer
Posts: 10
Joined: Thu May 26, 2022 8:38 pm
United States of America

New Install Marking all Recordings as Damaged.

Post by mattq »

I am currently using a Virtual ESXi Ubuntu 18.04.06 with MythTV 30.

ii libmythtv-perl 2:30.0+fixes.202103232211.7d297b1fb8~ubuntu18.04.1 all Perl library to access some MythTV features
ii mythtv-backend 2:30.0+fixes.202103232211.7d297b1fb8~ubuntu18.04.1 amd64 Personal video recorder application (server)
ii mythtv-common 2:30.0+fixes.202103232211.7d297b1fb8~ubuntu18.04.1 amd64 Personal video recorder application (common data)
ii mythtv-dbg 2:30.0+fixes.202103232211.7d297b1fb8~ubuntu18.04.1 amd64 Debug symbols for mythtv packages
ii mythtv-frontend 2:30.0+fixes.202103232211.7d297b1fb8~ubuntu18.04.1 amd64 Personal video recorder application (client)
ii mythtv-theme-mythbuntu 2:30.0+fixes.202103232211.7d297b1fb8~ubuntu18.04.1 all MythTV Theme used in the Mythbuntu distribution
ii mythtv-transcode-utils 2:30.0+fixes.202103232211.7d297b1fb8~ubuntu18.04.1 amd64 Utilities used for transcoding MythTV tasks
ii php-mythtv 2:30.0+fixes.202103232211.7d297b1fb8~ubuntu18.04.1 all PHP Bindings for MythTV

I turned up a new virtual using Ubuntu 22.04.1 with MythTV 32 with the same machine specs..

ii libmyth 2:32.0+fixes.20220325.f69ce764b7-0ubuntu1 amd64 Common library code for MythTV and add-on modules (runtime)
ii libmyth-python 2:32.0+fixes.20220325.f69ce764b7-0ubuntu1 all Python library to access some MythTV features
ii libmythtv-perl 2:32.0+fixes.20220325.f69ce764b7-0ubuntu1 all Perl library to access some MythTV features
ii mytharchive 2:32.0+fixes.20220325.f69ce764b7-0ubuntu1 amd64 create and burn DVD's from MythTV - binary file
ii mythbrowser 2:32.0+fixes.20220325.f69ce764b7-0ubuntu1 amd64 Web browser plugin for MythTV
ii mythexport 2.2.4-0ubuntu7 amd64 Export MythTV recording to portable media players
ii mythgame 2:32.0+fixes.20220325.f69ce764b7-0ubuntu1 amd64 Emulator & PC Game frontend module for MythTV
ii mythimport 2.2.4-0ubuntu7 amd64 Import On The Go recordings from MythExport
ii mythmusic 2:32.0+fixes.20220325.f69ce764b7-0ubuntu1 amd64 Music add-on module for MythTV
ii mythnews 2:32.0+fixes.20220325.f69ce764b7-0ubuntu1 amd64 RSS feed news reader module for MythTV
ii mythplugins 2:32.0+fixes.20220325.f69ce764b7-0ubuntu1 all Metapackage package for MythTV plugins
ii mythtv-backend 2:32.0+fixes.20220325.f69ce764b7-0ubuntu1 amd64 Personal video recorder application (server)
ii mythtv-backend-master 2:32.0+fixes.20220325.f69ce764b7-0ubuntu1 all Metapackage to setup and configure a "Master Backend" profile of MythTV
ii mythtv-common 2:32.0+fixes.20220325.f69ce764b7-0ubuntu1 amd64 Personal video recorder application (common data)
ii mythtv-database 2:32.0+fixes.20220325.f69ce764b7-0ubuntu1 all Personal video recorder application (database)
ii mythtv-dbg 2:32.0+fixes.20220325.f69ce764b7-0ubuntu1 amd64 Debug symbols for mythtv packages
ii mythtv-frontend 2:32.0+fixes.20220325.f69ce764b7-0ubuntu1 amd64 Personal video recorder application (client)
ii mythtv-status 1.0.1-6 all Show the status of a MythTV backend
ii mythtv-transcode-utils 2:32.0+fixes.20220325.f69ce764b7-0ubuntu1 amd64 Utilities used for transcoding MythTV tasks
ii mythweather 2:32.0+fixes.20220325.f69ce764b7-0ubuntu1 amd64 Weather add-on module for MythTV
ii mythweb 2:32.0+fixes.20220325.f69ce764b7-0ubuntu1 all Web interface add-on module for MythTV
ii php-mythtv 2:32.0+fixes.20220325.f69ce764b7-0ubuntu1 all PHP Bindings for MythTV


Everything is working great except for the fact the new one is marking all the recordings as damaged (yellow in mythweb) even though the files look perfect and play fine with no errors I can see. I see nothing in the logs that indicate a problem..

Can anyone tell me why it would mark the following as damaged? Or how to tell why it marked it as Damaged?

May 25 17:01:00 myth-mbe mythbackend: mythbackend[1413]: I TVRecEvent tv_rec.cpp:841 (FinishedRecording) TVRec[1]: FinishedRecording(11039_2022-05-25T21:29:00Z) good recq:#012<RecordingQuality overall_score="1" key="11039_2022-05-25T21:29:00Z" continuity_error_count="0" packet_count="5399045" />

The new and the old machines are identical as far as spec's and storage, and are using the same SiliconDust HDHR3-CC tuners. Old system is not marking anything as bad and the new one is marking everything.
User avatar
bill6502
Developer
Posts: 2307
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: New Install Marking all Recordings as Damaged.

Post by bill6502 »

Is mythweb up to date? There was a commit: https://github.com/MythTV/mythweb/commi ... 7415724e6e
that adjusted videoproperties .

My original thought was a list of questions:

The RecordingQuality log message above says the quality is "good". I wouldn't expect it to
be in the log unless -v record was used. Was that the case?

Were the v30 and v32 backends running at the same time?

Do both have all three HDHR tuners defined, as opposed to having one for v30
and two for v32 (for example)?
User avatar
pgbennett
Developer
Posts: 503
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: New Install Marking all Recordings as Damaged.

Post by pgbennett »

I had experienced this problem with a new tuner that was taking more than 15 seconds to tune. If the first 15 seconds is missing the recording is marked damaged. I added some settings where you can adjust this. This is available starting in V32.
Mythfrontend->Setup->Video->General->General(Advanced)
You can adjust the maximum start gap, maximum end gap and minimum recording quality. These are all used to determine if a recording is marked damaged. The quality is calculated based on the number of gaps in recording, and the start and end gaps are taken into account if they exceed the settings here.
mattq
Newcomer
Posts: 10
Joined: Thu May 26, 2022 8:38 pm
United States of America

Re: New Install Marking all Recordings as Damaged.

Post by mattq »

bill6502, Yes the -v was enabled or should I say the mythbackend --setverbose record was enabled to get that message. It would be nice if it always logged that without all the other logs that come with it.

Both back ends are running at the same time (on different vlans).

I have two HDHR3-CC's and both of those machines have a separate nic that talks to the tuners (yet another vlan). The machines use the tuners in opposite order so they don't collide. And I did switch the order around to verify it wasn't one of the HDHR3-CC's.

pgbennett, I am going to try that out. The frontend for 30 doesn't even show the option for the first or last gap. I was headed down that same path, when setting up the new one I copied the timers for tuning (on the backend) from the old one which was shorter. I changed those back to the default and unfortunately that was not it. I will see if the maximum gap setting does the trick.
mattq
Newcomer
Posts: 10
Joined: Thu May 26, 2022 8:38 pm
United States of America

Re: New Install Marking all Recordings as Damaged.

Post by mattq »

I kicked up the time to 30 sec for the maximum start and end gap's but that doesn't seem to have done the trick. The tuners are fairly fast at tuning. Is there a log that shows quality or a way to tell what it causing it to show was damaged? When I did the verbose on record it comes back as a RecordingQuality overall_score="1" which doesn't appear to be the same thing and the original backend shows the same thing.
mattq
Newcomer
Posts: 10
Joined: Thu May 26, 2022 8:38 pm
United States of America

Re: New Install Marking all Recordings as Damaged.

Post by mattq »

Found something interesting, It is only marking the HD shows as damaged. I recorded the same show twice at the same time, once on the SD channel and the HD channel. It marked the HD one as damaged but not the SD. I didn't notice earlier because I usually don't record on those channels. Also recorded the same show on both channels of the older backend (so four copies of the same show all recorded at the same time). No issues on the old backend.
User avatar
bill6502
Developer
Posts: 2307
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: New Install Marking all Recordings as Damaged.

Post by bill6502 »

mattq wrote:
Tue May 31, 2022 7:59 pm
bill6502, ... It would be nice if it always logged that without all the other logs that come with it.
@mattq, just FYI, the verbosity of "FinishedRecording" log message is dynamic. It will always
print if -v record is set, but if the recording is damaged, it will print with only -v general.

https://github.com/MythTV/mythtv/blob/m ... c.cpp#L846
mattq
Newcomer
Posts: 10
Joined: Thu May 26, 2022 8:38 pm
United States of America

Re: New Install Marking all Recordings as Damaged.

Post by mattq »

I am at a loss, I am unable to find out why these are being marked as damaged. Anyone got any suggestions?
User avatar
kmdewaal
Developer
Posts: 644
Joined: Wed Dec 07, 2016 8:01 pm
Netherlands

Re: New Install Marking all Recordings as Damaged.

Post by kmdewaal »

If your recordings are marked as damaged as shown in mythfrontend then they are really damaged according to the settings described by pgbennet. You will then always find this in the logs; the reason is then usually the continuity_error_count being not zero.
The continuity_error_count should be always zero or have values less than 10 when your tuners are working correct.
Note that for live TV recordings you always log messages about damaged recordings; this is then caused by the gap (time difference) between the start time of the program and the moment you starting watching program with live TV. Also for live TV the continuity_error_count should be (close to) zero.

If your recordings are OK according to mythfrontend and the mythbackend logs but marked as damaged in mythweb then it is a mythweb issue.
User avatar
bill6502
Developer
Posts: 2307
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: New Install Marking all Recordings as Damaged.

Post by bill6502 »

The SD/HD test was a good idea. Let's do this, just to prove the DB is marked as expected
(you don't need to paste the output here):

Code: Select all

mysql -u mythtv -p mythconverg -e  \
   "SELECT title,chanid,starttime,videoprop FROM recordedprogram WHERE FIND_IN_SET('DAMAGED', videoprop)"
Then this to see if the minimum is set:

Code: Select all

curl -H Accept:Application/JSON localhost:6544/Myth/GetSetting?HostName=_GLOBAL_\&Key=MinimumRecordingQuality
mattq
Newcomer
Posts: 10
Joined: Thu May 26, 2022 8:38 pm
United States of America

Re: New Install Marking all Recordings as Damaged.

Post by mattq »

That MySQL command did not return anything.

matt@myth-mbe:~$ mysql -u mythtv -p mythconverg -e \
"SELECT LEFT(r.title, 20) AS Title, r.chanid AS ChannelID,
RIGHT(r.starttime, 14) AS 'Start Time', videoprop AS Props
FROM recorded AS r,recordedprogram AS p WHERE r.chanid = p.chanid
AND r.starttime = p.starttime
AND FIND_IN_SET('DAMAGED', p.videoprop) AND r.recgroup != 'Deleted'
ORDER BY r.starttime"
Enter password:
matt@myth-mbe:~$

Both mythfrontend and mythbackend are saying that all recorded HD shows are damaged. For all the recordings most of the shows have a continuity_error_count at 0 a couple have had 1 or 2 (all are well below 10). I did notice that it always marks live tv as damaged on my old backed as well so I wasn't worried about that. I don't watch live tv it anyway. The MinimumRecordingQuailtiy is set to 95, I had set it down to 1 just to rule that out but it made no difference. The maximum start and end gap's are currently still set to 30, however timing the lentgh to tune between channels on live tv is at max 6 seconds. This is a fresh ubuntu 22.04 install and the myth packages are straight from the default ubuntu repositories.

Both the new and old backends are on the same esxi 6.7 host and recording to disks on the same storage. I have recorded up to 9 HD shows at the same time on the old backend without issues. I did however move the new backend to another host and used different storage just to rule it out with no luck.

I don't really use the mythfrontend for day to day watching. I have a Pi4 (8GB) (hardwired, not wireless) at each of my TV's that run LibreELEC/KODI with the mythtv pvr client. All recordings play flawlessly.
User avatar
bill6502
Developer
Posts: 2307
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: New Install Marking all Recordings as Damaged.

Post by bill6502 »

I simplified my SQL 2 above because I found one case on my host that wasn't
detected (an old test recording). Please run that because 'did not return
anything' means that the DB has no recordings marked as damaged.
mattq
Newcomer
Posts: 10
Joined: Thu May 26, 2022 8:38 pm
United States of America

Re: New Install Marking all Recordings as Damaged.

Post by mattq »

That modified mysql command did not return anything either. If nothing is actually marked as damaged why would mythweb and the frontend show them that way? And only on HD shows? Would they be rerecorded? Just to be sure I ran that command on my old backend, which does have a few damaged recordings and it displayed all of the ones that is were actually damaged. Not that I didn't believe your command would work, it just that I am pulling my hair out.
User avatar
bill6502
Developer
Posts: 2307
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: New Install Marking all Recordings as Damaged.

Post by bill6502 »

Schema update 1362 changed the order of and added to videoprops in the recordedprogram table. Change
the SQL from 'DAMAGED' to '720' and re-run it. Assuming there are hits, do they match the recordings
that appear to be damaged?

What does this return: mysql -u mythtv -p mythconverg -e "DESC recordedprogram" | grep videoprop

Does line 204 of <your mythweb direcory>/modules/tv/classes/Program.php look like this:

Code: Select all

        $this->damaged                      = $this->videoproperties & 0x0400;
Your lists if installed programs looks correct,

What does the backend log line containing: mythbackend version: look like?

Info only:

Code: Select all

1289        1362

HDTV        WIDESCREEN
WIDESCREEN  HDTV
AVC         MPEG2
720         AVC
1080        HEVC
DAMAGE      720 <-------------------
            1080
            4K
            3DTV
            PROGRESSIVE
            DAMAGED
mattq
Newcomer
Posts: 10
Joined: Thu May 26, 2022 8:38 pm
United States of America

Re: New Install Marking all Recordings as Damaged.

Post by mattq »

When I change the line from damaged to 720 it does list all the shows that say damaged but it does not show damaged.

Line 204 says $this->closecaptioned = $this->subtitletype & 0x01;

but line 203 says..
$this->damaged = $this->videoproperties & 0x20;




matt@myth-mbe:~$ mysql -u mythtv -p mythconverg -e "DESC recordedprogram" | grep videoprop
Enter password:
videoprop set('WIDESCREEN','HDTV','MPEG2','AVC','HEVC','720','1080','4K','3DTV','PROGRESSIVE','DAMAGED') NO NULL
matt@myth-mbe:~$

matt@myth-mbe:/var/log/mythtv$ cat mythbackend.log | grep "mythbackend version"
May 26 08:05:19 myth-mbe mythbackend: mythbackend[1380]: C thread_unknown mythcommandlineparser.cpp:2901 (ConfigureLogging) mythbackend version: fixes/32 [v32.0+fixes.20220325.f69ce764b7-0ubuntu1] www.mythtv.org
May 27 16:05:35 myth-mbe mythbackend: mythbackend[11929]: C thread_unknown mythcommandlineparser.cpp:2901 (ConfigureLogging) mythbackend version: fixes/32 [v32.0+fixes.20220325.f69ce764b7-0ubuntu1] www.mythtv.org
Jun 2 10:37:26 myth-mbe mythbackend: mythbackend[1453]: C thread_unknown mythcommandlineparser.cpp:2901 (ConfigureLogging) mythbackend version: fixes/32 [v32.0+fixes.20220325.f69ce764b7-0ubuntu1] www.mythtv.org
Jun 2 10:54:53 myth-mbe mythbackend: mythbackend[1471]: C thread_unknown mythcommandlineparser.cpp:2901 (ConfigureLogging) mythbackend version: fixes/32 [v32.0+fixes.20220325.f69ce764b7-0ubuntu1] www.mythtv.org
matt@myth-mbe:/var/log/mythtv$
Post Reply