Project

General

Profile

Bug #5576

DVBSUB not included in recordings when stream changes

Added by Mikko Vestola over 5 years ago. Updated over 5 years ago.

Status:
Invalid
Priority:
Normal
Assignee:
Category:
PVR / DVR
Target version:
-
Start date:
2019-03-14
Due date:
% Done:

0%

Estimated time:
Found in version:
4.2.7
Affected Versions:

Description

I have noticed following issue in TV recordings: if the DVB subtitles are not present at the exact moment when a recording starts, those DVB subtitles are not included in the recording even though subtitles will appear later. So if the program starts at 19:00 and it will have DVB subtitles and your recording starts 18:59 (when the DVB subtitles are not yet sent), you will completely lose these DVB subtitles even though they are sent starting at 19:00.

This is very common here in Finland with provider YLE channels. They seem not to send DVB subtitle stream constantly but only when a program starts which has subtitles. So if the program spoken language is native Finnish, there is usually no DVBSUB stream. But if program spoken language is e.g. English, there is DVBSUB stream but it is sent only when the foreign language program starts and the DVBSUB stream continues to exist until the foreign language program ends.

Below is example from tvheadend logs how it looks like.

First log example is for recording that started one minute before the program "Vallan linnake" started (20:00 start time). This program did have DVB subtitles (Finnish and Swedish), I verified it watching live TV. But as you can see, the log does not mention the DVBSUB stream.

2019-03-14 19:58:30.000 [   INFO] dvr: About to set stop timer for "Vallan linnake (7)" on "Yle Teema & Fem HD" at start 1552586400 and original stop 1552590000 and overall stop at 1552590180
2019-03-14 19:58:30.001 [   INFO] subscription: 001D: "DVR: Vallan linnake (7)" subscribing on channel "Yle Teema & Fem HD", weight: 300, adapter: "Panasonic MN88473 : DVB-C #1 (1)", network: "Elisa", mux: "362M
Hz", provider: "YLE", service: "Yle Teema & Fem HD", profile="pass" 
2019-03-14 19:59:00.003 [   INFO] dvr: /var/media/Seagate/tv/Vallan-linnake-(7)-Yle-Teema-&-Fem-HD2019-03-14.ts from adapter: "Panasonic MN88473 : DVB-C #1 (1)", network: "Elisa", mux: "362MHz", provider: "YLE",
 service: "Yle Teema & Fem HD" 
2019-03-14 19:59:00.003 [   INFO] dvr:  #  type              lang  resolution  aspect ratio  sample rate  channels
2019-03-14 19:59:00.003 [   INFO] dvr:  1  H264                    1920x1080   ?                                    
2019-03-14 19:59:00.003 [   INFO] dvr:  2  AC3               swe                             ?            ?         
2019-03-14 19:59:00.003 [   INFO] dvr:  3  TELETEXT     

I continued recording the program for about 15 minutes, stopped recording and tried to watch it: no DVB subtitles were present.

Here is example of starting to record the same program but now recording started after 21 mins the program started (I stopped previous recording). Now you can see that the DVBSUB stream is recognized:

2019-03-14 20:21:26.937 [   INFO] dvr: "Vallan linnake (7)" on "Yle Teema & Fem HD" recorder starting
2019-03-14 20:21:26.938 [   INFO] dvr: About to set stop timer for "Vallan linnake (7)" on "Yle Teema & Fem HD" at start 1552586400 and original stop 1552590000 and overall stop at 1552590300
2019-03-14 20:21:26.938 [   INFO] mpegts: 362MHz in Elisa - tuning on Panasonic MN88473 : DVB-C #1 (1)
2019-03-14 20:21:26.938 [   INFO] subscription: 002D: "DVR: Vallan linnake (7)" subscribing on channel "Yle Teema & Fem HD", weight: 300, adapter: "Panasonic MN88473 : DVB-C #1 (1)", network: "Elisa", mux: "362M
Hz", provider: "YLE", service: "Yle Teema & Fem HD", profile="pass" 
2019-03-14 20:21:27.628 [   INFO] dvr: /var/media/Seagate/tv/Vallan-linnake-(7)-Yle-Teema-&-Fem-HD2019-03-14.ts from adapter: "Panasonic MN88473 : DVB-C #1 (1)", network: "Elisa", mux: "362MHz", provider: "YLE",
 service: "Yle Teema & Fem HD" 
2019-03-14 20:21:27.628 [   INFO] dvr:  #  type              lang  resolution  aspect ratio  sample rate  channels
2019-03-14 20:21:27.628 [   INFO] dvr:  1  H264                    1920x1080   ?                                    
2019-03-14 20:21:27.628 [   INFO] dvr:  2  AC3               dan                             ?            ?         
2019-03-14 20:21:27.628 [   INFO] dvr:  3  TELETEXT                                                                 
2019-03-14 20:21:27.628 [   INFO] dvr:  4  AC3               dut                             ?            ?         
2019-03-14 20:21:27.628 [   INFO] dvr:  5  DVBSUB            fin                                                    
2019-03-14 20:21:27.628 [   INFO] dvr:  6  DVBSUB            swe   

I again continued recording the program for about 15 minutes, stopped recording and tried to watch it: now DVB subtitles were present as expected.

This is really annoying because to fix this at the moment, you can not start the recording at the time the program starts but maybe like 1 minute after to be sure that the DVBSUB stream is present when the recording starts. But this is no good solution because you will loose that 1 minute at the beginning of the recording.

This seems to be same issue that was supposed to be fixed in issue #4538

I assume that previously tvheadend did recognize that the stream DVBSUB is changed and then it created a new *.ts file but now it seems not to do this.

I have tried this with this setup: Raspberry Pi 3 with LibreElec 9.0.1 running tvheadend, kernel 4.19.23. I tried LibreElec tvheadend server versions:
  • Build: 4.2.7-44 ~ LibreELEC Tvh-addon v9.0.118
  • HTS Tvheadend 4.3-1774 ~ LibreELEC Tvh-addon v9.0.444
  • HTS Tvheadend 4.2.4-23 ~ LibreELEC Tvh-addon v9.0.113

None of those versions worked (all were missing DVBSUB stream in recordings as described above).

Strange thing is that not even downgrading to version Tvheadend 4.2.4-23 (where this issue #4538 was fixed) did not help anymore. I am quite sure that this was working previously with version 4.2.4-23 but then I had probably different version of LibreElec with different kernel version (can not remember the exact version). So it seems that the kernel version might affect this also.


Files

6e75f0d0e338094e9b886ce0a3e8a882 (1.98 KB) 6e75f0d0e338094e9b886ce0a3e8a882 Has DVBSUB stream from the beginning Mikko Vestola, 2019-03-15 08:29
4abca5508de64095bda967c2bf7ee0ba (2.05 KB) 4abca5508de64095bda967c2bf7ee0ba DVBSUB stream starts 30 sec after beginning Mikko Vestola, 2019-03-15 08:29

History

#1

Updated by Mikko Vestola over 5 years ago

OK. Some updates. With VLC, I can see DVB subtitles from the recording, so this might be client issue (or server issue not providing those DVB subtitles to the client). So DVB subtitles are quite sure stored to recording (although DVBSUB stream is not mentioned in the log and also not mentioned in the recording info file in /storage/.kodi/userdata/addon_data/service.tvheadend42/dvr/log/xxxx) as it used to be I guess. But seems to be that Kodi video player client does not show these DVB subtitles for these files (DVB subtitles in general are working in Kodi for other files). Need to try out more...

#2

Updated by Jaroslav Kysela over 5 years ago

Do this test again with --trace mpegts,tbl-base (https://tvheadend.org/projects/tvheadend/wiki/Traces) and show logs.

#3

Updated by Jaroslav Kysela over 5 years ago

Uff, 4.2.7, I don't care.

#4

Updated by Mikko Vestola over 5 years ago

Investigated this more and this seems more likely to be client issue. So it seems that tvheadend creates *.ts file correctly with DVBSUB stream inside it (since works with VLC) but that DVBSUB stream might start in these cases e.g. 1 minute after the beginning of the recording. This seems to confuse the client in Kodi so that it will not display DVB subtitles. I am using LibreElec 9.0.1 (so Kodi 18.1) to play videos. Kodi video player supports DVB subtitles but it seems to be that if the DVBSUB stream is not there at the beginning of the program but starts e.g. 1 minute after the beginning, Kodi does not show DVB subtitles (you can not choose it from the subtitle menu later either). I tried both playing the recording using TVH client in Kodi and directly playing .ts file: both cases no DVB subtitles.

However, I am not 100% sure is this only client issue or is this valid for tvheadend to create recordings like this. Because the DVBSUB stream is not in the dvr info file, so it is missing this:

{
    "type": "DVBSUB",
    "language": "fin",
    "composition_id": 1,
    "ancillary_id": 50
}

I also tried to manually modify the DVR info file to include this above "type": "DVBSUB" entry but it did not help.

I put as attachment two examples of completed recordings: one having DVBSUB stream from the beginning (6e75f0d0e338094e9b886ce0a3e8a882, Ulkolinja: Irlannin rajalla) and one having DVBSUB stream starting like 30 sec after the beginning (4abca5508de64095bda967c2bf7ee0ba, Ben Zand diktaattoreiden maissa). For the first one DVB subtitles are visible, for the second one not. Related logs:

2019-03-14 23:09:30.006 [   INFO] dvr: "Ulkolinja: Irlannin rajalla" on "Yle TV1 HD" recorder starting
2019-03-14 23:09:30.008 [   INFO] dvr: About to set stop timer for "Ulkolinja: Irlannin rajalla" on "Yle TV1 HD" at start 1552597800 and original stop 1552600851 and overall stop at 1552601031
2019-03-14 23:09:30.009 [   INFO] subscription: 0006: "DVR: Ulkolinja: Irlannin rajalla" subscribing on channel "Yle TV1 HD", weight: 300, adapter: "Panasonic MN88473 : DVB-C #1 (1)", network: "Elisa", mux: "362
MHz", provider: "YLE", service: "Yle TV1 HD", profile="pass" 
2019-03-14 23:09:30.027 [   INFO] dvr: /var/media/Seagate/tv/Ulkolinja_-Irlannin-rajalla-Yle-TV1-HD2019-03-14.ts from adapter: "Panasonic MN88473 : DVB-C #1 (1)", network: "Elisa", mux: "362MHz", provider: "YLE" 
, service: "Yle TV1 HD" 
2019-03-14 23:09:30.027 [   INFO] dvr:  #  type              lang  resolution  aspect ratio  sample rate  channels
2019-03-14 23:09:30.028 [   INFO] dvr:  1  H264                    1920x1080   ?                                    
2019-03-14 23:09:30.028 [   INFO] dvr:  2  AC3               fin                             ?            ?         
2019-03-14 23:09:30.028 [   INFO] dvr:  3  TELETEXT                                                                 
2019-03-14 23:09:30.028 [   INFO] dvr:  4  AC3               dut                             ?            ?         
2019-03-14 23:09:30.028 [   INFO] dvr:  5  DVBSUB            fin  

2019-03-14 22:14:30.000 [   INFO] dvr: "Ben Zand diktaattoreiden maissa" on "Yle TV2 HD" recorder starting
2019-03-14 22:14:30.000 [   INFO] dvr: About to set stop timer for "Ben Zand diktaattoreiden maissa" on "Yle TV2 HD" at start 1552594500 and original stop 1552597500 and overall stop at 1552597800
2019-03-14 22:14:30.002 [   INFO] subscription: 0003: "DVR: Ben Zand diktaattoreiden maissa" subscribing on channel "Yle TV2 HD", weight: 300, adapter: "Panasonic MN88473 : DVB-C #1 (1)", network: "Elisa", mux: 
"362MHz", provider: "YLE", service: "Yle TV2 HD", profile="pass" 
2019-03-14 22:15:00.013 [   INFO] dvr: /var/media/Seagate/tv/Ben-Zand-diktaattoreiden-maissa-Yle-TV2-HD2019-03-14.ts from adapter: "Panasonic MN88473 : DVB-C #1 (1)", network: "Elisa", mux: "362MHz", provider: " 
YLE", service: "Yle TV2 HD" 
2019-03-14 22:15:00.013 [   INFO] dvr:  #  type              lang  resolution  aspect ratio  sample rate  channels
2019-03-14 22:15:00.013 [   INFO] dvr:  1  H264                    1920x1080   ?                                    
2019-03-14 22:15:00.013 [   INFO] dvr:  2  AC3               fin                             ?            ?         
2019-03-14 22:15:00.013 [   INFO] dvr:  3  TELETEXT                                                                
#5

Updated by Mikko Vestola over 5 years ago

And this is not only happening in 4.2.7, latest master also, I tried with quite recent build. But as said, this is more likely client issue. But could be verified is this the desired behavior of tvheadend to create recording like this or should it include that DVBSUB type entry in the info file in case the DVBSUB stream does not start from the beginning of the program (although having that entry did not have any effect to this problem).

#6

Updated by Mikko Vestola over 5 years ago

Related Kodi bug report if interested: https://github.com/xbmc/xbmc/issues/15751 . I think this tvheadend bug report can be closed if you are certain that this is expected behavior of tvheadend.

#7

Updated by Mikko Vestola over 5 years ago

Pretty sure this is a bug in Kodi video player since this issue only happens in Kodi 18.1, seems to work with 17.6 and with VLC. More in that related Kodi bug report.

#8

Updated by Mikko Vestola over 5 years ago

This issue is now fixed in Kodi master. Most likely fix will be in upcoming release Kodi 18.2. See more from the linked Kodi issue https://github.com/xbmc/xbmc/issues/15751

However, in the Kodi issue, there was a comment that DVB subtitles are not visible in this case because: "Subs do not show because the streams show up is 'no program' section of PAT/PMT". This could be checked out that is this valid for tvheadend to create DVB sub streams being in the "no program" section, probably related to some MPEG-TS specs which I don't understand that much. There is one example MPEG-TS recording available in the linked Kodi issue.

From my point of view, this is fixed because it now works in Kodi.

#9

Updated by Jaroslav Kysela over 5 years ago

  • Status changed from New to Invalid

Also available in: Atom PDF