Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
Bug Random channels no longer load in Kodi, only buffer
#46
I had a closer look at the recording MrReis provided. Here is evidence that PMT is borked:

Code:
09:32:32 T:123145312653312    INFO: ffmpeg[7000009DD000]: Input #0, mpegts, /Users/DE213022/Testvideo/NextPVR.t':
09:32:32 T:123145312653312    INFO: ffmpeg[7000009DD000]:   Duration: 00:00:38.24, start: 30860.138289, bitrate: 12943 kb/s
09:32:32 T:123145312653312    INFO: ffmpeg[7000009DD000]:   Program 5030
09:32:32 T:123145312653312    INFO: ffmpeg[7000009DD000]:   No Program
09:32:32 T:123145312653312    INFO: ffmpeg[7000009DD000]:     Stream #0:0[0xf97], 34, 1/90000: Video: mpeg2video (Main), yuv420p(tv), Closed Captions, max. 25000 kb/s, 59.94 fps, 59.94 tbr, 90k tbn, 119.88 tbc
09:32:32 T:123145312653312    INFO: ffmpeg[7000009DD000]:     Stream #0:1[0xf98], 18, 1/90000: Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s

The program 5030 does not have streams. The streams in this stream do not belong to a program.
Fix this and the stream will play.
Reply
#47
(2016-05-28, 09:37)FernetMenta Wrote: Here is evidence that PMT is borked:

Code:
09:32:32 T:123145312653312    INFO: ffmpeg[7000009DD000]: Input #0, mpegts, /Users/DE213022/Testvideo/NextPVR.t':
09:32:32 T:123145312653312    INFO: ffmpeg[7000009DD000]:   Duration: 00:00:38.24, start: 30860.138289, bitrate: 12943 kb/s
09:32:32 T:123145312653312    INFO: ffmpeg[7000009DD000]:   Program 5030
09:32:32 T:123145312653312    INFO: ffmpeg[7000009DD000]:   No Program
09:32:32 T:123145312653312    INFO: ffmpeg[7000009DD000]:     Stream #0:0[0xf97], 34, 1/90000: Video: mpeg2video (Main), yuv420p(tv), Closed Captions, max. 25000 kb/s, 59.94 fps, 59.94 tbr, 90k tbn, 119.88 tbc
09:32:32 T:123145312653312    INFO: ffmpeg[7000009DD000]:     Stream #0:1[0xf98], 18, 1/90000: Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s

The program 5030 does not have streams. The streams in this stream do not belong to a program.
Fix this and the stream will play.
I don't think it's borked, since it's directly from the broadcaster, and works with set-top boxes, and in other players like NextPVR, older XBMC etc. Is that what that output is saying though?... since it then goes on to list the audio video streams, like it does know about them.

What might be confusing Kodi is that this channel's PMT has a non-zero program_info_length and associated descriptors ('Conditional Access Descriptor' etc) prior to the list of streams. Most channels do not have these descriptors (instead have program_info_length=0), and usually only have descriptors associated with the streams (which come later in the PMT).

This is the streams NextPVR sees listed when it parses the PMT (when playing MrReis supplied live tv file):
Code:
<ServiceInformation>
  <TSID>0</TSID>
  <Service>
    <ServiceID>5030</ServiceID>
    <PMT_PID>55</PMT_PID>
    <Streams>
      <Stream>
        <PID>3991</PID>
        <StreamType>2</StreamType>
      </Stream>
      <Stream>
        <PID>3992</PID>
        <StreamType>129</StreamType>
        <Language>eng</Language>
        <AudioType>0</AudioType>
      </Stream>
      <Stream>
        <PID>3993</PID>
        <StreamType>134</StreamType>
      </Stream>
      <Stream>
        <PID>3994</PID>
        <StreamType>192</StreamType>
        <unparsed_descriptor>0xA1</unparsed_descriptor>
        <unparsed_descriptor>0x5</unparsed_descriptor>
      </Stream>
      <Stream>
        <PID>3995</PID>
        <StreamType>192</StreamType>
        <unparsed_descriptor>0xA2</unparsed_descriptor>
        <unparsed_descriptor>0x5</unparsed_descriptor>
      </Stream>
      <Stream>
        <PID>4035</PID>
        <StreamType>192</StreamType>
        <unparsed_descriptor>0xBF</unparsed_descriptor>
      </Stream>
    </Streams>
  </Service>
</ServiceInformation>
Reply
#48
Actually, I found it was triggering this logic when validating the PMT format (prior to parsing):

Code:
            // special case for ATSC/SCTE 0xC0 table, which can be included at start of PMT
            if (pmt[0] == 0xC0 /* program_info_message */)
            {
... etc

So....it looks likely Kodi can't can't handle SCTE 0xC0 table included at the start of PMT table, which is sometimes used in North American cable systems.
Reply
#49
Shrugs. If this is not evident enough I don't know what I could do to make it even more clear. Use MediaInfo and it won't give you any info because of incorrect PMT.
No matter how often you repeat that old XBMC might have played this file. Kodi with current ffmpeg won't play it unless you fix PMT. I doubt that ffmpeg AND MediaInfo have both the same issue in parsing PAT/PMT. More likely is that PAT/PMT is just wrong.
Reply
#50
It is an entirely valid PMT, being generated by a broadcaster, and works in other players and set top boxes, so clearly a Kodi or ffmpeg bug.
Reply
#51
Don't forget to blame MediaInfo as buggy too Smile
Reply
#52
Ok, whatever - but it's definitely looking like a case of Kodi being unable to handle these SCTE 0xC0 extensions to the PMT, which are used on some North American cable companies (albeit rarely).

Since it's looking like it's not going to be fixed on the Kodi side, I've supplied MrReis a patch that strips this bit of data from the broadcaster's PMT. It sounds like these channels are now working for him. He is going to continue to test it over the next few days.
Reply
#53
(2016-05-30, 05:34)sub3 Wrote: Ok, whatever - but it's definitely looking like a case of Kodi being unable to handle these SCTE 0xC0 extensions to the PMT, which are used on some North American cable companies (albeit rarely).

That can likely be the case.

(2016-05-30, 05:34)sub3 Wrote: Since it's looking like it's not going to be fixed on the Kodi side, I've supplied MrReis a patch that strips this bit of data from the broadcaster's PMT. It sounds like these channels are now working for him. He is going to continue to test it over the next few days.

Great. It can't be fixed in Kodi because the code that is responsible does not belong to Kodi. It's ffmpeg. If you want to have it fixed in ffmpeg, please open a ticket there.
Reply
#54
(2016-05-30, 10:47)FernetMenta Wrote: It can't be fixed in Kodi ...

A benign problem (a "very verbose" message) that was caused by the same SCTE table was fixed in mythTV seven years ago: #6539 closed patch (fixed): cleanup 'record' debug output for program information message table 0xc0. The solution was to "Silently ignore SCTE tables in ATSC table parser as we do with errant DVB tables already."
Reply
#55
(2016-06-01, 06:45)MrReis Wrote:
(2016-05-30, 10:47)FernetMenta Wrote: It can't be fixed in Kodi ...

A benign problem (a "very verbose" message) that was caused by the same SCTE table was fixed in mythTV seven years ago: #6539 closed patch (fixed): cleanup 'record' debug output for program information message table 0xc0. The solution was to "Silently ignore SCTE tables in ATSC table parser as we do with errant DVB tables already."

That relates to ffmpeg code. Feel free to file a bug report at ffmpeg.
Reply
#56
(2016-06-01, 07:09)FernetMenta Wrote:
(2016-06-01, 06:45)MrReis Wrote:
(2016-05-30, 10:47)FernetMenta Wrote: It can't be fixed in Kodi ...

A benign problem (a "very verbose" message) that was caused by the same SCTE table was fixed in mythTV seven years ago: #6539 closed patch (fixed): cleanup 'record' debug output for program information message table 0xc0. The solution was to "Silently ignore SCTE tables in ATSC table parser as we do with errant DVB tables already."

That relates to ffmpeg code. Feel free to file a bug report at ffmpeg.

I would file a ffmpeg bug report for this problem, if I can provide enough information for a proper problem report. Can you tell me what ffmpeg library or libraries and functions are being used, what parameters are being passed to the functions and what, if any, are the ffmpeg settings? Would a KODI debug log be of any help to ffmpeg developers on this problem? I can't find any documentation on the content of the KODI debug log messages - is there any documentation?
Reply
#57
MrReis, did Sub3's patch do the trick?
Reply
#58
(2016-06-04, 16:28)guttermonk Wrote: MrReis, did Sub3's patch do the trick?

Yes. I have been using sub3's PMT patch for seven days and all the live TV channels that sometimes do not play in KODI using the NextPVR backend now correctly play. I have not noticed any unintended consequences of the patch.
Reply
#59
Is Sub3's patch a kodi patch or ffmpeg or in NextPVR ?
MrMC Forums : http://forum.mrmc.tv
Reply
#60
(2016-06-05, 05:40)MrMC Wrote: Is Sub3's patch a kodi patch or ffmpeg or in NextPVR ?

sub3's patch is a NextPVR (3.3.6) patch that removes "entitely valid" Program Information Message (PIM) streams (that I believe are referenced in the PMT) in live TV streams that function(s) in the mpegts module of the ffmpeg libavformat library which KODI uses can not "handle." It's not clear to me which function(s) in mpegts.c cannot "handle" the PIM streams. If I knew that, then I would file a ffmpeg bug report for this problem as FernetMenta suggested in Post #55 above.
Reply

Logout Mark Read Team Forum Stats Members Help
Random channels no longer load in Kodi, only buffer0