Ability to watch the TV stream directly without the timeshift buffer delay? (1 Viewer)

Chris Melville

Portal Member
August 2, 2016
10
0
45
Home Country
United Kingdom United Kingdom
Hi guys,

Since WMP was disabled for Windows 10, I needed a suitable replacement - and found success using Kodi as a front-end, with MediaPortal as a back-end TV server. Thank you for the work done so far on developing this software.

One thing I notice, however: when I watch live TV, it isn't actually live. It seems delayed for several seconds.

My best guess is that this is due to timeshifting. I understand that when a stream is opened, a temporary timeshift buffer file is created, allowing the viewer to pause the stream. That's all very well and good.

However it appears (and please correct me if I'm wrong), that the system first creates the timeshift buffer file, and only then serves out the stream from the "live point" - via the file? This takes some time to set up.

This is quite noticeable when watching TV timed to certain live events. A good example would be when watching the countdown to the New Year. When watching the so-called "live" TV countdown, the TV stream is delayed by up to 8 seconds. Result: neighbours launch their fireworks, while my own TV hasn't yet reached midnight.

In my book, a timeshifted 8 seconds, via a buffer file, is not actually live TV.

Please correct me if I have made any erroneous assumptions about the program's behaviour. However, could anyone tell me whether MediaPortal is capable of simply acting as a TV tuner, and serving out the stream DIRECTLY - avoiding a mandatory timeshift buffer file?

I understand that this would result in the loss of the instantaneous ability to pause the steam with zero content loss (as a timeshift buffer would have to be set up following the user pressing the pause button - taking time). However it would be nice to have the option. I'd rather have a real, live TV stream and accept the fact that I'd lose a few seconds if I decide to start timeshifting - than have timeshifting forced upon me, and never actually have a live picture.

Thanks.
 

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    My best guess is that this is due to timeshifting.
    Yes, that's probably a fair assessment.
    There is no intentional delay. However, as you've seen, it takes time to do all the file handling and client-to-server co-ordination.

    However, could anyone tell me whether MediaPortal is capable of simply acting as a TV tuner, and serving out the stream DIRECTLY - avoiding a mandatory timeshift buffer file?
    No, MediaPortal is not capable of doing that, sorry.
     

    Chris Melville

    Portal Member
    August 2, 2016
    10
    0
    45
    Home Country
    United Kingdom United Kingdom
    Yes, that's probably a fair assessment.
    There is no intentional delay. However, as you've seen, it takes time to do all the file handling and client-to-server co-ordination.


    No, MediaPortal is not capable of doing that, sorry.

    Thanks, mm1352000 - I appreciate the response.

    So, if it's not currently capable of serving out the TV stream without a timeshift buffer, could you tell me whether this is because the program architecture simply wouldn't work that way (meaning, it could never be an option); or whether it's simply because the program is currently set up to use the buffer, but if the dev team chose, they could introduce an option in the future?
     

    Edalex

    Community Plugin Dev
  • Premium Supporter
  • January 3, 2008
    2,955
    1,264
    Saratov
    Home Country
    Russian Federation Russian Federation
    I'm not sure there's an absolute live tv. My cable tv will always have delay comparing to terrestial tv since cable company could encode/remux/encrypt stream which will require some time.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    @Chris Melville
    Nothing is impossible, but certain aspects of the architectural design do make it difficult. Frankly, I don't see things ever changing due to both the difficulty and a lack of perceived benefit. To you 8 seconds is significant; with the greatest respect, to me 8 seconds is irrelevant.

    I should also say: there will always be a delay due to processing. What's in question is the magnitude of the delay. MediaPortal is only the last link in a chain from tuner hardware -> tuner driver -> low-level OS -> MS BDA framework -> DirectShow -> MediaPortal. There's almost certainly going to be bufferring at each link in the chain, so who's to say how much of the delay MediaPortal is actually responsible for.

    If it really bothers you, from the perspective of reducing the delay introduced by MediaPortal, my advice would be to investigate how you might increase the performance of the storage subsystem that you use for time-shifting. My expectation would be: the faster the storage, the smaller the delay.
    • using a NAS for time-shifting is likely to be much slower than any other option
    • a "green" or 5400 rpm HDD is likely to be slower than a 7200 rpm HDD
    • an SSD will be faster than an HDD (...though using an SSD for time-shifting will have an impact how quickly the "lifetime" of the SSD is used)
    • a RAM drive will be faster than an SSD
    Further, I recommend you check that you've configured security software appropriately. Having security software attempt to monitor or scan the time-shift files/folder will significantly impact on [at least] channel change speeds.
     

    Chris Melville

    Portal Member
    August 2, 2016
    10
    0
    45
    Home Country
    United Kingdom United Kingdom
    @Chris Melville
    Nothing is impossible, but certain aspects of the architectural design do make it difficult. Frankly, I don't see things ever changing due to both the difficulty and a lack of perceived benefit. To you 8 seconds is significant; with the greatest respect, to me 8 seconds is irrelevant.

    I should also say: there will always be a delay due to processing. What's in question is the magnitude of the delay. MediaPortal is only the last link in a chain from tuner hardware -> tuner driver -> low-level OS -> MS BDA framework -> DirectShow -> MediaPortal. There's almost certainly going to be bufferring at each link in the chain, so who's to say how much of the delay MediaPortal is actually responsible for.

    If it really bothers you, from the perspective of reducing the delay introduced by MediaPortal, my advice would be to investigate how you might increase the performance of the storage subsystem that you use for time-shifting. My expectation would be: the faster the storage, the smaller the delay.
    • using a NAS for time-shifting is likely to be much slower than any other option
    • a "green" or 5400 rpm HDD is likely to be slower than a 7200 rpm HDD
    • an SSD will be faster than an HDD (...though using an SSD for time-shifting will have an impact how quickly the "lifetime" of the SSD is used)
    • a RAM drive will be faster than an SSD
    Further, I recommend you check that you've configured security software appropriately. Having security software attempt to monitor or scan the time-shift files/folder will significantly impact on [at least] channel change speeds.

    Sure, I get all of that. BTW - I'm timeshifting to a 7200 rpm internal SATA with no security software worries.

    I also understand that since the days of an analogue signal being beamed directly from the airwaves to a CRT screen, there will always be at least some small processing delay. However 8 seconds seems quite a long time, and the timeshift factor is most likely the most significant element in the chain.

    Oh well - if you don't see it as enough of an issue to justify development time, then that's fine! I just wanted to know :)

    Thanks.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Just out of interest, have you compared KODI vs. MediaPortal [client]?
     

    Chris Melville

    Portal Member
    August 2, 2016
    10
    0
    45
    Home Country
    United Kingdom United Kingdom
    Just out of interest, have you compared KODI vs. MediaPortal [client]?

    I just tried it with the MediaPortal client. 7 seconds - and actually about the same as with Kodi, as my "8 seconds" was an estimate. Therefore no real difference.

    From a purely technical point of view, I was wondering why serving out a direct TV stream would be difficult ("certain aspects of the architectural design do make it difficult"). Common sense suggests that it would be easier than timeshifting, because timeshifting requires a whole bunch of additional steps: opening a file, starting to write the data stream to the file, working out where the "live point" is, then reading from the file and re-serving out the data stream to the network. Surely to simply serve the stream out from the hardware to the network, bypassing the buffer file altogether, would save some steps and would be easier, no?

    I'd be fascinated to understand more! Thanks.
     

    Chris Melville

    Portal Member
    August 2, 2016
    10
    0
    45
    Home Country
    United Kingdom United Kingdom
    The delay on my system is half a second.

    Really? That would certainly be "live" in anyone's book. Does that possibly suggest that the delay is not being caused by the timeshift buffer file after all, but is to do with other factors (the capture device itself, maybe?)
     

    Users who are viewing this thread

    Top Bottom