0
votes

I'm trying to write an UDP streaming application with directshow that intends to work in LAN environment. Things turned out to be fine until the client starts to experience freezing issues when seeking.

Here is what I did:

Server

enter image description here

Client

enter image description here

On the server side, I have two transform filter, one for Video and one for Audio. In these two filters, each of them creates a thread that reads the MediaSamples and perform multicast without modifying the timestamps/flags. Meanwhile, the Video transform filter simply pass the media samples to the decoder. The Audio transform filters will do the same.

On the client side. The live source filter simply reads the Video and Audio MediaSamples from the UDP port. At here, I perform some simple Timestamp calculation which is:

MediaSample start time = Current Stream Time + 40 ms

The videos would stream just fine in LAN environment. However, I found out when I do a seek, the client side will freeze for a moment. When I check the renderer, it will show lots of frames are dropped. I'm guessing the timestamps are causing the frames to dropped.

I also noticed whenever a perform a seek, the initial frames are usually have negative stamps. If I don't send these frames over to the client, the client will not freeze. But some the frames would be broken. I'm guessing this is due to fact these negative frames are the KeyFrames that leads to seeked position. If they are missing, the image would be broken.

After doing some research, I tried this approach:

  1. Set the first sample's timestamp to current stream time.

    T1 = Stream Time.

  2. Use this first sample's timestamp as baseline.

    Base = T1

  3. Every sample after is calculated as

    Tn = Stream Time + Tn - Base

Which also didn't work. I am guessing that's because the server and client's clock are not synchronized. However, I was thinking it might work, because after every seek on the server side, the timestamps starts from 0 again.

I am trying to figure out what to do next. I would really appreciate it if anyone could give me some advice.

2013-07-26 Update

Roman, Thank for your help. I have tried to rebase the timestamps with the method mentioned in http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/c1c762a0-af92-4987-b084-f0d194766999/is-a-video-sample-with-negative-timestamp-a-preroll-sample

  1. Client detects discontinuity by checking IMediaSample::IsDiscontinuity
  2. If a discontinuity occurs, set baseline(B) to the received the timestamp
  3. Then every timestamp is calculated as

TS - Received timestamp TC - Calculated timestamp

  TC = Current Stream Time + TS - B + 40ms

where I get current stream time by using CRefTime and StreamTime()

After making the changes above, when I start to stream, the client's video moves very slow for awhile and eventually freezes. The client's screen goes active again for about half a second after I stop the server from sending data.

What did I do wrong here? Is it about the clock rate?

2013-08-01 Update

Following Roman's suggestion, I was able to find my mistakes in the timestamps by adding a pass through filter after the SourceFilter which allows me to examine the timestamps coming from the SourceFilter's video output pin.

However, right now I have encountered another problem when seeking. On the client side, even though all the frames are displayed properly, it's suffering from huge delay before it's starts updating new frames.

I have checked these frames and they are the preroll frames that lead to the frame of my seeked position. I'm confirmed it by setting the preroll flag to false in the media samples and letting it be played. It seems that the graph is processing these preroll frames in normal rate on the client side, but on the server side, these preroll frames are processed lot quicker.

Is there a way to get around this delay or it's just something I have to deal with?

These are the samples I captured in the pass through filter.

Server

6848 : GetState 2
31772 : 11210a90 BeginFlush
31784 : 11210a90 EndFlush
31784 : NewSegment: 38700000..300900000 at 1x
31814 : GetState 1
31814 : GetState 1
31814 : GetState 1
31815 : GetState 1
31815 : GetState 1
31816 : 11210a90 Sample 4515 bytesD time -3870.0 to -3837.0 latency 0.0 <-- Preroll Starts
31828 : 11210a90 Sample 62335 bytes time -3837.0 to -3804.0 latency 0.0
31834 : GetState 1
31843 : 11210a90 Sample 51483 bytes time -3804.0 to -3770.0 latency 0.0
31844 : GetState 1
31856 : 11210a90 Sample 62535 bytes time -3770.0 to -3737.0 latency 0.0
31864 : GetState 1
31869 : 11210a90 Sample 62041 bytes time -3737.0 to -3704.0 latency 0.0
31874 : GetState 1
31885 : 11210a90 Sample 61509 bytes time -3704.0 to -3670.0 latency 0.0
31888 : GetState 1
31900 : 11210a90 Sample 62280 bytes time -3670.0 to -3637.0 latency 0.0
31906 : GetState 1
31912 : 11210a90 Sample 63084 bytes time -3637.0 to -3604.0 latency 0.0
31926 : GetState 1
31929 : 11210a90 Sample 62388 bytes time -3604.0 to -3570.0 latency 0.0
31936 : GetState 1
31941 : 11210a90 Sample 61956 bytes time -3570.0 to -3537.0 latency 0.0
31951 : GetState 1
31956 : 11210a90 Sample 52196 bytes time -3537.0 to -3503.0 latency 0.0
31967 : GetState 1
31968 : 11210a90 Sample 53707 bytes time -3503.0 to -3470.0 latency 0.0
31980 : 11210a90 Sample 55162 bytes time -3470.0 to -3437.0 latency 0.0
31982 : GetState 1
31991 : 11210a90 Sample 54511 bytes time -3437.0 to -3403.0 latency 0.0
31998 : GetState 1
32002 : 11210a90 Sample 53676 bytes time -3403.0 to -3370.0 latency 0.0
32013 : 11210a90 Sample 54214 bytes time -3370.0 to -3337.0 latency 0.0
32016 : GetState 1
32031 : 11210a90 Sample 53590 bytes time -3337.0 to -3303.0 latency 0.0
32036 : GetState 1
32042 : 11210a90 Sample 54067 bytes time -3303.0 to -3270.0 latency 0.0
32046 : GetState 1
32055 : 11210a90 Sample 55115 bytes time -3270.0 to -3237.0 latency 0.0
32066 : GetState 1
32067 : 11210a90 Sample 56462 bytes time -3237.0 to -3203.0 latency 0.0
32076 : GetState 1
32079 : 11210a90 Sample 45412 bytes time -3203.0 to -3170.0 latency 0.0
32090 : 11210a90 Sample 49165 bytes time -3170.0 to -3136.0 latency 0.0
32096 : GetState 1
32102 : 11210a90 Sample 47378 bytes time -3136.0 to -3103.0 latency 0.0
32113 : 11210a90 Sample 47024 bytes time -3103.0 to -3070.0 latency 0.0
32116 : GetState 1
32123 : GetState 1
32127 : 11210a90 Sample 46739 bytes time -3070.0 to -3036.0 latency 0.0
32138 : GetState 1
32141 : 11210a90 Sample 45601 bytes time -3036.0 to -3003.0 latency 0.0
32152 : 11210a90 Sample 45939 bytes time -3003.0 to -2970.0 latency 0.0
32154 : GetState 1
32163 : 11210a90 Sample 47212 bytes time -2970.0 to -2936.0 latency 0.0
32170 : GetState 1
32180 : 11210a90 Sample 44130 bytes time -2936.0 to -2903.0 latency 0.0
32190 : GetState 1
32190 : 11210a90 Sample 43858 bytes time -2903.0 to -2869.0 latency 0.0
32200 : GetState 1
32201 : 11210a90 Sample 44417 bytes time -2869.0 to -2836.0 latency 0.0
32211 : 11210a90 Sample 44330 bytes time -2836.0 to -2803.0 latency 0.0
32217 : GetState 1
32224 : 11210a90 Sample 44660 bytes time -2803.0 to -2769.0 latency 0.0
32236 : 11210a90 Sample 43832 bytes time -2769.0 to -2736.0 latency 0.0
32237 : GetState 1
32247 : GetState 1
32248 : 11210a90 Sample 43512 bytes time -2736.0 to -2703.0 latency 0.0
32260 : 11210a90 Sample 43342 bytes time -2703.0 to -2669.0 latency 0.0
32267 : GetState 1
32272 : 11210a90 Sample 43589 bytes time -2669.0 to -2636.0 latency 0.0
32286 : 11210a90 Sample 42888 bytes time -2636.0 to -2603.0 latency 0.0
32287 : GetState 1
32297 : GetState 1
32297 : 11210a90 Sample 44217 bytes time -2603.0 to -2569.0 latency 0.0
32308 : 11210a90 Sample 46987 bytes time -2569.0 to -2536.0 latency 0.0
32311 : GetState 1
32321 : 11210a90 Sample 45233 bytes time -2536.0 to -2502.0 latency 0.0
32331 : GetState 1
32332 : 11210a90 Sample 46052 bytes time -2502.0 to -2469.0 latency 0.0
32343 : GetState 1
32343 : 11210a90 Sample 45819 bytes time -2469.0 to -2436.0 latency 0.0
32357 : 11210a90 Sample 46946 bytes time -2436.0 to -2402.0 latency 0.0
32363 : GetState 1
32371 : 11210a90 Sample 44469 bytes time -2402.0 to -2369.0 latency 0.0
32373 : GetState 1
32387 : 11210a90 Sample 44398 bytes time -2369.0 to -2336.0 latency 0.0
32393 : GetState 1
32401 : 11210a90 Sample 45456 bytes time -2336.0 to -2302.0 latency 0.0
32403 : GetState 1
32412 : 11210a90 Sample 46051 bytes time -2302.0 to -2269.0 latency 0.0
32423 : GetState 1
32425 : 11210a90 Sample 38146 bytes time -2269.0 to -2236.0 latency 0.0
32436 : 11210a90 Sample 38028 bytes time -2236.0 to -2202.0 latency 0.0
32443 : GetState 1
32446 : 11210a90 Sample 39705 bytes time -2202.0 to -2169.0 latency 0.0
32455 : GetState 1
32460 : 11210a90 Sample 36533 bytes time -2169.0 to -2135.0 latency 0.0
32468 : GetState 1
32472 : 11210a90 Sample 37019 bytes time -2135.0 to -2102.0 latency 0.0
32483 : 11210a90 Sample 37277 bytes time -2102.0 to -2069.0 latency 0.0
32488 : GetState 1
32494 : 11210a90 Sample 36698 bytes time -2069.0 to -2035.0 latency 0.0
32498 : GetState 1
32506 : 11210a90 Sample 36436 bytes time -2035.0 to -2002.0 latency 0.0
32516 : GetState 1
32516 : 11210a90 Sample 37650 bytes time -2002.0 to -1969.0 latency 0.0
32528 : 11210a90 Sample 38623 bytes time -1969.0 to -1935.0 latency 0.0
32536 : GetState 1
32538 : 11210a90 Sample 38525 bytes time -1935.0 to -1902.0 latency 0.0
32546 : GetState 1
32549 : 11210a90 Sample 38196 bytes time -1902.0 to -1868.0 latency 0.0
32559 : 11210a90 Sample 38130 bytes time -1868.0 to -1835.0 latency 0.0
32564 : GetState 1
32575 : 11210a90 Sample 39116 bytes time -1835.0 to -1802.0 latency 0.0
32583 : GetState 1
32587 : 11210a90 Sample 45008 bytes time -1802.0 to -1768.0 latency 0.0
32593 : GetState 1
32599 : 11210a90 Sample 40588 bytes time -1768.0 to -1735.0 latency 0.0
32610 : 11210a90 Sample 40633 bytes time -1735.0 to -1702.0 latency 0.0
32613 : GetState 1
32621 : 11210a90 Sample 41867 bytes time -1702.0 to -1668.0 latency 0.0
32623 : GetState 1
32633 : 11210a90 Sample 40974 bytes time -1668.0 to -1635.0 latency 0.0
32643 : GetState 1
32643 : 11210a90 Sample 41854 bytes time -1635.0 to -1602.0 latency 0.0
32653 : GetState 1
32654 : 11210a90 Sample 42312 bytes time -1602.0 to -1568.0 latency 0.0
32665 : 11210a90 Sample 42155 bytes time -1568.0 to -1535.0 latency 0.0
32668 : GetState 1
32681 : 11210a90 Sample 41618 bytes time -1535.0 to -1501.0 latency 0.0
32688 : GetState 1
32696 : 11210a90 Sample 41394 bytes time -1501.0 to -1468.0 latency 0.0
32703 : GetState 1
32715 : GetState 1
32719 : 11210a90 Sample 41221 bytes time -1468.0 to -1435.0 latency 0.0
32731 : 11210a90 Sample 41515 bytes time -1435.0 to -1401.0 latency 0.0
32735 : GetState 1
32742 : 11210a90 Sample 41570 bytes time -1401.0 to -1368.0 latency 0.0
32748 : GetState 1
32752 : 11210a90 Sample 43045 bytes time -1368.0 to -1335.0 latency 0.0
32762 : GetState 1
32765 : 11210a90 Sample 42187 bytes time -1335.0 to -1301.0 latency 0.0
32778 : GetState 1
32780 : 11210a90 Sample 41181 bytes time -1301.0 to -1268.0 latency 0.0
32791 : 11210a90 Sample 41675 bytes time -1268.0 to -1235.0 latency 0.0
32793 : GetState 1
32804 : 11210a90 Sample 42541 bytes time -1235.0 to -1201.0 latency 0.0
32813 : GetState 1
32818 : 11210a90 Sample 41916 bytes time -1201.0 to -1168.0 latency 0.0
32827 : GetState 1
32833 : 11210a90 Sample 40903 bytes time -1168.0 to -1134.0 latency 0.0
32843 : 11210a90 Sample 41798 bytes time -1134.0 to -1101.0 latency 0.0
32846 : GetState 1
32855 : 11210a90 Sample 41537 bytes time -1101.0 to -1068.0 latency 0.0
32860 : GetState 1
32866 : 11210a90 Sample 40623 bytes time -1068.0 to -1034.0 latency 0.0
32877 : GetState 1
32880 : 11210a90 Sample 40275 bytes time -1034.0 to -1001.0 latency 0.0
32889 : GetState 1
32890 : 11210a90 Sample 37519 bytes time -1001.0 to -968.0 latency 0.0
32901 : 11210a90 Sample 37575 bytes time -968.0 to -934.0 latency 0.0
32903 : GetState 1
32912 : 11210a90 Sample 38719 bytes time -934.0 to -901.0 latency 0.0
32920 : GetState 1
32928 : 11210a90 Sample 36653 bytes time -901.0 to -867.0 latency 0.0
32934 : GetState 1
32940 : 11210a90 Sample 36593 bytes time -867.0 to -834.0 latency 0.0
32951 : 11210a90 Sample 35818 bytes time -834.0 to -801.0 latency 0.0
32954 : GetState 1
32960 : 11210a90 Sample 36516 bytes time -801.0 to -767.0 latency 0.0
32966 : GetState 1
32974 : 11210a90 Sample 35436 bytes time -767.0 to -734.0 latency 0.0
32986 : 11210a90 Sample 36906 bytes time -734.0 to -701.0 latency 0.0
32986 : GetState 1
32996 : 11210a90 Sample 37786 bytes time -701.0 to -667.0 latency 0.0
32998 : GetState 1
33008 : 11210a90 Sample 36125 bytes time -667.0 to -634.0 latency 0.0
33012 : GetState 1
33019 : 11210a90 Sample 36410 bytes time -634.0 to -601.0 latency 0.0
33027 : GetState 1
33034 : 11210a90 Sample 36077 bytes time -601.0 to -567.0 latency 0.0
33045 : 11210a90 Sample 37942 bytes time -567.0 to -534.0 latency 0.0
33047 : GetState 1
33060 : 11210a90 Sample 36691 bytes time -534.0 to -500.0 latency 0.0
33066 : GetState 1
33071 : 11210a90 Sample 36991 bytes time -500.0 to -467.0 latency 0.0
33075 : GetState 1
33082 : 11210a90 Sample 37085 bytes time -467.0 to -434.0 latency 0.0
33091 : GetState 1
33092 : 11210a90 Sample 36362 bytes time -434.0 to -400.0 latency 0.0
33103 : 11210a90 Sample 36669 bytes time -400.0 to -367.0 latency 0.0
33109 : GetState 1
33112 : 11210a90 Sample 36624 bytes time -367.0 to -334.0 latency 0.0
33126 : 11210a90 Sample 38299 bytes time -334.0 to -300.0 latency 0.0
33129 : GetState 1
33139 : GetState 1
33140 : 11210a90 Sample 37931 bytes time -300.0 to -267.0 latency 0.0
33152 : GetState 1
33153 : 11210a90 Sample 38297 bytes time -267.0 to -234.0 latency 0.0
33163 : 11210a90 Sample 38490 bytes time -234.0 to -200.0 latency 0.0
33172 : GetState 1
33176 : 11210a90 Sample 40219 bytes time -200.0 to -167.0 latency 0.0
33184 : GetState 1
33188 : 11210a90 Sample 45656 bytes time -167.0 to -133.0 latency 0.0
33199 : 11210a90 Sample 44289 bytes time -133.0 to -100.0 latency 0.0
33204 : GetState 1
33210 : 11210a90 Sample 39973 bytes time -100.0 to -67.0 latency 0.0
33216 : GetState 1
33222 : 11210a90 Sample 38835 bytes time -67.0 to -33.0 latency 0.0
33230 : GetState 1
33234 : 11210a90 Sample 43513 bytes time -33.0 to 0.0 latency 0.0
33246 : 11210a90 Sample 39879 bytes time 0.0 to 1.0 latency 0.0 <-- Preroll ends
33250 : GetState 1
33262 : GetState 1
33262 : 11210a90 Run STO 23440168ms ST 0ms
33262 : 11210a90 Sample 40240 bytes time 33.0 to 34.0 latency 33.0
33302 : 11210a90 Sample 40200 bytes time 67.0 to 68.0 latency 42.204
33337 : 11210a90 Sample 40430 bytes time 100.0 to 101.0 latency 41.204
33464 : 11210a90 Sample 40407 bytes time 134.0 to 135.0 latency 37.8390
33497 : 11210a90 Sample 43949 bytes time 167.0 to 168.0 latency 36.8390
33531 : 11210a90 Sample 40345 bytes time 200.0 to 201.0 latency 35.8390
33559 : 11210a90 Sample 40497 bytes time 234.0 to 235.0 latency 41.6530
33600 : 11210a90 Sample 40504 bytes time 267.0 to 268.0 latency 33.7936
33626 : 11210a90 Sample 114853 bytes time 300.0 to 301.0 latency 40.7936
33658 : 11210a90 Sample 20719 bytes time 334.0 to 335.0 latency 42.7936

Client

31372 : GetState 2
32794 : f622d30 Sample 4515 bytesD time 30199.0 to 30232.0 latency -52.0 <---Discontinuity
32809 : f622d30 Sample 62335 bytes time 30232.0 to 30265.0 latency -34.0
32843 : f622d30 Sample 51483 bytes time 30265.0 to 30299.0 latency -35.0
32869 : f622d30 Sample 62535 bytes time 30299.0 to 30332.0 latency -27.0
32898 : f622d30 Sample 62041 bytes time 30332.0 to 30365.0 latency -23.0
32917 : f622d30 Sample 61509 bytes time 30365.0 to 30399.0 latency -9.0
32937 : f622d30 Sample 62280 bytes time 30399.0 to 30432.0 latency 5.0
32958 : f622d30 Sample 63084 bytes time 30432.0 to 30465.0 latency 17.0
32984 : f622d30 Sample 62388 bytes time 30465.0 to 30499.0 latency 24.0
33019 : f622d30 Sample 61956 bytes time 30499.0 to 30532.0 latency 23.0
33054 : f622d30 Sample 52196 bytes time 30532.0 to 30566.0 latency 21.0
33104 : f622d30 Sample 53707 bytes time 30566.0 to 30599.0 latency 5.0
33135 : f622d30 Sample 55162 bytes time 30599.0 to 30632.0 latency 8.0
33196 : f622d30 Sample 54511 bytes time 30632.0 to 30666.0 latency -21.0
33224 : f622d30 Sample 53676 bytes time 30666.0 to 30699.0 latency -15.0
33265 : f622d30 Sample 54214 bytes time 30699.0 to 30732.0 latency -23.0
33287 : f622d30 Sample 53590 bytes time 30732.0 to 30766.0 latency -12.0
33336 : f622d30 Sample 54067 bytes time 30766.0 to 30799.0 latency -27.0
33369 : f622d30 Sample 55115 bytes time 30799.0 to 30832.0 latency -27.0
33416 : f622d30 Sample 56462 bytes time 30832.0 to 30866.0 latency -40.0
33455 : f622d30 Sample 45412 bytes time 30866.0 to 30899.0 latency -46.0
33487 : f622d30 Sample 49165 bytes time 30899.0 to 30933.0 latency -45.0
33538 : f622d30 Sample 47378 bytes time 30933.0 to 30966.0 latency -62.0
33577 : f622d30 Sample 47024 bytes time 30966.0 to 30999.0 latency -68.0
33616 : f622d30 Sample 46739 bytes time 30999.0 to 31033.0 latency -74.0
33663 : f622d30 Sample 45601 bytes time 31033.0 to 31066.0 latency -87.0
33690 : f622d30 Sample 45939 bytes time 31066.0 to 31099.0 latency -81.0
33732 : f622d30 Sample 47212 bytes time 31099.0 to 31133.0 latency -90.0
33775 : f622d30 Sample 44130 bytes time 31133.0 to 31166.0 latency -98.0
33819 : f622d30 Sample 43858 bytes time 31166.0 to 31200.0 latency -110.0
33851 : f622d30 Sample 44417 bytes time 31200.0 to 31233.0 latency -108.0
33880 : f622d30 Sample 44330 bytes time 31233.0 to 31266.0 latency -104.0
33924 : f622d30 Sample 44660 bytes time 31266.0 to 31300.0 latency -115.0
33959 : f622d30 Sample 43832 bytes time 31300.0 to 31333.0 latency -116.0
33989 : f622d30 Sample 43512 bytes time 31333.0 to 31366.0 latency -113.0
34023 : f622d30 Sample 43342 bytes time 31366.0 to 31400.0 latency -114.0
34062 : f622d30 Sample 43589 bytes time 31400.0 to 31433.0 latency -119.0
34088 : f622d30 Sample 42888 bytes time 31433.0 to 31466.0 latency -112.0
34118 : f622d30 Sample 44217 bytes time 31466.0 to 31500.0 latency -108.0
34159 : f622d30 Sample 46987 bytes time 31500.0 to 31533.0 latency -116.0
34185 : f622d30 Sample 45233 bytes time 31533.0 to 31567.0 latency -109.0
34209 : f622d30 Sample 46052 bytes time 31567.0 to 31600.0 latency -99.0
34237 : f622d30 Sample 45819 bytes time 31600.0 to 31633.0 latency -94.0
34258 : f622d30 Sample 46946 bytes time 31633.0 to 31667.0 latency -82.0
34286 : f622d30 Sample 44469 bytes time 31667.0 to 31700.0 latency -76.0
34306 : f622d30 Sample 44398 bytes time 31700.0 to 31733.0 latency -63.0
34333 : f622d30 Sample 45456 bytes time 31733.0 to 31767.0 latency -57.0
34354 : f622d30 Sample 46051 bytes time 31767.0 to 31800.0 latency -44.0
34374 : f622d30 Sample 38146 bytes time 31800.0 to 31833.0 latency -31.0
34402 : f622d30 Sample 38028 bytes time 31833.0 to 31867.0 latency -26.0
34482 : f622d30 Sample 39705 bytes time 31867.0 to 31900.0 latency -72.0
34507 : f622d30 Sample 36533 bytes time 31900.0 to 31934.0 latency -64.0
34528 : f622d30 Sample 37019 bytes time 31934.0 to 31967.0 latency -51.0
34569 : f622d30 Sample 37277 bytes time 31967.0 to 32000.0 latency -59.0
34600 : f622d30 Sample 36698 bytes time 32000.0 to 32034.0 latency -56.0
34626 : f622d30 Sample 36436 bytes time 32034.0 to 32067.0 latency -48.0
34651 : f622d30 Sample 37650 bytes time 32067.0 to 32100.0 latency -41.0
34670 : f622d30 Sample 38623 bytes time 32100.0 to 32134.0 latency -26.0
34689 : f622d30 Sample 38525 bytes time 32134.0 to 32167.0 latency -12.0
34723 : f622d30 Sample 38196 bytes time 32167.0 to 32201.0 latency -12.0
34749 : f622d30 Sample 38130 bytes time 32201.0 to 32234.0 latency -5.0
34771 : f622d30 Sample 39116 bytes time 32234.0 to 32267.0 latency 7.0
34791 : f622d30 Sample 45008 bytes time 32267.0 to 32301.0 latency 19.0
34818 : f622d30 Sample 40588 bytes time 32301.0 to 32334.0 latency 27.0
34848 : f622d30 Sample 40633 bytes time 32334.0 to 32367.0 latency 29.0
34948 : f622d30 Sample 41867 bytes time 32367.0 to 32401.0 latency -37.0
34970 : f622d30 Sample 40974 bytes time 32401.0 to 32434.0 latency -26.0
34999 : f622d30 Sample 41854 bytes time 32434.0 to 32467.0 latency -22.0
35018 : f622d30 Sample 42312 bytes time 32467.0 to 32501.0 latency -8.0
35050 : f622d30 Sample 42155 bytes time 32501.0 to 32534.0 latency -6.0
35078 : f622d30 Sample 41618 bytes time 32534.0 to 32568.0 latency -1.0
35102 : f622d30 Sample 41394 bytes time 32568.0 to 32601.0 latency 9.0
35122 : f622d30 Sample 41221 bytes time 32601.0 to 32634.0 latency 22.0
35148 : f622d30 Sample 41515 bytes time 32634.0 to 32668.0 latency 29.0
35166 : f622d30 Sample 41570 bytes time 32668.0 to 32701.0 latency 45.0
35198 : f622d30 Sample 43045 bytes time 32701.0 to 32734.0 latency 47.0
35216 : f622d30 Sample 42187 bytes time 32734.0 to 32768.0 latency 61.0
35239 : f622d30 Sample 41181 bytes time 32768.0 to 32801.0 latency 72.0
35274 : f622d30 Sample 41675 bytes time 32801.0 to 32834.0 latency 70.0
35301 : f622d30 Sample 42541 bytes time 32834.0 to 32868.0 latency 76.0
35319 : f622d30 Sample 41916 bytes time 32868.0 to 32901.0 latency 92.0
35370 : f622d30 Sample 40903 bytes time 32901.0 to 32935.0 latency 75.0
35395 : f622d30 Sample 41798 bytes time 32935.0 to 32968.0 latency 84.0
35415 : f622d30 Sample 41537 bytes time 32968.0 to 33001.0 latency 97.0
35437 : f622d30 Sample 40623 bytes time 33001.0 to 33035.0 latency 107.0
35461 : f622d30 Sample 40275 bytes time 33035.0 to 33068.0 latency 117.0
35482 : f622d30 Sample 37519 bytes time 33068.0 to 33101.0 latency 129.0
35518 : f622d30 Sample 37575 bytes time 33101.0 to 33135.0 latency 126.0
35537 : f622d30 Sample 38719 bytes time 33135.0 to 33168.0 latency 142.0
35559 : f622d30 Sample 36653 bytes time 33168.0 to 33202.0 latency 152.0
35576 : f622d30 Sample 36593 bytes time 33202.0 to 33235.0 latency 170.0
35607 : f622d30 Sample 35818 bytes time 33235.0 to 33268.0 latency 171.0
35698 : f622d30 Sample 36516 bytes time 33268.0 to 33302.0 latency 113.0
35724 : f622d30 Sample 35436 bytes time 33302.0 to 33335.0 latency 122.0
35750 : f622d30 Sample 36906 bytes time 33335.0 to 33368.0 latency 128.0
35769 : f622d30 Sample 37786 bytes time 33368.0 to 33402.0 latency 143.0
35796 : f622d30 Sample 36125 bytes time 33402.0 to 33435.0 latency 149.0
35827 : f622d30 Sample 36410 bytes time 33435.0 to 33468.0 latency 151.0
35852 : f622d30 Sample 36077 bytes time 33468.0 to 33502.0 latency 159.0
35871 : f622d30 Sample 37942 bytes time 33502.0 to 33535.0 latency 175.0
35896 : f622d30 Sample 36691 bytes time 33535.0 to 33569.0 latency 182.0
35926 : f622d30 Sample 36991 bytes time 33569.0 to 33602.0 latency 186.0
35949 : f622d30 Sample 37085 bytes time 33602.0 to 33635.0 latency 196.0
35971 : f622d30 Sample 36362 bytes time 33635.0 to 33669.0 latency 207.0
35989 : f622d30 Sample 36669 bytes time 33669.0 to 33702.0 latency 223.0
36017 : f622d30 Sample 36624 bytes time 33702.0 to 33735.0 latency 229.0
36045 : f622d30 Sample 38299 bytes time 33735.0 to 33769.0 latency 233.0
36064 : f622d30 Sample 37931 bytes time 33769.0 to 33802.0 latency 248.0
36086 : f622d30 Sample 38297 bytes time 33802.0 to 33835.0 latency 259.0
36108 : f622d30 Sample 38490 bytes time 33835.0 to 33869.0 latency 270.0
36126 : f622d30 Sample 40219 bytes time 33869.0 to 33902.0 latency 286.0
36157 : f622d30 Sample 45656 bytes time 33902.0 to 33936.0 latency 288.0
36177 : f622d30 Sample 44289 bytes time 33936.0 to 33969.0 latency 302.0
36205 : f622d30 Sample 39973 bytes time 33969.0 to 34002.0 latency 307.0
36225 : f622d30 Sample 38835 bytes time 34002.0 to 34036.0 latency 321.0
36251 : f622d30 Sample 43513 bytes time 34036.0 to 34069.0 latency 329.0
36277 : f622d30 Sample 39879 bytes time 34069.0 to 34070.0 latency 336.0 <--- End of Preroll frames
36608 : f622d30 Sample 40240 bytes time 34102.0 to 34103.0 latency 37.0
36648 : f622d30 Sample 40200 bytes time 34136.0 to 34137.0 latency 32.0
36676 : f622d30 Sample 40430 bytes time 34169.0 to 34170.0 latency 36.0
36711 : f622d30 Sample 40407 bytes time 34203.0 to 34204.0 latency 35.0
36748 : f622d30 Sample 43949 bytes time 34236.0 to 34237.0 latency 31.0
36786 : f622d30 Sample 40345 bytes time 34269.0 to 34270.0 latency 26.0
36805 : f622d30 Sample 40497 bytes time 34303.0 to 34304.0 latency 41.0
36846 : f622d30 Sample 40504 bytes time 34336.0 to 34337.0 latency 33.0
36872 : f622d30 Sample 114853 bytes time 34369.0 to 34370.0 latency 40.0
36906 : f622d30 Sample 20719 bytes time 34403.0 to 34404.0 latency 41.0
1

1 Answers

1
votes

Seek involves pausing and restarting streaming: you have a discontinuity in time stamping. You either have to re-claculate time stamps automatically on sending side to restore the continuity, or otherwise detect this on client side and rebase the time stamps there. Or, another option, the client side would flush the queues and continue from fresh.