Slow starting and stopping TV-channels IPTV (1 Viewer)

GuiltyNL

MP Donator
  • Premium Supporter
  • January 26, 2013
    101
    11
    Home Country
    Netherlands Netherlands
    Finally, after testing on my laptop via Wifi I was able to give Kodi a kick on our Intel NUC and activate Mediaportal.

    Strange enough it takes 6 to 11 seconds to tune a channelc(RTSP stream to an Octopus Net). Also stopping a channel is slow and delayed (about 5 seconds to full stop a channel).

    I checked the Octopus Net interface and it starts tuning after about 4 to 6 seconds after choosing a channel in MePo. When I press stop, I see the stream stop in the tuner in a second, but it takes another 3 to 4 seconds to full stop in MePo.

    I'm running Windows 10 on that machine. And I've disabled Realtime Scanning in Windows Defender to be sure.

    Starting and stopping a previously recorded recording seems to behave normally. So that would rule out codes issues, doesn't it?

    Where to look? I'm running 1.16 PR and @mm1352000 helped me so far very good. But here I'm a bit confused.

    To test, I have installed VLC player on the same machine and when I start the m3u list MePo is using, it will tune FTA channels in about a second and Encrypted channels in about 3 seconds. Also stopping the stream is instant.

    I have attached full logs.
     
    Last edited:

    GuiltyNL

    MP Donator
  • Premium Supporter
  • January 26, 2013
    101
    11
    Home Country
    Netherlands Netherlands
    Reinstalled Windows 10, still slow. Really don't understand why.

    Om my laptop it is fast. With the same software setup.

    Who can help?
     

    GuiltyNL

    MP Donator
  • Premium Supporter
  • January 26, 2013
    101
    11
    Home Country
    Netherlands Netherlands
    Ok I have zapped a few times and after that I've exported the logs.

    From channel to channel it take around 10 seconds, maybe longer.

    These logs are after the reset of my Windows 10 client.
     

    GuiltyNL

    MP Donator
  • Premium Supporter
  • January 26, 2013
    101
    11
    Home Country
    Netherlands Netherlands
    It is driving me insanse. I can't find it. Hours and hours of trying and nothing.

    I just had 14 seconds of tuning time before any video and audio came up. After pressing stop, it takes 6 seconds to finally stop.

    BTW, when I change the user of TV Service to an admin user. TV Service and ffmpeg get high cpu usage. This is also the case on my laptop when I tried this. And 'Network Service' is not enough to be able to write recordings to a network share with guest access (don't ask me why).
     
    Last edited:

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,577
    8,222
    Home Country
    New Zealand New Zealand
    Country flag
    Hello mate

    I'm sorry I've had a really busy week and haven't had any opportunity to look into your issue yet. Please bear with me. I'll try to find some time to investigate within the next 24 hours.
     

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,577
    8,222
    Home Country
    New Zealand New Zealand
    Country flag
    It is driving me insanse. I can't find it. Hours and hours of trying and nothing.
    Mmmmm, it's very easy to waste a lot of time if you don't proceed logically with the aid of the log files.

    From channel to channel it take around 10 seconds, maybe longer.
    Lets take the last change in the log files as an example.

    End-to-end timing seems to be ~7.5 seconds:
    [2017-02-25 15:14:23,110] [Log ] [MPMain ] [INFO ] - TVHome.ViewChannelAndCheck(): View channel=Disney Channel HD
    ...
    [2017-02-25 15:14:30,553] [Log ] [25 ] [DEBUG] - TvHome.OnVideoReceived() 3

    Of that ~7.5 seconds, ~4 seconds is spent tuning on the server side:
    [2017-02-25 15:14:26,939] [Log ] [MPMain ] [INFO ] - succeeded:confused:ucceeded TvControl.VirtualCard

    Within that ~4 seconds, most of the time (~3.5 seconds) is loading and tuning the IPTV source:
    [2017-02-25 15:14:23,142] [Log ] [18 ] [INFO ] - dvbip: tune: Running graph for channel TvLibrary.Implementations.DVB.TvDvbChannel
    [2017-02-25 15:14:23,143] [Log ] [18 ] [INFO ] - dvbip: tune: SubChannel 0
    [2017-02-25 15:14:23,490] [Log ] [18 ] [INFO ] - subch:0 OnGraphStopped
    [2017-02-25 15:14:23,492] [Log ] [18 ] [INFO ] - subch:0 OnGraphStart
    [2017-02-25 15:14:24,044] [Log ] [18 ] [INFO ] - dvbip:Add MediaPortal IPTV Source Filter
    [2017-02-25 15:14:25,802] [Log ] [18 ] [INFO ] - dvb: Render [source]->[inftee]
    [2017-02-25 15:14:25,874] [Log ] [18 ] [INFO ] - dvb: RunGraph
    [2017-02-25 15:14:26,448] [Log ] [18 ] [INFO ] - subch:0 OnGraphStarted

    You can probably save a second or two by disabling the IPTV plugins that you don't use.
    Explanation... :)
    The standard IPTV source (MPIPTVSource.ax) comes with 5 plugins:
    • file (MPIPTV_FILE.dll)
    • HTTP (MPIPTV_HTTP.dll)
    • RTP (MPIPTV_RTP.dll) - depends on the UDP plugin
    • RTSP (MPIPTV_RTSP.dll) - depends on the UDP plugin
    • UDP (MPIPTV_UDP.dll)
    For SAT>IP support you need the RTSP plugin, and the RTSP plugin needs the UDP plugin. So, you could disable the file, HTTP and RTP plugins.
    To disable a plugin, stop the TV service, then simply:
    • rename the corresponding DLL in the TV Server install folder (default c:\Program Files (x86)\Team MediaPortal\MediaPortal TV Server) so the name is no longer "MPIPTV_...dll", OR...
    • move the corresponding DLL to any folder outside the TV Server install folder
    P.S. In your log file I see that the IPTV source is loading 6 plugins instead of 5 because you have "MPIPTV_UDP - kopie.dll". If that plugin/file is a backup, you should definitely disable it. It's slowing the IPTV source loading/tuning.

    The other ~3.5 seconds [out of 7.5 seconds] spent on the client side may be harder to optimise (...or at least, the delay isn't clearly shown in the log files). However, one very obvious thing you haven't done that should always be done before seriously attempting to use MediaPortal is to configure codec settings. Using default/automatic settings can be slow and error prone. In short: it's asking for trouble; a big mistake.

    In this case, the TV codec settings are most relevant. The current default/automatic choice is Microsoft DTV-DVD and/or MPEG audio decoder (known cause of many problems!!!):
    [2017-02-25 15:14:07,874] [Log ] [MPMain ] [DEBUG] - Check graph connections for: MPEG Audio Decoder
    ...
    [2017-02-25 15:14:30,378] [Log ] [MPMain ] [DEBUG] - Check graph connections for: Enhanced Video Renderer
    [2017-02-25 15:14:30,379] [Log ] [MPMain ] [DEBUG] - Check graph connections for: Default DirectSound Device
    [2017-02-25 15:14:30,379] [Log ] [MPMain ] [DEBUG] - Check graph connections for: Microsoft DTV-DVD Audio Decoder
    [2017-02-25 15:14:30,379] [Log ] [MPMain ] [DEBUG] - Check graph connections for: Microsoft DTV-DVD Video Decoder
    [2017-02-25 15:14:30,379] [Log ] [MPMain ] [DEBUG] - Check graph connections for: TsReader

    I'd recommend using the LAV codecs instead. You've already installed them, so it's only a matter of telling MP to use them.

    I guess this might save another second, bringing total savings to three seconds.

    Finally, it's really important to make sure you've configured any security software (Windows Defender etc.) properly. Security software can really slow down MP and/or TV Server. I'm not sure if disabling real-time scanning is sufficient config for Windows Defender. It might be better to configure Defender to trust MP and TV Server, and exclude the time-shifting and/or recording folders from scanning.
     

    GuiltyNL

    MP Donator
  • Premium Supporter
  • January 26, 2013
    101
    11
    Home Country
    Netherlands Netherlands
    Again, thanks for your help and effords. To be sure I reinstalled Windows again, but now not with the system restore functionality, but by installing it from scratch from a USB drive and removed the old partition. (It didn't solve anything though, only that by reinstalling my DVD support in Windows Media Player is gone and I had two frustrated kids waiting for dad to start the DVD... Ended up by installing VLC.)

    P.S. In your log file I see that the IPTV source is loading 6 plugins instead of 5 because you have "MPIPTV_UDP - kopie.dll". If that plugin/file is a backup, you should definitely disable it. It's slowing the IPTV source loading/tuning.
    Yes, that was a copy, did't realize it would load *.dll ;) I'll remove it. Also I'll try to disable the other two. Still doesn't explain it is fast on my laptop. As my laptop loads the same DLL's ;)

    Using default/automatic settings can be slow and error prone. In short: it's asking for trouble; a big mistake.
    I installed LAV by default as I always used it.
    The current default/automatic choice is Microsoft DTV-DVD and/or MPEG audio decoder (known cause of many problems!!!):
    Are you telling me the log files tell you that it fires up the Microsoft decoders? As in Mediaportal Config, LAV is selected and active.

    I'd recommend using the LAV codecs instead. You've already installed them, so it's only a matter of telling MP to use them.
    I already did, so I'm confused.

    Finally, it's really important to make sure you've configured any security software (Windows Defender etc.) properly. Security software can really slow down MP and/or TV Server. I'm not sure if disabling real-time scanning is sufficient config for Windows Defender. It might be better to configure Defender to trust MP and TV Server, and exclude the time-shifting and/or recording folders from scanning.
    I excluded the two MP folders, I excluded the two processes AND I disabled realtime scanning. No effect. I did not exclude the networking folder for the recordings though.

    However, on my laptop I did not exclude anything, Defender is running in default mode and seems not to slow down anything.
     

    GuiltyNL

    MP Donator
  • Premium Supporter
  • January 26, 2013
    101
    11
    Home Country
    Netherlands Netherlands
    IMG_20170226_140941.jpg
    IMG_20170226_140848.jpg



    Hmmmmm.... What the F... :p
     

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,577
    8,222
    Home Country
    New Zealand New Zealand
    Country flag
    To be sure I reinstalled Windows again...
    There's no need to do this over and over again. It won't help. ;)

    Still doesn't explain it is fast on my laptop. As my laptop loads the same DLL's ;)
    I can't possibly comment about your laptop when I have no log files from it. Could be vastly different specs, software etc. ;)
    ...but let's sort out the things I did manage to see first.

    I installed LAV by default as I always used it.
    Installing is not enough. You must configure MP to use 'em too, otherwise it can have no effect.

    I already did, so I'm confused.
    As above. I can see you installed LAV. You even configured MP to use LAV for videos and Blu-Rays... but you hadn't configured your TV codecs at the time you provided the latest log files. ;)

    I excluded...
    Okay. I'm completely unfamiliar with Defender. If you're confident you've configured it properly then I have to take your word for it. Don't forget we're dealing with a network-attached tuner here though, so maybe network configuration is required too. Like I say: I don't know Defender. I'm just suggesting...

    Hmmmmm.... What the F... :p
    Didn't believe me, huh? :D

    Don't be fooled by what you saw in the first screenshot.
    When you first install MP, there are no codec settings. Zero. No defaults. Absolutely nothing. So MP could be using any codecs, even if you have LAV installed.
    When you first go to look at the codec settings in MP Config (as per the first screenshot), then MP Config will show the LAV codecs selected as defaults if they're installed. Those settings don't actually exist unless and until you click OK to save.

    So in other words: MP has no default codec settings, but MP Config defaults are LAV.

    I know it's confusing. Please just take my word for it.
     

    GuiltyNL

    MP Donator
  • Premium Supporter
  • January 26, 2013
    101
    11
    Home Country
    Netherlands Netherlands
    As above. I can see you installed LAV. You even configured MP to use LAV for videos and Blu-Rays... but you hadn't configured your TV codecs at the time you provided the latest log files.
    I made a photo of the TV part showing LAV after that I started TV and it didn't use LAV.

    What I did now is change everything to the Microsoft Decoder in the TV tab, press ok, open the config again and moved it back to LAV, pressed OK again, started Live TV and now it uses LAV.

    Fast, but still lagging. The strangest lag is after pressing STOP, it takes 5 seconds to top the stream, first it continues to play for 2 seconds, then it will stalls at one frame for 3 seconds and finally it stops.
     

    Users who are viewing this thread

    Similar threads

    P.S. - Strangely, the TV Server my single seat setup (1.27 on a modest machine running Windows 10 Pro x64) is working from my office machine MP client. Same exact network, firewall, Defender settings. It's a slightly older version of Win 10 though - I haven't updated to 20Hx on it yet. Maybe I shouldn't (or maybe I should image it...
    P.S. - Strangely, the TV Server my single seat setup (1.27 on a modest machine running Windows 10 Pro x64) is working from my...
    Let me start by asking if anyone has TV Server running PROPERLY on a Windows 10 machine, and if so are you using RTSP or UNC share...
    Replies
    9
    Views
    470
    We'll, again I have posted a problem then found the solution myself :whistle: I incorrectly used "Multi seat setup: use UNC paths" when I was setting up initially and having some trouble with paths. I had clicked help for that setting before I tried using it, but many of the help links in the config utility are broken. Today I...
    We'll, again I have posted a problem then found the solution myself :whistle: I incorrectly used "Multi seat setup: use UNC paths"...
    I've been a MP1 user for a very long time. I had been using Argus for OTA ATSC recording and viewing which has been flawless...
    Replies
    1
    Views
    2K
    Thank you for performing this test, and confirming @joecrow 's suspicion as to the cause of the problem. In principle the same problem exists with other EPG sources, such as the broadcast EPG that I use with DVB-T/T2. When a programme first appears in the EPG (7 days ahead of its broadcast time), some programmes have a generic...
    Thank you for performing this test, and confirming @joecrow 's suspicion as to the cause of the problem. In principle the same...
    TV Server 1.25. Windows 10. This has been an issue for many years, if not since inception, and I hoped it would be resolved...
    Replies
    10
    Views
    1K
    Just wanted to remind that this really would be an big improvement. ;)
    Just wanted to remind that this really would be an big improvement. ;)
    Started on: 2020-03-22 last update: 2020-03-22 Summary: Add a checkbox for adding IPTV channels without checking signal level and...
    Replies
    3
    Views
    1K
    I'm US Eastern (-5 to -4 with DST). I also don't sleep normally, though, so when I'm up is anyone's guess. I got it to build a setup and install on my laptop. Now I can test skin stuff and really get my hands dirty. Nereus is gorgeous, but definitely not made for a mouse or touch screen. I've got some suggestions for it, but I'll put...
    I'm US Eastern (-5 to -4 with DST). I also don't sleep normally, though, so when I'm up is anyone's guess. I got it to build a...
    Okay, so I've spent the past day and a half on the wiki and forums. I've forked MediaPortal/MediaPortal-2, downloaded a ton of...
    Replies
    27
    Views
    1K
    Top Bottom