Speeding up channel change (1 Viewer)

matejdro

Portal Pro
May 28, 2010
361
16
Home Country
Slovenia Slovenia
Is there anything I can do to speed up channel switching?

For me it takes 2-3 seconds on every channel regardless of channel type (SD or HD). It does not sound really bad, but it is not really good either, especially considering that shitty STB can switch pretty much instantly.

I'm using IPTV so there are no external factors involved like TV card delay, it must be something in software. Or is maybe this just how MP handles IPTV and I can't do anything about it (apart from developing it myself)?

Included logs of me turning on TV and switching channels a bit. Maybe someone can figure out what is going on.
 

Vasilich

Portal Pro
August 30, 2009
3,394
1,170
Germany, Mayence
Home Country
Russian Federation Russian Federation
AFAIK there were some changes regarding IPTV channel changing speed in MP1.5. Have you had a chance to try it? according to your specs you are still on MP1.3.
 

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    According to your log files, the slowest change from the server perspective is the first one - takes about 4 seconds. For that you can possibly enable preloading.
    [2013-10-07 12:32:23,167] [Log ] [MPMain ] [INFO ] - TVHome.ViewChannelAndCheck(): View channel=POP
    ...
    [2013-10-07 12:32:27,446] [Log ] [MPMain ] [INFO ] - succeeded:confused:ucceeded TvControl.VirtualCard
    ...
    [2013-10-07 12:32:28,798] [Log ] [MPMain ] [WARN ] - TVHome.OnClicked(): Total Time - 5633 ms

    [2013-10-07 12:32:30,929] [Log ] [MPMain ] [INFO ] - TVHome:OnNextChannel()
    ...
    [2013-10-07 12:32:31,595] [Log ] [MPMain ] [INFO ] - succeeded:confused:ucceeded TvControl.VirtualCard
    ...
    [2013-10-07 12:32:33,022] [Log ] [14 ] [DEBUG] - TvHome.StopRenderBlackImage()

    After the first channel, changes seem to be around 650 ms for the server side, and 1.5 seconds for the client side.

    I can think of some small improvements for the server side which will be in TVE 3.5... but the biggest issue seems to be the client side.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    My guess is codec takes a lot of time to load or something?
    Yes, codecs have an impact... but so does TsReader.

    07-10-2013 12:32:28.839 [ fe40048] [1e1c] Run() - Elapsed time from pause to Audio/Video ( total zapping time ) : 1298 mS

    07-10-2013 12:32:32.340 [ fe40048] [1e1c] Run() - Elapsed time from pause to Audio/Video ( total zapping time ) : 1368 mS

    07-10-2013 12:32:35.404 [ fe40048] [1e1c] Run() - Elapsed time from pause to Audio/Video ( total zapping time ) : 1699 mS

    This might be improved with an SSD or RAM drive for timeshifting.
     

    matejdro

    Portal Pro
    May 28, 2010
    361
    16
    Home Country
    Slovenia Slovenia
    So TsReader is taking 1300ms each time to start reading file?

    This was already tested on SSD. Now I did quick test with RAMDisk and those times appear about the same.
     

    Owlsroost

    Retired Team Member
  • Premium Supporter
  • October 28, 2008
    5,540
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    So TsReader is taking 1300ms each time to start reading file?

    No - the 'total zapping time' includes all the TV server channel change time and client/TsReader processing time -

    it's measured from this point (using the last zap in your TsReader.log as an example):

    Code:
    07-10-2013 12:33:04.814 [ fe40048] [2338] CTsReaderFilter::Pause() - IsTimeShifting = 1 - state = 2
    07-10-2013 12:33:04.814 [ fe40048] [2338] CTsReaderFilter::Pause() - END - state = 1
    07-10-2013 12:33:04.814 [ fe40048] [2338] OnZapping 80
    (playback filter graph transitions to 'paused' before channel change is requested at TV server)

    ....to....

    Code:
    07-10-2013 12:33:06.094 [ fe40048] [1e1c] CTsReaderFilter::Run(4836.43) state 1 seeking 0
    07-10-2013 12:33:06.094 [ fe40048] [1e1c] Run() - Elapsed time from pause to Audio/Video ( total zapping time ) : 1280 mS
    07-10-2013 12:33:06.094 [ fe40048] [1e1c] CTsReaderFilter::Run(4836.43) state 2 -->done
    (graph transitions to 'run')

    In between those points TsReader is waiting for sufficient data from the new channel to arrive so it can work out what the new video and audio formats are (you might be switching from SD MPEG2 to HD H.264, for example, which would require a partial filter graph rebuild) - this can take some time since the necessary info might only appear in the stream once per second or longer (H.264 streams are usually worse than MPEG2 for this). It then has to make sure enough data is buffered so the decoding restarts cleanly e.g. the decode filters can hang or crash if this isn't handled properly.
     
    Last edited:

    CSMR

    Portal Member
    March 26, 2011
    32
    2
    Home Country
    United Kingdom United Kingdom
    Is anyone getting fast channel changes with mediaportal, comparable to what you expect from a TV?
    Is slow channel switching an issue that is fixable by upgrading hardware or changing software settings? Or is an architectural problem, i.e. does mediaportal go about this in a different way from TVs, identifying the codec every time you select a new channel rather than checking once and storing the information?
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hello CSMR

    Is anyone getting fast channel changes with mediaportal, comparable to what you expect from a TV?
    I am.

    Is slow channel switching an issue that is fixable by upgrading hardware or changing software settings?
    Yes, slow channel changing can be improved by both of those things.
    I suggest you define what "slow" means for you, and post log files so people can assess what is going on.

    Or is an architectural problem, i.e. does mediaportal go about this in a different way from TVs, identifying the codec every time you select a new channel rather than checking once and storing the information?
    I can't comment about how TVs do things... and also, the slow changing may have absolutely nothing to do with codecs. So, as above - please post log files so we can tell you what is causing things to be slow. It could be something as simple as an anti-virus/spyware/adware program or an over-full HDD.

    mm
     

    Users who are viewing this thread

    Top Bottom