Bug #2805
closedCAPMT: TVH is not able to start stream to Kodi after stop of Kodi and then starting it again - switching channels back and forth starts stream again
0%
Description
Running on latest TVH 3.9.2747~g3049486~trusty.
When I start Kodi the live-TV stream does not start, it stays on "Buffering... 0%".
If I switch channels back and forth the streaming starts properly.
If I disable one of my tuners in TVH and then stop Kodi and start Kodi again the channel works fine. If I now stop Kodi again and then start a second time I get the buffering issue again with no live-tv stream starting unless I either:
1. Switch channels back and forth
or
2. disable the current tuner in TVH
I see the following in the TVH-log when the buffering happens:
2015-04-26 13:11:50.743 htsp: Got connection from 127.0.0.1
2015-04-26 13:11:50.743 htsp: 127.0.0.1: Welcomed client software: XBMC Media Center (HTSPv8)
2015-04-26 13:11:50.749 htsp: 127.0.0.1 [ XBMC Media Center ]: Identified as user xbmc-tvserver
2015-04-26 13:11:50.749 htsp: 127.0.0.1 [ xbmc-tvserver | XBMC Media Center ]: Privileges raised
2015-04-26 13:11:51.745 mpegts: 10903V in THOR - tuning on TUNER 8
2015-04-26 13:11:51.745 capmt: tvheadend: Starting CAPMT server for service "SVT2 HD" on adapter 7 seq 0x0007
2015-04-26 13:11:51.745 subscription: 0007: "127.0.0.1 [ xbmc-tvserver | XBMC Media Center ]" subscribing on channel "SVT2 HD", weight: 150, adapter: "TUNER 8", network: "THOR", mux: "10903V", provider: "Telenor", service: "SVT2 HD", profile="htsp", hostname="127.0.0.1", username="xbmc-tvserver", client="XBMC Media Center"
2015-04-26 13:11:54.267 TS: THOR/10903V/SVT2 HD: H264 #1175 Continuity counter error (total 1)
#1175 Continuity counter error (total 21)
2015-04-26 13:12:05.244 TS: THOR/10903V/SVT2 HD: H264
2015-04-26 13:12:16.039 TS: THOR/10903V/SVT2 HD: H264 #1175 Continuity counter error (total 41)
#1175 Continuity counter error (total 56)
2015-04-26 13:12:27.307 TS: THOR/10903V/SVT2 HD: H264
I havent seen these continuity errors for a looong time.
If I now stop Kodi and then disable for example tuner 8 (adapter 7) that was used above and then start Kodi again it works fine and Kodi starts streaming the channel properly and the log looks clean without any continuity counter errors:
2015-04-26 13:20:28.173 htsp: Got connection from 127.0.0.1
2015-04-26 13:20:28.173 htsp: 127.0.0.1: Welcomed client software: XBMC Media Center (HTSPv8)
2015-04-26 13:20:28.180 htsp: 127.0.0.1 [ XBMC Media Center ]: Identified as user xbmc-tvserver
2015-04-26 13:20:28.180 htsp: 127.0.0.1 [ xbmc-tvserver | XBMC Media Center ]: Privileges raised
2015-04-26 13:20:29.157 mpegts: 10903V in THOR - tuning on TUNER 6
2015-04-26 13:20:29.410 capmt: tvheadend: Starting CAPMT server for service "SVT2 HD" on adapter 5 seq 0x0008
2015-04-26 13:20:29.410 subscription: 0008: "127.0.0.1 [ xbmc-tvserver | XBMC Media Center ]" subscribing on channel "SVT2 HD", weight: 150, adapter: "TUNER 6", network: "THOR",
Exiting Kodi now and restarting it again causes the buffering stop to start again and no live stream until I switch channel back and forth.
Exiting Kodi and starting it again the log starts to show the continuity errors again:
2015-04-26 13:22:57.224 mpegts: 10903V in THOR - tuning on TUNER 6
2015-04-26 13:22:57.224 capmt: tvheadend: Starting CAPMT server for service "SVT2 HD" on adapter 5 seq 0x0009
2015-04-26 13:22:57.224 subscription: 0009: "127.0.0.1 [ xbmc-tvserver | XBMC Media Center ]" subscribing on channel "SVT2 HD", weight: 150, adapter: "TUNER 6", network: "THOR", mux: "10903V", provider: "Telenor", service: "SVT2 HD", profile="htsp", hostname="127.0.0.1", username="xbmc-tvserver", client="XBMC Media Center"
2015-04-26 13:22:59.093 TS: THOR/10903V/SVT2 HD: H264 #1175 Continuity counter error (total 1)
#1175 Continuity counter error (total 30)
2015-04-26 13:23:10.705 TS: THOR/10903V/SVT2 HD: H264
OSCAM-log looks like this when the stream starts properly:
2015/04/26 13:27:42 B87450 c [NEW ECMPID #0] CAID: 0B00 ECM_PID: 1BB6 PROVID: 000000
2015/04/26 13:27:42 B87450 c Found 1 ECMpids and 0 STREAMpids in PMT
2015/04/26 13:27:42 B87450 c [DVBAPI] Receiver wants to demux srvid 0581 on adapter 0007 camask 0080 index 0000 pmtpid 0000
2015/04/26 13:27:42 B87450 c New program number: 0581 (0B00:0581 unknown) [pmt_list_management 3]
2015/04/26 13:27:42 B87450 c [DVBAPI] Found channel in cache -> start descrambling ecmpid #0
2015/04/26 13:27:42 B87450 c [DVBAPI] Demuxer #0 trying to descramble PID #0 CAID 0B00 PROVID 000000 ECMPID 1BB6 ANY CHID PMTPID 0000 VPID 000A
2015/04/26 13:27:42 B87450 c tvheadend (0B00&000000/0000/0581/88:9DB8705AA2FD62D73A0368C5D668B219): found (331 ms) by SerialReader
and when the stream does not start properly OSCAM log looks like this:
2015/04/26 13:29:45 B87450 c [DVBAPI] Demuxer #0 continue decoding of SRVID 0581
2015/04/26 13:29:45 B87450 c [SKIP STREAM] CAID: 0B00 ECM_PID: 1BB6 PROVID: 000000 (Same as ECMPID #0)
2015/04/26 13:29:45 B87450 c Found 1 ECMpids and 0 STREAMpids in PMT
2015/04/26 13:29:45 B87450 c [DVBAPI] Receiver wants to demux srvid 0581 on adapter 0007 camask 0080 index 0000 pmtpid 0000
2015/04/26 13:29:45 B87450 c New program number: 0581 (0B00:0581 unknown) [pmt_list_management 3]
and when switching channel in Kodi to another one and then back to the first one stream starts properly and OSCAM-log looks like this then:
2015/04/26 13:32:23 B87450 c [NEW ECMPID #0] CAID: 0B00 ECM_PID: 1BB6 PROVID: 000000
2015/04/26 13:32:23 B87450 c Found 1 ECMpids and 0 STREAMpids in PMT
2015/04/26 13:32:23 B87450 c [DVBAPI] Receiver wants to demux srvid 0581 on adapter 0007 camask 0080 index 0000 pmtpid 0000
2015/04/26 13:32:23 B87450 c New program number: 0581 (0B00:0581 unknown) [pmt_list_management 3]
2015/04/26 13:32:23 B87450 c [DVBAPI] Found channel in cache -> start descrambling ecmpid #0
2015/04/26 13:32:23 B87450 c [DVBAPI] Demuxer #0 trying to descramble PID #0 CAID 0B00 PROVID 000000 ECMPID 1BB6 ANY CHID PMTPID 0000 VPID 0011
2015/04/26 13:32:24 B87450 c tvheadend (0B00&000000/0000/0581/88:EFF56937BC3907C8A23467E4602F070B): found (321 ms) by SerialReader
Switching channel back and forth starts the stream again. This happens for all my tuners so it is not tuner dependent and I haven't upgraded Oscam or Kodi when these issues started (as far as I recall). I miiiight have updated TVH by mistake when updating other Ubuntu components through the Ubuntu update center.
I have now updated Kodi to 14.2 (from 14.1) and TVH to the latest as well as Oscam to revision r1422 but still the same issue.
It "feels" like TVH is not releasing tuner properly or re-tuning to it properly when re-starting Kodi? Or is this only OSCAM or Kodi-related issue?
Let me know what kind of logs you might need to dig into this issue.
Files