Project

General

Profile

Bug #5095

same autorecords don't creating a real file

Added by s j over 6 years ago. Updated almost 5 years ago.

Status:
New
Priority:
Normal
Assignee:
Category:
PVR / DVR
Target version:
-
Start date:
2018-05-01
Due date:
% Done:

0%

Estimated time:
Found in version:
4.2.6-7~g5613551
Affected Versions:

Description

Last week I have update from tvheadend 4.0 to 4.2.6-7~g5613551 on a Debian Jessie system.
Since then I have had problems with some "autorecords".
Some "autorecords" are displayed correctly by "tvheadend" in the "recordlist" list, but do not create a real file.
See ScreeShot 1 and 2.

Only after a restart of "tvheadend" (with /etc/init.d/tvheadend restart) a recording file is created.
See ScreeShot 3

Every 20th record is estimated to be affected by it.


Files

tvheadendNoRecordFile.png (110 KB) tvheadendNoRecordFile.png tvheadend displays records s j, 2018-05-01 23:30
tvheadendNoRecordFileMark.png (108 KB) tvheadendNoRecordFileMark.png a closer look reveals the problem s j, 2018-05-01 23:30
tvheadendNoRecordFile3.png (111 KB) tvheadendNoRecordFile3.png after a restart of "tvheadend" is running again s j, 2018-05-01 23:31
tvheadendNoRecordFile4.png (143 KB) tvheadendNoRecordFile4.png same problem without autorec s j, 2018-05-02 00:29
tvheadendNoRecordFile5.png (68.6 KB) tvheadendNoRecordFile5.png no limit found s j, 2018-05-02 00:32
tvheadendNoRecordFile7.png (108 KB) tvheadendNoRecordFile7.png again I have a recording without a file, but only the admin can see the log s j, 2018-05-03 22:13
tvheadendNoRecordFile8.png (137 KB) tvheadendNoRecordFile8.png as admin, I see the log, the MDR channel is making trouble s j, 2018-05-03 22:13
tvheadendNoRecordFile9.png (135 KB) tvheadendNoRecordFile9.png after /etc/init.d/tvheadedend restart s j, 2018-05-03 22:14
tvheadendNoRecordFile10.png (132 KB) tvheadendNoRecordFile10.png the record landing in "removed record" s j, 2018-05-03 22:14
tvheadendNoRecordFile11.png (131 KB) tvheadendNoRecordFile11.png the next record on same channel start fine s j, 2018-05-03 22:14
tvheadendNoRecordFile12.png (133 KB) tvheadendNoRecordFile12.png the second record end fine s j, 2018-05-03 22:24
tvheadendNoRecordFile13.png (132 KB) tvheadendNoRecordFile13.png the next record on other channel start with no file s j, 2018-05-03 23:05
tvheadendNoRecordFile14.png (77.1 KB) tvheadendNoRecordFile14.png signal state is fine s j, 2018-05-03 23:06
tvheadendNoRecordFile15.png (85.4 KB) tvheadendNoRecordFile15.png tv adapter is fine s j, 2018-05-03 23:06
tvheadendNoRecordFile19.png (64.8 KB) tvheadendNoRecordFile19.png Sunday: both tuners available s j, 2018-05-07 22:06
tvheadendNoRecordFile18.png (151 KB) tvheadendNoRecordFile18.png Sunday: no record running s j, 2018-05-07 22:06
tvheadendNoRecordFile20.png (78.9 KB) tvheadendNoRecordFile20.png Sunday: both tuners available in the configuration s j, 2018-05-07 22:06
tvheadendNoRecordFile21.png (145 KB) tvheadendNoRecordFile21.png Sunday: after /etc/init.d/tvheadend restart both records running s j, 2018-05-07 22:06
tvheadendNoRecordFile22.png (108 KB) tvheadendNoRecordFile22.png Sunday: both tuners running s j, 2018-05-07 22:06
tvheadendNoRecordFile23.png (117 KB) tvheadendNoRecordFile23.png Sunday: both tuners available in the configuration s j, 2018-05-07 22:06
tvheadendNoRecordFile25.png (64.9 KB) tvheadendNoRecordFile25.png Monday: both tuners available, one of this run s j, 2018-05-07 22:15
tvheadendNoRecordFile24.png (143 KB) tvheadendNoRecordFile24.png Monday: only one record run s j, 2018-05-07 22:15
tvheadendNoRecordFile26.png (76.7 KB) tvheadendNoRecordFile26.png Monday: both tuners available in the configuration s j, 2018-05-07 22:15
tvheadendNoRecordFile27.png (133 KB) tvheadendNoRecordFile27.png Monday: after /etc/init.d/tvheadend restart both records run s j, 2018-05-07 22:15
tvheadendNoRecordFile28.png (34.3 KB) tvheadendNoRecordFile28.png Monday: both tuners runs s j, 2018-05-07 22:15
tvheadendNoRecordFile29.png (45.7 KB) tvheadendNoRecordFile29.png Monday: both tuners available in the configuration s j, 2018-05-07 22:15

History

#1

Updated by s j over 6 years ago

I tested again with not "autorec", there is the same problem.
See screenshot 4.

Is there a limit in version 4.2 so that only one recording can run at a time?
I haven't found anything like this in the DVR configuration.
See screenshot 5.

#2

Updated by da h4xX0rz1sT over 6 years ago

There is no limit to one recording.

If you're recording and TVh does not produce any output file, what can you see at Status -> Subscriptions interface page? Do you see input bitrate changing, and an output bitrate that is constantly "0" ?

Let me guess, you're recording an encrypted channel, right?

#3

Updated by s j over 6 years ago

No, all my channels normal free TV, no encrypted, no HD channels

#4

Updated by s j over 6 years ago

If you're recording and TVh does not produce any output file, what can you see at Status -> Subscriptions interface page? Do you see input bitrate changing, and an output bitrate that is constantly "0" ?

When this reoccurs, I'll check the Status -> Subscriptions

#5

Updated by da h4xX0rz1sT over 6 years ago

s j wrote:

No, all my channels normal free TV, no encrypted, no HD channels

OK, it seems the same problem I'm experiencing and currently investigating. I thought this only happens with encrypted channels - might be due to the fact that I don't record much from FreeTV.

As you say, it has nothing to do with auto recordings, it happens on normal recordings as well. So the proper bug title probably should be "major issue: some recordings do not create an output file".

When it happens that no file is written, I don't see any log message with video metadata in the logs.
If the file is written, you see some message including metadata like this:

May  2 19:59:30 tvhserver tvheadend[28013]: dvr: "Tagesschau" on "Das Erste" recorder starting
May  2 19:59:30 tvhserver tvheadend[28013]: dvr: About to set stop timer for "Tagesschau" on "Das Erste" at start 1525284000 and original stop 1525284900 and overall stop at 1525284900
May  2 19:59:30 tvhserver tvheadend[28013]: mpegts: 746MHz in DVB-T Nbg - tuning on Panasonic MN88473 DVB-T #2
May  2 19:59:30 tvhserver tvheadend[28013]: subscription: 11D2: "DVR: Tagesschau" subscribing on channel "Das Erste", weight: 300, adapter: "Panasonic MN88473 DVB-T #2", network: "DVB-T Nbg", mux: "746MHz", provider: "BR", service: "Das Erste HD", profile="matroska" 
May  2 20:00:12 tvhserver tvheadend[28013]: dvr: /media/recordings/Tagesschau/Tagesschau.Das-Erste.2018-05-02.20-00.mkv from adapter: "Panasonic MN88473 DVB-T #2", network: "DVB-T Nbg", mux: "746MHz", provider: "BR", service: "Das Erste HD" 
May  2 20:00:12 tvhserver tvheadend[28013]: dvr:  #  type              lang  resolution  aspect ratio  sample rate  channels
May  2 20:00:12 tvhserver tvheadend[28013]: dvr:  1  HEVC                    1920x1080   16:9
May  2 20:00:12 tvhserver tvheadend[28013]: dvr:  2  AAC               ger                             48000        2
May  2 20:00:12 tvhserver tvheadend[28013]: dvr:  3  AAC               mis                             24000        2
May  2 20:00:13 tvhserver tvheadend[28013]: dvr:  5  TEXTSUB           ger

After the failed recording, it shows up in DVR -> Failed recordings with status File missing.

Can you confirm this? Do you see any error message in your log before the recording starts/should start?

#6

Updated by Mark Clarkstone over 6 years ago

I'm having recordings going missing too on 4.3.

I'm not 100% sure it's the same issue but I found a solution, at least in my case. Don't create folders using the programme name. In Kodi if you add a timer it automatically uses the programme name in the "folder" field - remove the text, and recordings go through as planned! O.o.

And having just checked my autorecs, DVR file retention period for autorecs is set to "4294967295" - conf sample here. All those affected were set via Kodi v18

#7

Updated by da h4xX0rz1sT over 6 years ago

Mark, thanks for your hint.

I checked it and unfortunately, this does not seem to be the problem - directory entry is empty for all (auto) recordings.

But I have a format string $t/$t... in the default dvr profile which in fact creates a subdirectory for each recording. Might that be causing the issue? If I remember correctly, that was the default, so it should work.

And the question is, why does it work most of the time, but still fails in so many cases? Until now, I have not been able to figure out what could be the condition that makes it fail. I can only see the result, no video metadata in the log, no directory created, no file written, 0 kbit output rate on stream and recording fails with "file missing".

#8

Updated by s j over 6 years ago

I have make same screen shots with descriptions

In Kodi if you add a timer it .....

In my case, I don't work with a Kodi. I only work with normal PC's and manage the records only with a webbrowser

#9

Updated by da h4xX0rz1sT over 6 years ago

So there's no recording because it doesn't even tune properly.

Do I see that correctly, you only have one single tuner?

#10

Updated by barry road over 6 years ago

I have the same issue with IPTV network. In tvheadend log there is no record. In kodi there is this log.

01:23:11.526 T:140735987331968 ERROR: AddOnLog: Tvheadend HTSP Client: pvr.hts - Command addDvrEntry failed: User does not have access
01:23:11.526 T:140735987331968 ERROR: PVR - AddTimer - addon '192.168.0.150:9982' returned an error: server error
01:23:11.526 T:140735987331968 ERROR: PVR - AddTimer - cannot add timer to client '1549551340': server error

#11

Updated by da h4xX0rz1sT over 6 years ago

Barry, it seems like your Tvheadend HTSP Client in Kodi does log in with an account that does not have the required permissions to create a recording. Of cause TVh does record nothing then, and you won't even see it scheduled in the web interface.

barry road wrote:

01:23:11.526 T:140735987331968 ERROR: AddOnLog: Tvheadend HTSP Client: pvr.hts - Command addDvrEntry failed: User does not have access

Check your users access permissions in the DVR column.

#12

Updated by barry road over 6 years ago

I think the permissions are OK. Some tv shows I can record without this issue. This happened when I want to record show that is airing right now. /instant record/ When there are no EPG data instant recordings works.

When I schedule timer to record next show it starts to record right away and file is created.

#13

Updated by da h4xX0rz1sT over 6 years ago

OK Barry, understood. I tried to reproduce your issue here using IPTV, but no error happened.

  • instant recording (from Kodi) on IPTV worked (no matter if the channel has EPG data or not)
  • EPG scheduled recording (from Kodi) on IPTV worked

But it was only some tries, and the "no file problem" is also not really willingly reproducible here. If you hunt the bugs they try to hide ;)

Probably you could use net sniffing or higher debug level on Kodi/TVh side to gain more insights.

HTH,
/hxz

#14

Updated by barry road over 6 years ago

I tried VPS with debian jessie and my config works there. I can record. It seems to be a prolem with hw? Is there a way how to delete all files? I tried apt-get purge tvheadend and install it again but still the same problem.

#15

Updated by da h4xX0rz1sT over 6 years ago

Barry, if it runs in a VPS, I don't think it is an issue with the hardware, because hw stuff is even more complicated inside VPS.

To me, it is much more likely it is a problem with your system environment. Did you update all packages on the system? Is it a very old and potentially broken system? Is all linking consistent?

Ways to avoid this are using a well-defined environment, e.g. a Docker or VM image, like it is on VPS.

Another way you can try is build TVheadend from source, so you're sure the binary exactly fits your package environment, which is what I always do.

HTH,
/hxz

#16

Updated by s j over 6 years ago

Do I see that correctly, you only have one single tuner?

No I have two tuners.
In the many of tests I forgotten to reconnect the second tuner. Sorry.

In the last day I have make many of new test.
My summary:
Tvheadend runs fine after the start.
Sometime in the next 6 hours something happens that causes an error in tvheadend.
It doesn't matter whether a recording is running or not.
The error can be detected if no more recording can be made.

Sometimes it can also fail in tvheadend 3.6 or 4.0 to these, but much rarer.
So I had a cron job that once the week tvheadend restarted.
That was good and has worked well for almost 2 years.
After the update from 4.0 to tvheadend 4.2 (4.3 for tests) this error often in short time periodes of hours.

For better to understand I added screenshots.

Bitmap tvheadendNoRecordFile18-23.png from Sunday

#17

Updated by s j over 6 years ago

Bitmap tvheadendNoRecordFile24-29.png from Today

I wrote the description on the bitmaps.

Does anyone have any idea what the problem is?

#18

Updated by barry road over 6 years ago

da h4xX0rz1sT wrote:

Barry, if it runs in a VPS, I don't think it is an issue with the hardware, because hw stuff is even more complicated inside VPS.

To me, it is much more likely it is a problem with your system environment. Did you update all packages on the system? Is it a very old and potentially broken system? Is all linking consistent?

Ways to avoid this are using a well-defined environment, e.g. a Docker or VM image, like it is on VPS.

Another way you can try is build TVheadend from source, so you're sure the binary exactly fits your package environment, which is what I always do.

HTH,
/hxz

Honestly I have no idea where was the problem. The HW on my tvh server was updated. I was using tv_grab_file to get EPG. I don't know whether it is related but I removed it and uploadit again. Recording is now working.

#19

Updated by da h4xX0rz1sT over 6 years ago

barry road:

Nice to hear it is working for you now :)

@s j:
I think I know your problem. Your logs show inconsistencies on serveral tables.
I've been facing the same problems some commits ago - use latest git version and that will very likely go away.

HTH,
/hxz

#20

Updated by s j almost 5 years ago

I wanted to give you another feedback.
The problem was a faulty power supply, which caused problems after several hours of operation.
After that the voltage broke down, so the receiver didn't work anymore and didn't consume power anymore.
This allowed the power supply to cool down again and after a while it worked again.
Unfortunately, the update to version 4.2 overlapped with the power supply failure.
It took me almost 4 months to find out.

Best regards

Please close this ticket

Also available in: Atom PDF