[Rejected] Skip to end on live recording sometimes stops playback (1 Viewer)

riksmith

Portal Pro
April 18, 2009
1,856
322
Home Country
Netherlands Netherlands
When i skip to the end on a live recording sometimes playback stops. Mostly this happens on HD recordings.

For tv there is a 3 second margin when skipping to the end but i guess sometimes this is too small. For normal video there is a 5 second margin.

I applied the 5 second margin to tv playback and now this has not happened.

Not sure this is the right solution, perhaps there is a problem lying deeper than this. Still decided to post a patch.
 

Attachments

  • Skip recording to end 1.patch
    30.7 KB

elliottmc

Retired Team Member
  • Premium Supporter
  • August 7, 2005
    14,927
    6,061
    Cardiff, UK
    Home Country
    United Kingdom United Kingdom
    When i skip to the end on a live recording sometimes playback stops. Mostly this happens on HD recordings.

    For tv there is a 3 second margin when skipping to the end but i guess sometimes this is too small. For normal video there is a 5 second margin.

    I applied the 5 second margin to tv playback and now this has not happened.

    Not sure this is the right solution, perhaps there is a problem lying deeper than this. Still decided to post a patch.

    Hi,

    Does this still happen on latest SVN (on server and client) ? Can you please check (and provide logs) before we consider this patch?

    Best wishes,

    Mark
     

    riksmith

    Portal Pro
    April 18, 2009
    1,856
    322
    Home Country
    Netherlands Netherlands
    I installed the latest public SVN build ( i hope you meant that one). The answer is yes, logs attached.

    Also tried latest trunk, same result.
     

    Seidelin

    Retired Team Member
  • Premium Supporter
  • August 14, 2006
    1,755
    652
    Kgs. Lyngby
    Home Country
    Denmark Denmark
    Looking at the logs, this seems the interesting bit:



    03-02-2010 19:16:12.493 [1614]CTsReaderFilter:: Seek-> 227.199997/230.199997
    03-02-2010 19:16:12.493 [1614]seek to 227.199997 filepos:16f45d90 pid:30
    03-02-2010 19:16:12.496 [1614] stop seek: 227.209122 at 16f090d1 - target: 227.199997, diff: 0.009125
    03-02-2010 19:16:12.497 [1278]aud:OnThreadStartPlay(227.200000) 1.00
    03-02-2010 19:16:12.547 [1278] H.264 I-FRAME found 229.489000
    03-02-2010 19:16:12.600 [1cac]vid:OnThreadStartPlay(227.200000) 1.00 0
    03-02-2010 19:16:12.602 [1278]Audio Samples : 14, First : 227.407, Last : 229.783
    03-02-2010 19:16:12.603 [1278]Video Samples : 73, First : 229.489, Last : 230.989 GOP start : 229.489
    03-02-2010 19:16:12.605 [1614]CTsReaderFilter::--SeekStart()-- No new seek 227.199997 ( Abs 227.199997 / 230.200317 ) - Stream compensated: 0, OnZap: 0, Force 0, Media changing: 0
    03-02-2010 19:16:12.605 [1278]Compensation : ( Rnd : 0 mS ) Audio pts ahead Video Pts ( Recover skipping Audio ) ....
    03-02-2010 19:16:12.606 [1614]CTsReaderFilter::--SeekStart()-- No new seek 227.199997 ( Abs 227.199997 / 230.200317 ) - Stream compensated: 0, OnZap: 0, Force 0, Media changing: 0
    03-02-2010 19:16:12.607 [1278]aud:Compensation:2.289, Clock on start 0.000 m_rtStart:227200
    03-02-2010 19:16:12.609 [1278]aud:pDVBSubtitleFilter->SetTimeCompensation
    03-02-2010 19:16:12.609 [1614]CTsReaderFilter::Run(1209.80) state 1 seeking 0
    03-02-2010 19:16:12.609 [1614]CTsReaderFilter::Run(1209.80) state 2 -->done
    03-02-2010 19:16:12.615 [1278]aud:set discontinuity
    03-02-2010 19:16:12.615 [1278]Aud/Ref : 229.615, Late Compensated = 0.126 ( 0.126 A/V buffers=02/73), Clk : 0.000000, State 2
    03-02-2010 19:16:12.621 [1278]Aud/Ref : 229.783, Late Compensated = 0.294 ( 0.278 A/V buffers=01/73), Clk : 0.016000, State 2
    03-02-2010 19:16:12.627 [1cac]vid:set discontinuity
    03-02-2010 19:16:12.627 [1cac]Vid/Ref : 229.489, Late I-frame(00), Compensated = 0.000 ( -0.016 A/V buffers=00/81), Clk : 0.016000, State 2
    03-02-2010 19:16:12.632 [1cac]Vid/Ref : 229.509, Late ?-frame(00), Compensated = 0.020 ( -0.012 A/V buffers=00/82), Clk : 0.032000, State 2
    03-02-2010 19:16:12.633 [1cac]Vid/Ref : 229.649, Late ?-frame(00), Compensated = 0.160 ( 0.128 A/V buffers=00/82), Clk : 0.032000, State 2
    03-02-2010 19:16:12.634 [1cac]Vid/Ref : 229.669, Late ?-frame(00), Compensated = 0.180 ( 0.148 A/V buffers=01/82), Clk : 0.032000, State 2
    03-02-2010 19:16:12.635 [1cac]Vid/Ref : 229.569, Late ?-frame(00), Compensated = 0.080 ( 0.063 A/V buffers=00/81), Clk : 0.016998, State 2
    03-02-2010 19:16:12.636 [1cac]Vid/Ref : 229.589, Late ?-frame(00), Compensated = 0.100 ( 0.083 A/V buffers=00/80), Clk : 0.016998, State 2
    03-02-2010 19:16:12.637 [1cac]Vid/Ref : 229.529, Late ?-frame(00), Compensated = 0.040 ( 0.023 A/V buffers=00/79), Clk : 0.016998, State 2
    03-02-2010 19:16:12.638 [1cac]Vid/Ref : 229.549, Late ?-frame(00), Compensated = 0.060 ( 0.043 A/V buffers=00/78), Clk : 0.016998, State 2
    03-02-2010 19:16:12.639 [1278]Aud/Ref : 229.975, Late Compensated = 0.486 ( 0.469 A/V buffers=01/81), Clk : 0.016998, State 2
    03-02-2010 19:16:12.648 [1cac]Vid/Ref : 229.609, Late ?-frame(00), Compensated = 0.120 ( 0.088 A/V buffers=00/85), Clk : 0.031998, State 2
    03-02-2010 19:16:12.651 [1278]Aud/Ref : 230.167, Late Compensated = 0.678 ( 0.646 A/V buffers=01/85), Clk : 0.031998, State 2
    03-02-2010 19:16:12.680 [1cac]Vid/Ref : 229.629, Late ?-frame(00), Compensated = 0.140 ( 0.069 A/V buffers=00/84), Clk : 0.070987, State 2
    03-02-2010 19:16:12.697 [1cac]Vid/Ref : 229.809, Late ?-frame(00), Compensated = 0.320 ( 0.229 A/V buffers=00/92), Clk : 0.090982, State 2
    03-02-2010 19:16:12.699 [1278]Aud/Ref : 230.335, Late Compensated = 0.846 ( 0.755 A/V buffers=01/92), Clk : 0.090982, State 2
    03-02-2010 19:16:12.701 [1278]FileReader::Read() read to less bytes
    03-02-2010 19:16:12.708 [1cac]Vid/Ref : 229.829, Late ?-frame(00), Compensated = 0.340 ( 0.249 A/V buffers=00/94), Clk : 0.090982, State 2
    03-02-2010 19:16:12.710 [1cac]Vid/Ref : 229.729, Late ?-frame(00), Compensated = 0.240 ( 0.133 A/V buffers=00/93), Clk : 0.106982, State 2
    03-02-2010 19:16:12.712 [1278]FileReader::Read() read to less bytes
    03-02-2010 19:16:12.712 [1278]demux:endoffile

    The trouble seems to be caused by (too) few I-frames in the stream, which causes the end of file to be reached. The only side-effect of the patch is that you will always be 2 more seconds from live point than current version, which should not be considered a real problem in my opinion, when compared to the bug that is solved. Patch got my vote.
     

    riksmith

    Portal Pro
    April 18, 2009
    1,856
    322
    Home Country
    Netherlands Netherlands
    Perhaps the solution is not the 5 seconds, but perhaps the skip logic should take the i-frames into account. But that's not my area of expertise...
     

    Seidelin

    Retired Team Member
  • Premium Supporter
  • August 14, 2006
    1,755
    652
    Kgs. Lyngby
    Home Country
    Denmark Denmark
    From my limited knowledge of TsReader, that would require huge changes which are out of the question, at least for RC1.
     

    elliottmc

    Retired Team Member
  • Premium Supporter
  • August 7, 2005
    14,927
    6,061
    Cardiff, UK
    Home Country
    United Kingdom United Kingdom
    Hi,

    We should still bear in mind the observation that the problem happens with a 3 second margin and does not with a 5 second margin. Since TsReader only 'guesses' the duration (at least partly), it may be worth accepting this fix.

    Mark
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Hi,

    We should still bear in mind the observation that the problem happens with a 3 second margin and does not with a 5 second margin. Since TsReader only 'guesses' the duration (at least partly), it may be worth accepting this fix.

    Mark

    With 5 seconds you might be seeing few seconds of the old channel when zapping. At least on some broadcasters it would be much more likely when there are 2 seconds more TS buffer content that is played.
     

    disaster123

    MP Donator
  • Premium Supporter
  • May 14, 2008
    3,558
    434
    Home Country
    Germany Germany
    AW: Skip to end on live recording sometimes stops playback

    i just want to confirm that i've the same problem that sometimes the playback stops when skipping to end.
     

    Users who are viewing this thread

    Top Bottom