Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some channels not open #208

Closed
clefss opened this issue Apr 17, 2019 · 36 comments
Closed

Some channels not open #208

clefss opened this issue Apr 17, 2019 · 36 comments
Labels
kodi issue Issue likely in kodi and not the addon

Comments

@clefss
Copy link

clefss commented Apr 17, 2019

Some channels in portugal (like Sport TV 5, Eleven Sports 1) do not open.
To explain it better, if I download the m3u of the WebIf and open with VLC the channel does not open but if it opens with Classic Media Player the same channel already opens. The same happens with the plugin, if open m3u in the IPTV Simple Client extension the channels give but in your with url that not open.
I do not know if I explained myself well because it is a confusing problem. I do not know if it's from codecs or anything else.

@phunkyfish
Copy link
Member

phunkyfish commented Apr 17, 2019

Has this always been the case or did it change recently?

Can you provide a full debug log showing this (I.e. including playing one of these playing channels)?

@clefss
Copy link
Author

clefss commented Apr 18, 2019

The problem was also present in the last plugin Vu+ an continues on this.

I put the following scenery in the log file: I start kodi and wait for the channels to load, after starting a channel that works and after the 2019-04-18 16:14:00 all the logs are relative to a channel that does not it works.
kodi.log

@phunkyfish
Copy link
Member

Hmmm, the second channels appears to get stuck in a loop like this:

2019-04-18 16:14:12.156 T:1000   DEBUG: ffmpeg[3E8]: [mpegts] pid=1d21 pes_code=0x1c0
2019-04-18 16:14:12.156 T:1000   DEBUG: ffmpeg[3E8]: [mpegts] PAT:
2019-04-18 16:14:12.203 T:1000   DEBUG: Previous line repeats 1 times.
2019-04-18 16:14:12.204 T:1000   DEBUG: ffmpeg[3E8]: [mpegts] pid=1d20 pes_code=0x1e0
2019-04-18 16:14:12.205 T:1000   DEBUG: ffmpeg[3E8]: [mpegts] PAT:
2019-04-18 16:14:12.222 T:1000   DEBUG: ffmpeg[3E8]: [mpegts] pid=1d20 pes_code=0x1e0
2019-04-18 16:14:12.224 T:1000   DEBUG: ffmpeg[3E8]: [mpegts] PAT:
2019-04-18 16:14:12.224 T:1000   DEBUG: ffmpeg[3E8]: [mpegts] pid=1d20 pes_code=0x1e0
2019-04-18 16:14:12.225 T:1000   DEBUG: ffmpeg[3E8]: [mpegts] pid=1d21 pes_code=0x1c0
2019-04-18 16:14:12.225 T:1000   DEBUG: ffmpeg[3E8]: [mpegts] pid=1d20 pes_code=0x1e0

It doesn't ever seem to process the h264 like the first channel does. Not sure why.

If you record one of the non working channels can you play it back in kodi?

@clefss
Copy link
Author

clefss commented Apr 18, 2019

Yes, I can watch the recordings of these channels.

@phunkyfish
Copy link
Member

Very strange. And do you know others who have the same problem locally?

@phunkyfish
Copy link
Member

Are you using transcoding or anything like that?

@hudokkow
Copy link
Contributor

Those channels are multi-program MPEG-TS, aka MPTS.
afaik, the problem is NOT exclusive to the Portuguese NOS TV provider. Other European sat providers also use MPTS.

For a few years Kodi (ffmpeg?) struggled to play those streams, live or recorded. I don't know the situation now since I stopped using enigma STBs.

If I remember correctly, transcoded streams work flawlessly.

Quick google-fu returned

@phunkyfish
Copy link
Member

My next suggestion was going to be try enabling transcoding 😉

@hudokkow
Copy link
Contributor

Yes, I can watch the recordings of these channels.

Missed this earlier. ^^

That's even weirder. If it plays recorded streams something must be wrong with the code path taken with live mpeg streams.

I know for a fact everything used to work around April 2018.

I know this because I built LibreELEC for RPi around that time for a friend and his sole purpose was to watch those same channels, using his VU+ STB as backend. To my knowledge it's still working. But I'll ask him and find the exact LibreELEC/Kodi/Enigma add-on combo.

@phunkyfish
Copy link
Member

Since then the addon would have moved to using a stream reader to enable timeshifting. That is one change that could have an effect. Is it possible that may play a part in this?

It still doesn't explain recordings working though because as far as I know enimga2 just puts the raw stream to disk for timers.

@phunkyfish
Copy link
Member

I wonder is this user having the same issue: https://forum.kodi.tv/showthread.php?tid=343248

@phunkyfish
Copy link
Member

Confirmed, user is also impacted. They did say that it works with iptvsimple.

@hudokkow I’m a little lost on what to do with this. The fact it works for recordings and not for a live stream is strange.

@diogosena
Copy link

diogosena commented Apr 30, 2019

I have a similar problem, when using the e2 addon, the audio cuts every 10 seconds or so, when using the direct url (iptv plugin or similar) the audio is perfect.
Trying to track differences, I noticed the audio bitrate is smaller when using this e2 addon.
That's weird, cause i don't have transcoding enabled on my e2 box.

@phunkyfish
Copy link
Member

Can you try enabling transcoding and change the port int the addon and see what happens?

@phunkyfish
Copy link
Member

Also, what provider/country are you using?

@diogosena
Copy link

I'm in Brazil, sorry, it's an android box modified to run enigma2, so no transcoding working yet.
There's any other way I could help? maybe recording something?
Also, that's happening in only one channel (maybe others, but not the ones I watch)

@phunkyfish
Copy link
Member

If you could create a full debug log playing one channel that works and one that doesn’t we can see if it’s the same issue. It doesn’t sound the same though as you get video and just have audio issues.

Does the same audio issue happen with a recording? If so, a sample would be great and I can test it locally.

@diogosena
Copy link

I'm not sure if it happens on recordings, I'll test later today and post those logs.

@phunkyfish
Copy link
Member

Maybe create a new issue. This sounds like it’s not the same as it’s an audio only issue for you.

@hudokkow
Copy link
Contributor

hudokkow commented May 1, 2019

Okido.
Spoke with my friend. Everything still works. It's a March 25 2018 LibreELEC build, done by me. Good thing I disabled all updates. 😉

Details below.

21:55:02.196 T:1942245952  NOTICE: Starting Kodi (18.0-ALPHA2 Git:258cf89). Platform: Linux ARM 32-bit
21:55:02.196 T:1942245952  NOTICE: Using Release Kodi x32 build (version for Raspberry Pi)
21:55:02.196 T:1942245952  NOTICE: Kodi compiled Mar 25 2018 by GCC 7.3.0 for Linux ARM 32-bit version 4.14.24 (265752)
21:55:02.197 T:1942245952  NOTICE: Running on LibreELEC (hudo): devel 9.0, kernel: Linux ARM 32-bit version 4.14.24
21:55:02.197 T:1942245952  NOTICE: FFmpeg version/source: 3.4.1-Kodi
21:55:02.197 T:1942245952  NOTICE: Host CPU: ARMv7 Processor rev 4 (v7l), 4 cores available
21:55:03.017 T:1942245952  NOTICE: ADDON: pvr.vuplus v3.6.1.2 installed

That corresponds to:

Complete log file below. Sorry, but log is too big (17MB) for paste sites. kodi_log_rui_rpi2_vuplus_funkar_limpo.zip

Three channels are played in this debug log without problems. As far as I know, they are all MPTS (multiprogram TS):

  • SportTV HD 1
21:55:34.358 T:1551700864    INFO: ffmpeg[5C7D1380]: Input #0, mpegts, http://192.168.111.7:8001/1:0:1:1C3:68:53:CE40000:0:0:':
  • RTP 1
21:56:30.176 T:1813406592    INFO: ffmpeg[6C166380]: Input #0, mpegts, http://192.168.111.7:8001/1:0:1:370:26:36:CE40000:0:0:':
  • Sic Notícias
22:00:18.997 T:1452241792    INFO: ffmpeg[568F7380]: Input #0, mpegts, http://192.168.111.7:8001/1:0:1:375:26:36:CE40000:0:0:':

EDIT: You can PM me in slack to not spam here.

@clefss
Copy link
Author

clefss commented May 1, 2019

@phunkyfish I think in here everyone has same problem. It's the same use to transcode or not ... the behavior is the same

@phunkyfish
Copy link
Member

That’s useful info, thanks @clefss

@phunkyfish phunkyfish added the kodi issue Issue likely in kodi and not the addon label May 6, 2019
phunkyfish added a commit to phunkyfish/pvr.vuplus that referenced this issue May 27, 2019
phunkyfish added a commit to phunkyfish/pvr.vuplus that referenced this issue May 27, 2019
@phunkyfish
Copy link
Member

Have created two PR's one for Leia (#230) and one for matrix (#229). Can either of you build and test?

@clefss @diogosena

phunkyfish added a commit to phunkyfish/pvr.vuplus that referenced this issue May 27, 2019
phunkyfish added a commit to phunkyfish/pvr.vuplus that referenced this issue May 27, 2019
phunkyfish added a commit to phunkyfish/pvr.vuplus that referenced this issue May 27, 2019
phunkyfish added a commit to phunkyfish/pvr.vuplus that referenced this issue May 27, 2019
phunkyfish added a commit to phunkyfish/pvr.vuplus that referenced this issue May 28, 2019
phunkyfish added a commit to phunkyfish/pvr.vuplus that referenced this issue May 28, 2019
@clefss
Copy link
Author

clefss commented May 29, 2019

@phunkyfish Sorry, but I couldn't test the plugin ... I followed the steps to compile and use but I couldn't open the plugin on kodi. Probably I didn't do this correctly.

@phunkyfish
Copy link
Member

@clefss what platform do you run on?

@clefss
Copy link
Author

clefss commented May 29, 2019

@phunkyfish Windows, but I built it in the docker container of ubuntu and then put the result in the plugins folder in Windows and Kodi didn't detect the plugin. I followed your linux build instructions.

@phunkyfish
Copy link
Member

You would need to build on windows to put it on Windows I think.

@hudokkow
Copy link
Contributor

It's not working. It correctly detects and passes the PID to Kodi but no joy.

@phunkyfish
Copy link
Member

Ok, that would indicate a kodi pvr bug potentially. Plus I see the value being read in kodi.

I made a similar change to iptvsimple and it appears to work, however that does not use inputstreams.

@phunkyfish
Copy link
Member

@hudokkow Can you verify if the program is correctly selected here:
https://github.com/xbmc/xbmc/blob/ba73551d06e361b9d0d88f116eb54829a3eb5d23/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp#L522-L536

i.e. is nProgram correctly set in the above block.

@hudokkow
Copy link
Contributor

from pvr.vuplus/src/client.cpp

2019-05-30 22:09:10.058 T:139985011955264  NOTICE: AddOnLog: Enigma2 Client: pvr.vuplus - GetChannelStreamProperties - hudokkow: for channel: RTP 1, set Stream Program Number to 880

from xbmc/cores/VideoPlayer/DVDDemuxFFmpeg.cpp

2019-05-30 22:09:11.576 T:139982962419456   ERROR: Open - hudokkow: programNumber is 880
2019-05-30 22:09:11.576 T:139982962419456   ERROR: Open - hudokkow: nprogram is 18
  // in case of mpegts and we have not seen pat/pmt, defer creation of streams
  if (!skipCreateStreams || m_pFormatContext->nb_programs > 0)
  {
    unsigned int nProgram = UINT_MAX;
    if (m_pFormatContext->nb_programs > 0)
    {
      // select the correct program if requested
      CVariant programProp(pInput->GetProperty("program"));
      if (!programProp.isNull())
      {
        int programNumber = static_cast<int>(programProp.asInteger());
        CLog::Log(LOGERROR, "%s - hudokkow: programNumber is %i", __FUNCTION__, programNumber);

        for (unsigned int i = 0; i < m_pFormatContext->nb_programs; ++i)
        {
          if (m_pFormatContext->programs[i]->program_num == programNumber)
          {
            nProgram = i;
            CLog::Log(LOGERROR, "%s - hudokkow: nprogram is %i", __FUNCTION__, nProgram);
            break;
          }
        }
      }

and a bit more complete

2019-05-30 22:09:11.573 T:139982962419456   DEBUG: CInputStreamPVRChannel - OpenPVRStream - opened channel stream pvr://channels/tv/All channels/pvr.vuplus_1.pvr
2019-05-30 22:09:11.573 T:139982962419456  NOTICE: Creating Demuxer
2019-05-30 22:09:11.574 T:139982962419456   DEBUG: Open - probing detected format [mpegts]
2019-05-30 22:09:11.575 T:139982962419456    INFO: ffmpeg[7F5052BFE700]: Input #0, mpegts, from 'pvr://channels/tv/All channels/pvr.vuplus_1.pvr':
2019-05-30 22:09:11.575 T:139982962419456    INFO: ffmpeg[7F5052BFE700]:   Duration: N/A, bitrate: N/A
2019-05-30 22:09:11.575 T:139982962419456    INFO: ffmpeg[7F5052BFE700]:   Program 4
2019-05-30 22:09:11.575 T:139982962419456    INFO: ffmpeg[7F5052BFE700]:   Program 13
2019-05-30 22:09:11.575 T:139982962419456    INFO: ffmpeg[7F5052BFE700]:   Program 19
2019-05-30 22:09:11.575 T:139982962419456    INFO: ffmpeg[7F5052BFE700]:   Program 20
2019-05-30 22:09:11.575 T:139982962419456    INFO: ffmpeg[7F5052BFE700]:   Program 24
2019-05-30 22:09:11.576 T:139982962419456    INFO: ffmpeg[7F5052BFE700]:   Program 301
2019-05-30 22:09:11.576 T:139982962419456    INFO: ffmpeg[7F5052BFE700]:   Program 303
2019-05-30 22:09:11.576 T:139982962419456    INFO: ffmpeg[7F5052BFE700]:     Stream #0:0[0x1c9a]: Video: h264 ([27][0][0][0] / 0x001B), none, 90k tbn
2019-05-30 22:09:11.576 T:139982962419456    INFO: ffmpeg[7F5052BFE700]:     Stream #0:1[0x1c9b](por): Audio: mp3 ([4][0][0][0] / 0x0004), 0 channels
2019-05-30 22:09:11.576 T:139982962419456    INFO: ffmpeg[7F5052BFE700]:   Program 304
2019-05-30 22:09:11.576 T:139982962419456    INFO: ffmpeg[7F5052BFE700]:   Program 305
2019-05-30 22:09:11.576 T:139982962419456    INFO: ffmpeg[7F5052BFE700]:   Program 306
2019-05-30 22:09:11.576 T:139982962419456    INFO: ffmpeg[7F5052BFE700]:   Program 309
2019-05-30 22:09:11.576 T:139982962419456    INFO: ffmpeg[7F5052BFE700]:   Program 312
2019-05-30 22:09:11.576 T:139982962419456    INFO: ffmpeg[7F5052BFE700]:   Program 313
2019-05-30 22:09:11.576 T:139982962419456    INFO: ffmpeg[7F5052BFE700]:   Program 315
2019-05-30 22:09:11.576 T:139982962419456    INFO: ffmpeg[7F5052BFE700]:   Program 316
2019-05-30 22:09:11.576 T:139982962419456    INFO: ffmpeg[7F5052BFE700]:   Program 317
2019-05-30 22:09:11.576 T:139982962419456    INFO: ffmpeg[7F5052BFE700]:   Program 318
2019-05-30 22:09:11.576 T:139982962419456    INFO: ffmpeg[7F5052BFE700]:   Program 870
2019-05-30 22:09:11.576 T:139982962419456    INFO: ffmpeg[7F5052BFE700]:   Program 880
2019-05-30 22:09:11.576 T:139982962419456    INFO: ffmpeg[7F5052BFE700]:   Program 881
2019-05-30 22:09:11.576 T:139982962419456    INFO: ffmpeg[7F5052BFE700]:   Program 882
2019-05-30 22:09:11.576 T:139982962419456    INFO: ffmpeg[7F5052BFE700]:   Program 883
2019-05-30 22:09:11.576 T:139982962419456    INFO: ffmpeg[7F5052BFE700]:   Program 884
2019-05-30 22:09:11.576 T:139982962419456    INFO: ffmpeg[7F5052BFE700]:   Program 885
2019-05-30 22:09:11.576 T:139982962419456    INFO: ffmpeg[7F5052BFE700]:   Program 886
2019-05-30 22:09:11.576 T:139982962419456    INFO: ffmpeg[7F5052BFE700]:   Program 887
2019-05-30 22:09:11.576 T:139982962419456    INFO: ffmpeg[7F5052BFE700]:   Program 888
2019-05-30 22:09:11.576 T:139982962419456    INFO: ffmpeg[7F5052BFE700]:   Program 889
2019-05-30 22:09:11.576 T:139982962419456   ERROR: Open - hudokkow: programNumber is 880
2019-05-30 22:09:11.576 T:139982962419456   ERROR: Open - hudokkow: nprogram is 18
2019-05-30 22:09:11.576 T:139982962419456   DEBUG: CVideoPlayer::SetCaching - caching state 2
2019-05-30 22:09:11.576 T:139982962419456   DEBUG: CDVDClock::SetSpeedAdjust - adjusted:0.000000
2019-05-30 22:09:11.617 T:139982962419456   ERROR: ffmpeg[7F5052BFE700]: [NULL] SPS unavailable in decode_picture_timing
2019-05-30 22:09:11.617 T:139982962419456   ERROR: ffmpeg[7F5052BFE700]: [NULL] non-existing PPS 0 referenced
2019-05-30 22:09:11.625 T:139982962419456   ERROR: ffmpeg[7F5052BFE700]: [NULL] SPS unavailable in decode_picture_timing
2019-05-30 22:09:11.625 T:139982962419456   ERROR: ffmpeg[7F5052BFE700]: [NULL] non-existing PPS 0 referenced
2019-05-30 22:09:11.625 T:139982962419456   ERROR: ffmpeg[7F5052BFE700]: [NULL] SPS unavailable in decode_picture_timing
2019-05-30 22:09:11.625 T:139982962419456   ERROR: ffmpeg[7F5052BFE700]: [NULL] non-existing PPS 0 referenced
2019-05-30 22:09:11.625 T:139982962419456   ERROR: ffmpeg[7F5052BFE700]: [NULL] SPS unavailable in decode_picture_timing
2019-05-30 22:09:11.625 T:139982962419456   ERROR: ffmpeg[7F5052BFE700]: [NULL] non-existing PPS 0 referenced
2019-05-30 22:09:11.631 T:139982962419456   ERROR: ffmpeg[7F5052BFE700]: [NULL] SPS unavailable in decode_picture_timing
2019-05-30 22:09:11.631 T:139982962419456   ERROR: ffmpeg[7F5052BFE700]: [NULL] non-existing PPS 0 referenced
2019-05-30 22:09:11.631 T:139982962419456   ERROR: ffmpeg[7F5052BFE700]: [NULL] SPS unavailable in decode_picture_timing
2019-05-30 22:09:11.631 T:139982962419456   ERROR: ffmpeg[7F5052BFE700]: [NULL] non-existing PPS 0 referenced
2019-05-30 22:09:11.637 T:139982962419456   ERROR: ffmpeg[7F5052BFE700]: [NULL] SPS unavailable in decode_picture_timing
2019-05-30 22:09:11.637 T:139982962419456   ERROR: ffmpeg[7F5052BFE700]: [NULL] non-existing PPS 0 referenced
2019-05-30 22:09:11.642 T:139982962419456   ERROR: ffmpeg[7F5052BFE700]: [NULL] SPS unavailable in decode_picture_timing
2019-05-30 22:09:11.642 T:139982962419456   ERROR: ffmpeg[7F5052BFE700]: [NULL] non-existing PPS 0 referenced
2019-05-30 22:09:11.643 T:139982962419456   ERROR: ffmpeg[7F5052BFE700]: [NULL] SPS unavailable in decode_picture_timing
2019-05-30 22:09:11.643 T:139982962419456   ERROR: ffmpeg[7F5052BFE700]: [NULL] non-existing PPS 0 referenced
2019-05-30 22:09:11.644 T:139982962419456   ERROR: ffmpeg[7F5052BFE700]: [NULL] SPS unavailable in decode_picture_timing
2019-05-30 22:09:11.644 T:139982962419456   ERROR: ffmpeg[7F5052BFE700]: [NULL] non-existing PPS 0 referenced
2019-05-30 22:09:11.646 T:139982962419456   ERROR: ffmpeg[7F5052BFE700]: [NULL] SPS unavailable in decode_picture_timing
2019-05-30 22:09:11.646 T:139982962419456   ERROR: ffmpeg[7F5052BFE700]: [NULL] non-existing PPS 0 referenced
2019-05-30 22:09:11.646 T:139982962419456   ERROR: ffmpeg[7F5052BFE700]: [NULL] SPS unavailable in decode_picture_timing
2019-05-30 22:09:11.646 T:139982962419456   ERROR: ffmpeg[7F5052BFE700]: [NULL] non-existing PPS 0 referenced
2019-05-30 22:09:11.653 T:139982962419456   ERROR: ffmpeg[7F5052BFE700]: [NULL] SPS unavailable in decode_picture_timing
2019-05-30 22:09:11.653 T:139982962419456   ERROR: ffmpeg[7F5052BFE700]: [NULL] non-existing PPS 0 referenced
2019-05-30 22:09:11.656 T:139982962419456   ERROR: ffmpeg[7F5052BFE700]: [NULL] SPS unavailable in decode_picture_timing
2019-05-30 22:09:11.656 T:139982962419456   ERROR: ffmpeg[7F5052BFE700]: [NULL] non-existing PPS 0 referenced
2019-05-30 22:09:11.657 T:139982962419456   ERROR: ffmpeg[7F5052BFE700]: [NULL] SPS unavailable in decode_picture_timing
2019-05-30 22:09:11.657 T:139982962419456   ERROR: ffmpeg[7F5052BFE700]: [NULL] non-existing PPS 0 referenced

@phunkyfish
Copy link
Member

I must be encoding the program property incorrectly.

@phunkyfish
Copy link
Member

phunkyfish commented May 30, 2019

In the above the program number is 880 but nprogram is 18.

However the streams appear to be under program number 303 which would mean an nProgram of 6.

Or am I reading this wrong?

@phunkyfish
Copy link
Member

Also, do you have the sRef and M3u file for the channel above?

@phunkyfish
Copy link
Member

@hudokkow could you provide a debug log for when you play a recording for this channel?

I think what is happening is that the PiD given in the live stream does not align with the PID in the stream. So this may be isolated to the provider. Without inspecting the data for the correct PID it would be difficult to supply the right one to kodi pvr.

Why it works for recordings I don’t know but the log might help with the latest logging additions.

@phunkyfish
Copy link
Member

Closing, please see #237 for solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kodi issue Issue likely in kodi and not the addon
Projects
None yet
Development

No branches or pull requests

4 participants