[TV] Continue playback if timeshift buffer is full (1 Viewer)

Iwen

Portal Pro
August 14, 2007
464
32
Home Country
Germany Germany
Started on: 2014-11-10
last update: 2014-11-10


Summary
It would be nice if the server could continue the playback of the timeshift buffer when it reaches its maximum size, instead of stopping the stream and deleting the whole buffer.

Area:
TV

Description:
Hey there,

I noticed this behavior several times and it keeps bugging me. Here is the scenario:

Sometimes I hit the pause button a few minutes before a movie starts, because I have something else to do at the moment (cooking, ...). The timeshift buffer gets filled (or the actual point in time shifts more and more to the end of the buffer) as expected.
But sometimes I need more time as I initially thought and the buffer reaches its maximum size
-> the server stops the whole stream, playbacks stops also.
So here I loose everything, e.g. the 5minutes of news/commercials right before the movie (unimportant) and the first 10minutes of the movie itself (very important).

My Samsung TV which can timeshift on a simple USB-Device is a little bit smarter here. When the buffer is filled it just continues to playback TV. In that case I don't loose the whole buffer but only some part of it (e.g. the mentioned 5min unimportant news/commercials).

I know the TVE part is in code freeze. Just wanted to share the idea. Maybe some other users would like that feature/improvement as well and we have some chance to see this in TVE3.5. What do you think? :) .
 

Vasilich

Portal Pro
August 30, 2009
3,394
1,170
Germany, Mayence
Home Country
Russian Federation Russian Federation
acc. to our Wiki http://wiki.team-mediaportal.com/1_...ion/08_Timeshifting#The_logic_of_timeshifting the behavior is correct. My opinion:
1. the thread starter should increase maximum number of timeshift files and/or size of timeshift files.
2. I agree with author - it is a bit stupid if we just stop streaming/writing to disk after reaching max amount of files. Instead we should continue writing with reusing oldest file, as we do with normal timeshift with "Minimum files". Sure it needs to be checked whether it is possible to use same logic (we need to tell somehow the earliest reachable timestamp to TSReader in that case - @regeszter can you check it?)
 

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    1. the thread starter should increase maximum number of timeshift files and/or size of timeshift files.
    Agree.

    2. I agree with author - it is a bit stupid if we just stop streaming/writing to disk after reaching max amount of files. Instead we should continue writing with reusing oldest file, as we do with normal timeshift with "Minimum files".
    Disagree. Such a solution would be extremely complex... and I don't know if you can even do that while MP has paused. Surely TsReader is holding the oldest file open, and therefore TsWriter can't delete it???

    In general...
    The part of the buffer that people want to keep changes from person to person and situation to situation. It is simply not possible to always "win".
    I actually thought that TsWriter started dropping data when it ran out of buffer space. To me that seems the most sensible thing to do, because it means that we keep the largest chunk of continuous stream intact. Whether that chunk includes what the user wants or not will vary on a case by case basis. Most critical is that with this approach the user can always increase the buffer size to make it more likely that the buffer contains what they wanted to see.
     

    regeszter

    Retired Team Member
  • Premium Supporter
  • October 29, 2005
    5,335
    4,954
    Home Country
    Hungary Hungary
    OK, I see. I have never reached the maximum TS file so I did not know this behaviour. I think the main reason for this if the paused point is overwrote by tswriter, the tsreader can not resume the playing.
     

    regeszter

    Retired Team Member
  • Premium Supporter
  • October 29, 2005
    5,335
    4,954
    Home Country
    Hungary Hungary
    Try to understad the porblem:

    1. You watching the TV
    2. Pasued it.
    3. The maximum TS file is reached.
    4. What can we do?
      1. Reuse the file where the stream was paused. It means you will miss the midle of the show.
      2. Stop the tswriter and archive the ts file for later. It means you can watch the show if the puffer was enough large.
     

    Iwen

    Portal Pro
    August 14, 2007
    464
    32
    Home Country
    Germany Germany
    OK, I see your points. But nevertheless it's not a nice behavior of MP to stop the stream just because I ran out of bufferspace. Increasing the buffer would certainly help but it's not a solution to the overall problem. Especially if you watch HD channels and you want to use a ramdisk you are pretty limited here.
    As I said, in my opinion Samsung deals much better with this scenario. But if it's too difficult or not possible with MP thats alright. Just wanted to point on that case :) .

    @regeszter
    Why not forcing the server to act as if the user pressed play after hitting the maximum buffer size?
    It would be the same as if I paused a show until a few moments before hitting buffer end and then continue watching intentionally.

    I'm not aware how it is implemented, so that was just my imagination.
     

    Vasilich

    Portal Pro
    August 30, 2009
    3,394
    1,170
    Germany, Mayence
    Home Country
    Russian Federation Russian Federation
    Reuse the file where the stream was paused. It means you will miss the midle of the show.
    not the middle - if we reuse the file TSReader was on (if it is anyhow possible) - then you will miss the beginning, but will get the rest of the show. Surely if we wait long enough, then we can miss complete show (e.g. in case when (max files * filesize) < show length and we wait until live point is behind the show).
    Not sure now if this is that what we really want :oops:
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    But nevertheless it's not a nice behavior of MP to stop the stream just because I ran out of bufferspace.
    Agree.
    Is this reproducible? Logs?
    I've never known MP to do this. Like I said previously, my experience is that TsWriter just starts dropping data when it runs out of buffer space... so the buffer stops growing, but you should still be able to unpause and view the content of the buffer.
     

    Vasilich

    Portal Pro
    August 30, 2009
    3,394
    1,170
    Germany, Mayence
    Home Country
    Russian Federation Russian Federation
    I've never known MP to do this.
    sorry, i have misinterpret the info in our wiki, assumnig that TSWriter stops completely. The current behavior (drop data after reaching MaxFiles and continue to write data from livepoint at the time resumed) IMHO is optimal.
    @Iwen can you explain what does your Samsung in the case of max timeshift has been passed?
     

    Users who are viewing this thread

    Top Bottom