NextPVR Forums

Full Version: Recording might have been corrupted by EPG update?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I did a test recording where 36 minutes of recording was saved but NextPVR thinks the duration is 33 minutes.  An EPG update was performed in the middle of the recording, and I am wondering if that reset the recorded start_time from (program start time - the 3 minute pre-pad) to (program start time)?

I am using: Ubuntu 20.10, NextPVR 5.1.1.210329

I am attaching a .zip file that includes the log files, and images showing Kodi and NextPVR both think a 36 minute recording is 33 minutes.

I did 6x 30 minute show test recordings overnight.  I used 3 minute pre and post padding, so I expected 6x 36 minute recordings.  One of the recordings ending up being "33 minutes".  I say "33 minutes" because it appears that 36 minutes was recorded, but NextPVR (see 33_minute_recording.png) and Kodi (see kodi_33_minute_recording.png) "think" it was 33 minutes.  Kodi lets me watch all 36 minutes , but I can't skip forwards and backwards in the last 3 minutes.  The NextPVR browser player won't let me watch the last 3 minutes.

It turns out that an EPG update was done in the middle of the recording (see "2021-04-18 02:44:38.834 [DEBUG][10]    Update EPG..." in nrecord.log.1):
    2021-04-18 02:44:31.665    [DEBUG][54]    Have received 293856220 bytes from rtp source
    2021-04-18 02:44:38.834    [DEBUG][10]    Update EPG...
    2021-04-18 02:44:38.845    [INFO][55]    About to update EPG
    2021-04-18 02:44:38.910    [DEBUG][55]    No /var/opt/nextpvr/scripts/UpdateEPG.sh file found

I am wondering if the EPG update is what corrupted the recording? When playing back the recordings I notice in record.log.1 that the recordings that worked show the correct start time including the pre-pad, example (11:57:00 = program start @ 12:00:00 - 3 minute pre-pad):
    2021-04-18 08:33:51.717    [DEBUG][50]    <?xml version="1.0" encoding="utf-8" ?>
    <rsp stat="ok">
    <recordings>
        <recording>
          <id>851</id>
          <recurring_parent>0</recurring_parent>
          <name>Modern Family</name>
          <desc>A series of crises on Mitch and Cam&apos;s wedding day put Pepper to the test; Phil gets an eye procedure before the celebration; Claire embraces the role of best woman.</desc>
          <subtitle>S05E23 - The Wedding, Part 1</subtitle>
          <start_time>4/17/2021 11:57:00 PM</start_time>
          <start_time_ticks>1618729020</start_time_ticks>
          <duration>00:36</duration>

The failed recording in nrecord.log.1 doesn't, example (2:30:00 recording start_time, expected 2:27:00):
    2021-04-18 08:59:46.056    [DEBUG][63]    <?xml version="1.0" encoding="utf-8" ?>
    <rsp stat="ok">
    <recordings>
        <recording>
          <id>853</id>
          <recurring_parent>0</recurring_parent>
          <name>Hazel</name>
          <desc>Hazel uses her wits to delay a decision at a gangster meeting.</desc>
          <subtitle>S03E19 - Scheherazade and Her Frying Pan</subtitle>
          <start_time>4/18/2021 2:30:00 AM</start_time>
          <start_time_ticks>1618738200</start_time_ticks>
          <duration>00:33</duration>
Scheduling recordings during EPG updates has always been discouraged. The end time is not calculated from the file it is from the database, I've written a utility to populate it with the calculated time the help ID but calculating a ts file length is not 100% guaranteed.

In this case it certainly looks like the pre-padding time didn't get applied correctly to the start time because of the EPG update and starttimetick (which Kodi uses) is 3 minutes lates.

Martin