[confirm] RTSP streaming issue (seek beyond the end infinite loop) (1 Viewer)

arion_p

Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    Try DebugView on the server. It will show some extra logging. You can capture the logs to a file and post it here.

    DebugView for Windows

    Also TsWriter.log might provide some more info, as it is responsible for creating/reusing the timeshift buffer files.
     

    romuz

    Retired Team Member
  • Premium Supporter
  • July 26, 2008
    1,045
    250
    Moskau
    Home Country
    Russian Federation Russian Federation
    Its tswriter from yesterday Incident, but its empty for issue period(never seen logs about creating reusing files in it before)
     

    romuz

    Retired Team Member
  • Premium Supporter
  • July 26, 2008
    1,045
    250
    Moskau
    Home Country
    Russian Federation Russian Federation
    Hi Arion
    I have gathered a logs with DebugView

    and only one abnormal thing i ca see in it. Its a nextStartPosition which sometimes goes beyond if i correctly feeling what is going on in sources
    in my setup i use 20 timeshift files with 50 megs

    Most of the time when reusing file i see nextStartPosition = 1000000000 ( 50000000 * 20 )
    Code:
    00014792	21:51:15	[2760] Old file reused : R:\\live2-0.ts.tsbuffer8.ts	
    00014793	21:51:15	[2760] Files Added 1, Removed 1	
    00014794	21:51:15	[2760] Removing file R:\\live2-0.ts.tsbuffer8.ts	
    00014795	21:51:15	[2760] Adding file R:\\live2-0.ts.tsbuffer8.ts (1000000000)

    but sometimes it starting to grow ahead

    Code:
    00021691	22:08:42	[2760] Old file reused : R:\\live2-0.ts.tsbuffer16.ts	
    00021692	22:08:42	[2760] Files Added 1, Removed 1	
    00021693	22:08:42	[2760] Removing file R:\\live2-0.ts.tsbuffer16.ts	
    00021694	22:08:42	[2760] Adding file R:\\live2-0.ts.tsbuffer16.ts (1050000000)	
    
    00022346	22:11:19	[2760] Old file reused : R:\\live2-0.ts.tsbuffer17.ts	
    00022347	22:11:19	[2760] Files Added 1, Removed 1	
    00022348	22:11:19	[2760] Removing file R:\\live2-0.ts.tsbuffer17.ts	
    00022349	22:11:19	[2760] Adding file R:\\live2-0.ts.tsbuffer17.ts (1100000000)
    
    00022980	22:13:56	[2760] Old file reused : R:\\live2-0.ts.tsbuffer18.ts	
    00022981	22:13:56	[2760] Files Added 1, Removed 1	
    00022982	22:13:56	[2760] Removing file R:\\live2-0.ts.tsbuffer18.ts	
    00022983	22:13:56	[2760] Adding file R:\\live2-0.ts.tsbuffer18.ts (1150000000)

    Total file count stays 20
     

    Attachments

    • MP.rar
      30.6 KB

    arion_p

    Retired Team Member
  • Premium Supporter
  • February 7, 2007
    3,373
    1,626
    Athens
    Home Country
    Greece Greece
    You are seeing logging from both MultiFileWriter in TsWriter (offset keeps increasing because TsWriter does not close and reopen the ts buffer, so it knows where it left off) and MultiFileReader in StreamingServer (every 5 secs it opens the ts buffer to calculate its length, it does not keep it open because that would prevent MultiFileWriter from reusing buffers).

    On first look there are two issues I see but I'll have to check the code to see if it is normal or not:

    1. At some point when total amount of data written to ts buffers (including ones that have now been overwritten) exceeds 2^31 (after the offset 2100000000 is logged) the offset rolls over to negative numbers. This is because MultiFileWriter uses 32 bit integers instead of 64 bit (this should probably be fixed but might need a change in tsbuffer format)
    2. Each time MultiFileReader opens the tsbuffer it adds and removes an increasing number of files. The difference stays at 20 but it adds for example 51 files then remove 31 of them. These numbers increase by one each time a buffer is reused. I am not sure if this is not normal but seems suspect. I'll have to check.
     

    romuz

    Retired Team Member
  • Premium Supporter
  • July 26, 2008
    1,045
    250
    Moskau
    Home Country
    Russian Federation Russian Federation
    You are seeing logging from both MultiFileWriter in TsWriter (offset keeps increasing because TsWriter does not close and reopen the ts buffer, so it knows where it left off) and MultiFileReader in StreamingServer (every 5 secs it opens the ts buffer to calculate its length, it does not keep it open because that would prevent MultiFileWriter from reusing buffers).

    On first look there are two issues I see but I'll have to check the code to see if it is normal or not:

    1. At some point when total amount of data written to ts buffers (including ones that have now been overwritten) exceeds 2^31 (after the offset 2100000000 is logged) the offset rolls over to negative numbers. This is because MultiFileWriter uses 32 bit integers instead of 64 bit (this should probably be fixed but might need a change in tsbuffer format)
    2. Each time MultiFileReader opens the tsbuffer it adds and removes an increasing number of files. The difference stays at 20 but it adds for example 51 files then remove 31 of them. These numbers increase by one each time a buffer is reused. I am not sure if this is not normal but seems suspect. I'll have to check.

    First issue only logging issue because it is converted from 64 to 32 bit for printing to log
    64 bit inside used so its ok
    And i dont see such logging in MultiFileWriter but in MultiFileReader its present. So i think it goes from MultiFileReader

    MultiFileWriter only says New file created or Old file reused
    All other goes from MultiFileReader
     

    wupperi

    MP Donator
  • Premium Supporter
  • July 29, 2007
    56
    0
    Unterfranken
    Home Country
    Germany Germany
    AW: RTSP streaming issue (seek beyond the end infinite loop)

    Seeing the same issue in LiveTV in RC2 here (pixelated picture and choppy sound):

    In tswriter:
    30-04-2010 21:25:15.326 Seeking beyond the end position: 9008363488 > 5168370456
    30-04-2010 21:25:15.721 generateSDPDescription() duration 1414.500000 : a=range:npt=0-1414.500

    But nothing else related to this issue in other logs. Cueing in timeshift buffer -15sec always temporarily solves the problem.
    Anything I can do to help you guys finding out what the issue is?

    wupperi
     

    Users who are viewing this thread

    Top Bottom