Slow starting and stopping TV-channels IPTV

Discussion in 'Television (MyTV frontend and TV-Server)' started by GuiltyNL, February 23, 2017.

  1. GuiltyNL
    • Premium Supporter

    GuiltyNL MP Donator

    Joined:
    January 26, 2013
    Messages:
    101
    Likes Received:
    7
    Gender:
    Male
    Ratings:
    +11 / 2
    Home Country:
    Netherlands Netherlands
    Show System Specs
    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: February 23, 2017
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. GuiltyNL
    • Premium Supporter

    GuiltyNL MP Donator

    Joined:
    January 26, 2013
    Messages:
    101
    Likes Received:
    7
    Gender:
    Male
    Ratings:
    +11 / 2
    Home Country:
    Netherlands Netherlands
    Show System Specs
    Reinstalled Windows 10, still slow. Really don't understand why.

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

    Who can help?
     
  4. GuiltyNL
    • Premium Supporter

    GuiltyNL MP Donator

    Joined:
    January 26, 2013
    Messages:
    101
    Likes Received:
    7
    Gender:
    Male
    Ratings:
    +11 / 2
    Home Country:
    Netherlands Netherlands
    Show System Specs
    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.
     
  5. GuiltyNL
    • Premium Supporter

    GuiltyNL MP Donator

    Joined:
    January 26, 2013
    Messages:
    101
    Likes Received:
    7
    Gender:
    Male
    Ratings:
    +11 / 2
    Home Country:
    Netherlands Netherlands
    Show System Specs
    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: February 25, 2017
  6. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,527
    Likes Received:
    4,738
    Ratings:
    +8,205 / 17
    Home Country:
    New Zealand New Zealand
    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.
     
    • Like Like x 1
  7. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,527
    Likes Received:
    4,738
    Ratings:
    +8,205 / 17
    Home Country:
    New Zealand New Zealand
    Mmmmm, it's very easy to waste a lot of time if you don't proceed logically with the aid of the log files.

    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.
     
    • Great Idea! Great Idea! x 1
  8. GuiltyNL
    • Premium Supporter

    GuiltyNL MP Donator

    Joined:
    January 26, 2013
    Messages:
    101
    Likes Received:
    7
    Gender:
    Male
    Ratings:
    +11 / 2
    Home Country:
    Netherlands Netherlands
    Show System Specs
    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.)

    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 ;)

    I installed LAV by default as I always used it.
    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 already did, so I'm confused.

    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.
     
  9. GuiltyNL
    • Premium Supporter

    GuiltyNL MP Donator

    Joined:
    January 26, 2013
    Messages:
    101
    Likes Received:
    7
    Gender:
    Male
    Ratings:
    +11 / 2
    Home Country:
    Netherlands Netherlands
    Show System Specs
    IMG_20170226_140941.jpg IMG_20170226_140848.jpg


    Hmmmmm.... What the F... :p
     
  10. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,527
    Likes Received:
    4,738
    Ratings:
    +8,205 / 17
    Home Country:
    New Zealand New Zealand
    There's no need to do this over and over again. It won't help. ;)

    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.

    Installing is not enough. You must configure MP to use 'em too, otherwise it can have no effect.

    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. ;)

    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...

    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.
     
    • Agree Agree x 1
  11. GuiltyNL
    • Premium Supporter

    GuiltyNL MP Donator

    Joined:
    January 26, 2013
    Messages:
    101
    Likes Received:
    7
    Gender:
    Male
    Ratings:
    +11 / 2
    Home Country:
    Netherlands Netherlands
    Show System Specs
    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.
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!