Bug #5095
same autorecords don't creating a real file
0%
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
History
Updated by s j over 6 years ago
- File tvheadendNoRecordFile4.png tvheadendNoRecordFile4.png added
- File tvheadendNoRecordFile5.png tvheadendNoRecordFile5.png added
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.
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?
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
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?
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
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".
Updated by s j over 6 years ago
- File tvheadendNoRecordFile7.png tvheadendNoRecordFile7.png added
- File tvheadendNoRecordFile8.png tvheadendNoRecordFile8.png added
- File tvheadendNoRecordFile9.png tvheadendNoRecordFile9.png added
- File tvheadendNoRecordFile10.png tvheadendNoRecordFile10.png added
- File tvheadendNoRecordFile11.png tvheadendNoRecordFile11.png added
- File tvheadendNoRecordFile12.png tvheadendNoRecordFile12.png added
- File tvheadendNoRecordFile13.png tvheadendNoRecordFile13.png added
- File tvheadendNoRecordFile14.png tvheadendNoRecordFile14.png added
- File tvheadendNoRecordFile15.png tvheadendNoRecordFile15.png added
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
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?
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
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.
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.
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
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.
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
Updated by s j over 6 years ago
- File tvheadendNoRecordFile18.png tvheadendNoRecordFile18.png added
- File tvheadendNoRecordFile19.png tvheadendNoRecordFile19.png added
- File tvheadendNoRecordFile20.png tvheadendNoRecordFile20.png added
- File tvheadendNoRecordFile21.png tvheadendNoRecordFile21.png added
- File tvheadendNoRecordFile22.png tvheadendNoRecordFile22.png added
- File tvheadendNoRecordFile23.png tvheadendNoRecordFile23.png added
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
Updated by s j over 6 years ago
- File tvheadendNoRecordFile24.png tvheadendNoRecordFile24.png added
- File tvheadendNoRecordFile25.png tvheadendNoRecordFile25.png added
- File tvheadendNoRecordFile26.png tvheadendNoRecordFile26.png added
- File tvheadendNoRecordFile27.png tvheadendNoRecordFile27.png added
- File tvheadendNoRecordFile28.png tvheadendNoRecordFile28.png added
- File tvheadendNoRecordFile29.png tvheadendNoRecordFile29.png added
Bitmap tvheadendNoRecordFile24-29.png from Today
I wrote the description on the bitmaps.
Does anyone have any idea what the problem is?
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.
Updated by da h4xX0rz1sT over 6 years ago
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
Updated by s j about 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