Iptv source - discontinuities on specific hardware/os (1 Viewer)

B0ycee

Portal Member
April 23, 2014
13
2
Home Country
United Kingdom United Kingdom
Hi,

I was using Mediaportal 1.16 to receive a multicast UDP stream (H264@14Mbps) from a device locally without issue. I recently upgraded the Mediaportal hardware (and with it from Windows 7 to Windows 10 and MP 1.16 to MP 1.20). Viewing the same stream now suffers discontinuities. I have tried to rule out other network elements by connecting with a crossover between the source and Mediaportal device with the same outcome. Using the older machine the stream is fine, using the newer device the stream is unwatchable due to discontinuities. I also downgraded Mediaportal TV server to 1.16 to align this, but the discontinuities remain. Running Windows 7 on the new device is not really feasible. Playback of the stream using VLC on both machines works perfectly.

Interestingly, if I increase UdpInternalBufferMultiplier in MPIPTVSource.ini substantially (from 8 to 512) I can achieve a period without discontinuties (30 seconds). Further increasing UdpInternalBufferMultiplier appears to lengthen the duration linearly. After this the playback becomes broken again. Increasing UdpInternalBufferMaxMultiplier appears to have no impact on this duration.

Any ideas? I'm guessing this is either a Windows 10 issue, or perhaps some kind of hardware/concurrency issue with Mediaportal (old CPU: dual core, new CPU: quad core). Does receiving the UDP stream into the Mediaportal TV server involve direct show filters (I realise playback does - but the discontinuities are identified before playback)?

Cheers.
 

Owlsroost

Retired Team Member
  • Premium Supporter
  • October 28, 2008
    5,540
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    Does receiving the UDP stream into the Mediaportal TV server involve direct show filters

    Yes, it does.

    Thoughts - have you checked/played around with the windows firewall/security settings?

    (I realise playback does - but the discontinuities are identified before playback)?

    Do you mean the discontinuities are showing up in TV Server preview and TsWriter log?
     

    B0ycee

    Portal Member
    April 23, 2014
    13
    2
    Home Country
    United Kingdom United Kingdom
    Hi,

    Thoughts - have you checked/played around with the windows firewall/security settings?

    Windows firewall is off. VLC on the same device also works. As I mentioned, increasing the buffer size in MPIPTVSource.ini can achieve a period without discontinuities which suggests the data is making it to the application I think?

    Do you mean the discontinuities are showing up in TV Server preview and TsWriter log?

    In the MPIPTVSource.log I see many lines similar to this:

    [Warning] MPIPTVSourceStream: FillBuffer(): discontinuity detected, PID: 2001, expected counter: 11, packet counter: 2​

    If I go to "Manual Control" in TV server configuration and click "Start Timeshift" I also see the discontinuity count go up.
     

    Owlsroost

    Retired Team Member
  • Premium Supporter
  • October 28, 2008
    5,540
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    In case it might help, attached are various dll's/filters for TV Server rebuilt with the latest version of the Live555 'streaming' library code.

    To install, stop TV Server, make backup copies of the original files, then copy the new ones into \Program Files (x86)\Team MediaPortal\MediaPortal TV Server
     

    Attachments

    • MPIPTV_live555_update_08-12-18.zip
      173.1 KB
    • TsWriter_MPFileWriter_StreamingServer_live555_update_08-12-18.zip
      349.5 KB

    B0ycee

    Portal Member
    April 23, 2014
    13
    2
    Home Country
    United Kingdom United Kingdom
    I haven't had a chance to test this yet, but I have a few questions that perhaps you/someone can answer:

    Is the latest Live555 streaming library used for each new Mediaportal release? Or is Mediaportal built against some static (earlier) version? If so how old?

    At a high level, am I correct that the MPIPTV "bundle" reads from network (IPTV channels only) and the FileWriter "bundle" writes that to disk (all sources)? At which point does the Mediaportal client 'read' the data for live TV? In the middle or from the resulting file once written? How about a RTSP stream? Does the TV server still read this from disk and transmit (after having saved source to disk)?

    My basic understanding is .ax is a direct show filter and these are usually automatically utilised by capability and merit. Are these particular ones statically referenced/used by Mediaportal? Or registered as a regular directshow filter? Could I have some other directshow filter getting used instead (perhaps Windows 10 has more/different ones)? Or could the working system have some additional filter fixing the issue? Is there a way to "see" the filters in use?

    Sorry for so many questions!
     

    Owlsroost

    Retired Team Member
  • Premium Supporter
  • October 28, 2008
    5,540
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    Is the latest Live555 streaming library used for each new Mediaportal release? Or is Mediaportal built against some static (earlier) version? If so how old?

    It's a static version.

    At a high level, am I correct that the MPIPTV "bundle" reads from network (IPTV channels only) and the FileWriter "bundle" writes that to disk (all sources)?

    Correct.

    At which point does the Mediaportal client 'read' the data for live TV? In the middle or from the resulting file once written? How about a RTSP stream? Does the TV server still read this from disk and transmit (after having saved source to disk)?

    It's always read from disk, either directly by the client (for single-seat, and for remote clients using the 'UNC paths' option), or read by TV Server and sent as an RTSP stream to remote clients. For live TV, the file is a circular 'timeshift buffer'.

    Are these particular ones statically referenced/used by Mediaportal?

    Yes.

    The reason it's DS filter based is because that's how you interface to tuner drivers, so using DS filters for IPTV keeps the interfaces the same to the rest of TV Server i.e. IPTV is handled like another 'tuner' (as far as I know).
     

    B0ycee

    Portal Member
    April 23, 2014
    13
    2
    Home Country
    United Kingdom United Kingdom
    Thanks for the quick reply!

    In the MPIPTVSource.log I see many lines similar to this:

    [Warning] MPIPTVSourceStream: FillBuffer(): discontinuity detected, PID: 2001, expected counter: 11, packet counter: 2

    This suggests the best chance is with the MPIPTV bundle update then as this is logging of the incoming data before it is passed to be written to disk? The log entries do not appear on the working system, so it is not that the FileWriter corrects them later. Or is that an invalid assumption?

    Are both required to be updated together?
     

    Owlsroost

    Retired Team Member
  • Premium Supporter
  • October 28, 2008
    5,540
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    This suggests the best chance is with the MPIPTV bundle update then as this is logging of the incoming data before it is passed to be written to disk?

    Yes, I think so - I think the log messages are generated when DVB data stream packets are passed from MPIPTVSource filter to TsWriter filter (as far as I can tell from the code).
     

    B0ycee

    Portal Member
    April 23, 2014
    13
    2
    Home Country
    United Kingdom United Kingdom
    Well, I tried both the replacements - exactly the same behaviour.

    The fact that increasing the UdpInternalBufferMultiplier value linearly increases the period of good playback (i.e with default value of 8 it is immediately broken, with 128 I get 15 seconds, at 256 I get 30 seconds without discontinuities) suggests that some data is being kept in the buffer of the MPIPTVsource and then the buffer overflows? This would be a fair bug if it always didn't work. but I'm trying to understand how changing hardware and OS has broken it.

    Is there any way to get this fixed, or am I just stuck?
     

    Users who are viewing this thread

    Top Bottom