Project

General

Profile

Recordings disappear from DVR, but files remain on disk

Added by Philipp Keck about 8 years ago

Many (in fact most) of my recordings don't appear to work. Through Kodi, I can see TVHeadend record stuff all the time and schedule new things, but those almost never show up in the "Recordings" view. I investigated and found out that the files do indeed exist, they are just missing from the DVR menu.

Here is an example of a disappeared recording. It was recorded at night and was certainly the only thing going on at the time:

Oct 18 03:18:30 raspberrypi tvheadend555: dvr: "WISO" on "ZDF HD" recorder starting
Oct 18 03:18:30 raspberrypi tvheadend555: mpegts: 370MHz in KabelBW (Unitymedia) - tuning on DRXK DVB-C DVB-T : DVB-C #0
Oct 18 03:18:30 raspberrypi tvheadend555: subscription: 0626: "DVR: WISO" subscribing on channel "ZDF HD", weight: 300, adapter: "DRXK DVB-C DVB-T : DVB-C
#0", network: "KabelBW (Unitymedia)", mux: "370MHz", provider: "ZDFvision", service: "ZDF HD", profile="pass"
Oct 18 03:18:30 raspberrypi tvheadend555: dvr: /home/hts/recordings/WISO/WISO.2016-10-18.03-20.ts from adapter: "DRXK DVB-C DVB-T : DVB-C #0", network: "KabelBW (Unitymedia)", mux: "370MHz", provider: "ZDFvision", service: "ZDF HD"
Oct 18 03:18:30 raspberrypi tvheadend555: dvr: # type lang resolution aspect ratio sample rate channels
Oct 18 03:18:30 raspberrypi tvheadend555: dvr: 1 H264 1280x720 ?
Oct 18 03:18:30 raspberrypi tvheadend555: dvr: 2 MPEG2AUDIO ger ? ?
Oct 18 03:18:30 raspberrypi tvheadend555: dvr: 3 MPEG2AUDIO mis ? ?
Oct 18 03:18:30 raspberrypi tvheadend555: dvr: 4 AC3 ger ? ?
Oct 18 03:18:30 raspberrypi tvheadend555: dvr: 5 MPEG2AUDIO mul ? ?
Oct 18 03:18:30 raspberrypi tvheadend555: dvr: 6 TELETEXT
Oct 18 03:18:30 raspberrypi tvheadend555: dvr: 7 DVBSUB ger
Oct 18 03:18:33 raspberrypi tvheadend555: tot: invalid checksum (len 8, errors 1)
Oct 18 03:18:33 raspberrypi tvheadend555: time: TDT - unable to update system time: Operation not permitted
Oct 18 03:19:03 raspberrypi tvheadend555: TS: KabelBW (Unitymedia)/370MHz/ZDF HD: H264 #6110 Continuity counter error (total 1)
... (lots of continuity errors, as always) ...
Oct 18 04:05:55 raspberrypi tvheadend[555]: TS: KabelBW (Unitymedia)/370MHz/ZDF HD: H264
#6110 Continuity counter error (total 725)
Oct 18 04:06:00 raspberrypi tvheadend555: subscription: 0626: "DVR: WISO" unsubscribing from "ZDF HD"
Oct 18 04:06:00 raspberrypi tvheadend555: dvr: "WISO" on "ZDF HD": End of program: Completed OK

Now, the file "WISO.2016-10-18.03-20.ts" exists, but the recording does not appear in the DVR (frontend in Kodi or web interface). There is no corresponding /.hts/tvheadend/dvr/log/ entry, the only ones concerning "WISO" are for the future. This happened to many other programs ("Marktcheck", "Visite"), but it has always worked fine for "nano", "Galileo" and "Wer wird Millionär". If it wasn't for the "nano" show, all failing ones would be HD and the succeeding ones would be SD. But "nano" is HD and succeeds. However, "nano" is rather short. And indeed, as far as I can tell by now, all failing instances have files bigger than 2GB.

So while all recordings succeed to save the file to disk, some of them (possibly the >2GB ones) disappear from the DVR overview, i.e., from /.hts/tvheadend/dvr/log/. At least around the time of recording, there is no indication why that would happen in the syslog.

Another side effect is that my disk runs full pretty quickly with lots of recordings that I can neither see nor delete with Kodi, so after a while recordings start failing because the disk is full. That problem is obviously easily solved by deleting the files manually...

Please let me know if you know a solution to this problem or have further ideas how to investigate the disappearing DVR entries.


Replies (4)

RE: Recordings disappear from DVR, but files remain on disk - Added by Jonathan Thomson about 8 years ago

Which version are you running?

Are the recordings not in the "Failed Recordings" tab?

RE: Recordings disappear from DVR, but files remain on disk - Added by Philipp Keck about 8 years ago

It's 4.0.8~jessie.

And no, I think for them to be in any of the DVR tabs or in Kodi, the log file would need to exist, right?

RE: Recordings disappear from DVR, but files remain on disk - Added by Philipp Keck about 8 years ago

I probably found the cause: The AutoRec entries for all affected timers (and for none of the ones that worked) had "Retention" set to 2147483647. I don't know where that value comes from -- if this turns out to be the actual cause, I can find out how the combination of Kodi and TvHeadend produces this value. Probably it's supposed to mean "infinity".
Anyway, I suspect that due to some integer overflow TvHeadend computes that the retention period for the finished recording is already over and deletes it. And because the VDR still holds a file handle, the recording file doesn't get deleted. Or it could be that retention clean-up never deletes the video file because of another bug.

Now I replaced these values with 0 and hope that this will fix the issue.

RE: Recordings disappear from DVR, but files remain on disk - Added by Philipp Keck about 8 years ago

Choosing "No limit" for the lifetime of a repeated timer in Kodi leads to 2147483647 in TvHeadend. I don't know about the protocol that's used between TvHeadend and Kodi -- maybe someone should replace incredibly high values with 0, as that's used for "no limit" in TvHeadend.

And TvHeadend shouldn't delete entries with retention 2147483647. Though this bug might be fixed already in some newer build, which I just can't get because I'm on a Raspberry.

Possibly related: https://tvheadend.org/issues/3197 https://tvheadend.org/issues/2299 https://tvheadend.org/issues/3891

The unwanted deletion is reproducible on my 4.0.8~jessie version, and obviously there's a simple workaround (for anyone else affected): do not use "no limit" and remove the 2147483647 from all your AutoRec timers through the web interface.

    (1-4/4)