[Live-devel] MPEG2TransportStreamFramer duration estimate/trickplay

Dermot McGahon dermot at dspsrv.com
Wed Jun 1 15:40:39 PDT 2005


Hi Ross,


I'm having another go at implementing trickplay using VLC and a Kasenna
Omnibase VOD server. At one point I had this working.

On the first attempt, I did have to introduce an  
MPEG2TransportStreamFramer,
so that StreamRead in livedotcom.cpp would be passed a correct duration
parameter. Correct handling of duration and PCR are required to make
this work.

This time around, I'm seeing incorrect duration values after a PLAY is sent
with an updated Scale value. I think that this is because the PCR resets
after the second PLAY, the PCR for that PID has been previously seen but it
seems to have diverged from the previously seen PCRs; it will reconverge on
correct duration after a number of iterations, but by that point VLC has
lost track of the running duration and will not have valid values for
subsequent PAUSE and PLAY requests.

This part of the problem I could do with some advice on.

I will also have to handle the reset PCRs in VLC. I will start looking at
that now.

If you could look at the attached log and perhaps advise on any possible
change to MPEG2TransportStreamFramer::updateTSPacketDurationEstimate() or
elsewhere, which could help to deal with this situation, I would really
appreciate it.



Warm Regards,

Dermot McGahon.
--
-------------- next part --------------
[00000676] livedotcom demuxer debug: duration = 28390/44
MPEG2TransportStreamFramer: frameSize (15980), fFrameSize (15980)
MPEG2TransportStreamFramer: presentationTime (0), numTSPackets (85)
PCR 0x001f2d4b+0 == 45.404693 => this duration 0.000334, new estimate 0.000334
PCR 0x001f313a+1 == 45.427086 => this duration 0.000334, new estimate 0.000334
MPEG2TransportStreamFramer duration estimate = 28390
[00000676] livedotcom demuxer debug: duration = 28390/44
MPEG2TransportStreamFramer: frameSize (15980), fFrameSize (15980)
MPEG2TransportStreamFramer: presentationTime (0), numTSPackets (85)
PCR 0x001f352a+1 == 45.449479 => this duration 0.000334, new estimate 0.000334
MPEG2TransportStreamFramer duration estimate = 28390
[00000676] livedotcom demuxer debug: duration = 28390/45
MPEG2TransportStreamFramer: frameSize (15980), fFrameSize (15980)
MPEG2TransportStreamFramer: presentationTime (0), numTSPackets (85)
PCR 0x001f391a+0 == 45.471872 => this duration 0.000334, new estimate 0.000334
MPEG2TransportStreamFramer duration estimate = 28390
[00000676] livedotcom demuxer debug: duration = 28390/45

fastforward: returned 0 (no error)
MPEG2TransportStreamFramer: frameSize (15980), fFrameSize (15980)
MPEG2TransportStreamFramer: presentationTime (0), numTSPackets (85)
PCR 0x001f3d09+1 == 45.494265 => this duration 0.000334, new estimate 0.000334
MPEG2TransportStreamFramer duration estimate = 28390
[00000676] livedotcom demuxer debug: duration = 28390/45
[00000675] main input debug: control type=2
[00000676] livedotcom demuxer debug: i_running_duration: 45083320
Sending request: PAUSE rtsp://omnibase/sync_test RTSP/1.0
CSeq: 5
Session: 1117545742
User-Agent: VLC Media Player (LIVE.COM Streaming Media v2005.05.11)


Received PAUSE response: RTSP/1.0 200 OK
CSeq: 5
Date: Wed, 01 Jun 2005 20:53:52 GMT


[00000676] livedotcom demuxer debug: i_running_duration: 45083320
Sending request: PLAY rtsp://omnibase/sync_test RTSP/1.0
CSeq: 6
Session: 1117545742
Scale: 12.000000
Range: npt=45.083-120.000
User-Agent: VLC Media Player (LIVE.COM Streaming Media v2005.05.11)


Received PLAY response: RTSP/1.0 200 OK
CSeq: 6
Date: Wed, 01 Jun 2005 20:53:52 GMT
Scale: 12.000000


MPEG2TransportStreamFramer: frameSize (15980), fFrameSize (15980)
MPEG2TransportStreamFramer: presentationTime (0), numTSPackets (85)
PCR 0x000298ee+1 == 3.782726 => this duration -0.556154, new estimate -0.277910
PCR 0x0002992a+1 == 3.784063 => this duration 0.000267, new estimate -0.138821
MPEG2TransportStreamFramer duration estimate = -11799785
[00000676] livedotcom demuxer debug: duration = 4283167511/4198
MPEG2TransportStreamFramer: frameSize (15980), fFrameSize (15980)
MPEG2TransportStreamFramer: presentationTime (0), numTSPackets (85)
PCR 0x00029d83+1 == 3.808796 => this duration 0.000334, new estimate -0.069243
PCR 0x0002a1dc+1 == 3.833528 => this duration 0.000334, new estimate -0.034455
MPEG2TransportStreamFramer duration estimate = -2928590
[00000676] livedotcom demuxer debug: duration = 4292038706/4163
MPEG2TransportStreamFramer: frameSize (15980), fFrameSize (15980)
MPEG2TransportStreamFramer: presentationTime (0), numTSPackets (85)
PCR 0x0002a635+1 == 3.858260 => this duration 0.000334, new estimate -0.017060
MPEG2TransportStreamFramer duration estimate = -1450100
[00000676] livedotcom demuxer debug: duration = 4293517196/4145
MPEG2TransportStreamFramer: frameSize (15980), fFrameSize (15980)
MPEG2TransportStreamFramer: presentationTime (0), numTSPackets (85)
PCR 0x0002aa8e+1 == 3.882993 => this duration 0.000334, new estimate -0.008363
MPEG2TransportStreamFramer duration estimate = -710770
[00000676] livedotcom demuxer debug: duration = 4294256526/4137
MPEG2TransportStreamFramer: frameSize (15980), fFrameSize (15980)
MPEG2TransportStreamFramer: presentationTime (0), numTSPackets (85)
PCR 0x0002aee7+1 == 3.907725 => this duration 0.000334, new estimate -0.004014
MPEG2TransportStreamFramer duration estimate = -341190
[00000676] livedotcom demuxer debug: duration = 4294626106/4133
MPEG2TransportStreamFramer: frameSize (15980), fFrameSize (15980)
MPEG2TransportStreamFramer: presentationTime (0), numTSPackets (85)
PCR 0x0002b340+1 == 3.932458 => this duration 0.000334, new estimate -0.001840
MPEG2TransportStreamFramer duration estimate = -156400
[00000676] livedotcom demuxer debug: duration = 4294810896/4131
MPEG2TransportStreamFramer: frameSize (15980), fFrameSize (15980)
MPEG2TransportStreamFramer: presentationTime (0), numTSPackets (85)
PCR 0x0002b799+1 == 3.957190 => this duration 0.000334, new estimate -0.000753
MPEG2TransportStreamFramer duration estimate = -63920
[00000676] livedotcom demuxer debug: duration = 4294903376/4130
MPEG2TransportStreamFramer: frameSize (15980), fFrameSize (15980)
MPEG2TransportStreamFramer: presentationTime (0), numTSPackets (85)
PCR 0x0002bbf2+1 == 3.981923 => this duration 0.000334, new estimate -0.000209
MPEG2TransportStreamFramer duration estimate = -17765
[00000676] livedotcom demuxer debug: duration = 4294949531/4130
MPEG2TransportStreamFramer: frameSize (15980), fFrameSize (15980)
MPEG2TransportStreamFramer: presentationTime (0), numTSPackets (85)
PCR 0x0002c04b+0 == 4.006655 => this duration 0.000334, new estimate 0.000062
PCR 0x0002c4a4+0 == 4.031387 => this duration 0.000334, new estimate 0.000198
MPEG2TransportStreamFramer duration estimate = 16830
[00000676] livedotcom demuxer debug: duration = 16830/4130
MPEG2TransportStreamFramer: frameSize (15980), fFrameSize (15980)
MPEG2TransportStreamFramer: presentationTime (0), numTSPackets (85)
PCR 0x0002c8fd+0 == 4.056120 => this duration 0.000334, new estimate 0.000266
MPEG2TransportStreamFramer duration estimate = 22610
[00000676] livedotcom demuxer debug: duration = 22610/4130
MPEG2TransportStreamFramer: frameSize (15980), fFrameSize (15980)
MPEG2TransportStreamFramer: presentationTime (0), numTSPackets (85)
PCR 0x0002cd56+0 == 4.080852 => this duration 0.000334, new estimate 0.000300
MPEG2TransportStreamFramer duration estimate = 25500
[00000676] livedotcom demuxer debug: duration = 25500/4131
MPEG2TransportStreamFramer: frameSize (15980), fFrameSize (15980)
MPEG2TransportStreamFramer: presentationTime (0), numTSPackets (85)
PCR 0x0002d1af+0 == 4.105585 => this duration 0.000334, new estimate 0.000317
MPEG2TransportStreamFramer duration estimate = 26945
[00000676] livedotcom demuxer debug: duration = 26945/4131
MPEG2TransportStreamFramer: frameSize (15980), fFrameSize (15980)
MPEG2TransportStreamFramer: presentationTime (0), numTSPackets (85)
PCR 0x0002d608+0 == 4.130317 => this duration 0.000334, new estimate 0.000326
MPEG2TransportStreamFramer duration estimate = 27625
[00000676] livedotcom demuxer debug: duration = 27625/4131
MPEG2TransportStreamFramer: frameSize (15980), fFrameSize (15980)
MPEG2TransportStreamFramer: presentationTime (0), numTSPackets (85)
PCR 0x0002da61+0 == 4.155050 => this duration 0.000334, new estimate 0.000330
MPEG2TransportStreamFramer duration estimate = 27965
[00000676] livedotcom demuxer debug: duration = 27965/4132
MPEG2TransportStreamFramer: frameSize (15980), fFrameSize (15980)
MPEG2TransportStreamFramer: presentationTime (0), numTSPackets (85)
PCR 0x0002deba+0 == 4.179782 => this duration 0.000334, new estimate 0.000332
PCR 0x0002e313+0 == 4.204515 => this duration 0.000334, new estimate 0.000333
MPEG2TransportStreamFramer duration estimate = 28305
[00000676] livedotcom demuxer debug: duration = 28305/4132
MPEG2TransportStreamFramer: frameSize (15980), fFrameSize (15980)
MPEG2TransportStreamFramer: presentationTime (0), numTSPackets (85)
PCR 0x0002e76c+0 == 4.229247 => this duration 0.000334, new estimate 0.000334
MPEG2TransportStreamFramer duration estimate = 28305
[00000676] livedotcom demuxer debug: duration = 28305/4132
MPEG2TransportStreamFramer: frameSize (15980), fFrameSize (15980)
MPEG2TransportStreamFramer: presentationTime (0), numTSPackets (85)
PCR 0x0002ebc5+0 == 4.253979 => this duration 0.000334, new estimate 0.000334
MPEG2TransportStreamFramer duration estimate = 28305
[00000676] livedotcom demuxer debug: duration = 28305/4133
MPEG2TransportStreamFramer: frameSize (15980), fFrameSize (15980)
MPEG2TransportStreamFramer: presentationTime (0), numTSPackets (85)
PCR 0x0002f01e+0 == 4.278712 => this duration 0.000334, new estimate 0.000334
MPEG2TransportStreamFramer duration estimate = 28390
[00000676] livedotcom demuxer debug: duration = 28390/4133
MPEG2TransportStreamFramer: frameSize (15980), fFrameSize (15980)
MPEG2TransportStreamFramer: presentationTime (0), numTSPackets (85)
PCR 0x0002f476+1 == 4.303444 => this duration 0.000334, new estimate 0.000334
MPEG2TransportStreamFramer duration estimate = 28390
[00000676] livedotcom demuxer debug: duration = 28390/4133
MPEG2TransportStreamFramer: frameSize (15980), fFrameSize (15980)
MPEG2TransportStreamFramer: presentationTime (0), numTSPackets (85)
PCR 0x0002f8cf+1 == 4.328177 => this duration 0.000334, new estimate 0.000334
MPEG2TransportStreamFramer duration estimate = 28390
[00000676] livedotcom demuxer debug: duration = 28390/4134
MPEG2TransportStreamFramer: frameSize (15980), fFrameSize (15980)
MPEG2TransportStreamFramer: presentationTime (0), numTSPackets (85)
PCR 0x0002fd28+1 == 4.352909 => this duration 0.000334, new estimate 0.000334
MPEG2TransportStreamFramer duration estimate = 28390
[00000676] livedotcom demuxer debug: duration = 28390/4134
MPEG2TransportStreamFramer: frameSize (15980), fFrameSize (15980)
MPEG2TransportStreamFramer: presentationTime (0), numTSPackets (85)
PCR 0x00030181+1 == 4.377642 => this duration 0.000334, new estimate 0.000334
PCR 0x000305da+1 == 4.402374 => this duration 0.000334, new estimate 0.000334
MPEG2TransportStreamFramer duration estimate = 28390
[00000676] livedotcom demuxer debug: duration = 28390/4134
MPEG2TransportStreamFramer: frameSize (15980), fFrameSize (15980)
MPEG2TransportStreamFramer: presentationTime (0), numTSPackets (85)
PCR 0x00030a33+1 == 4.427107 => this duration 0.000334, new estimate 0.000334
MPEG2TransportStreamFramer duration estimate = 28390
[00000676] livedotcom demuxer debug: duration = 28390/4135
MPEG2TransportStreamFramer: frameSize (15980), fFrameSize (15980)
MPEG2TransportStreamFramer: presentationTime (0), numTSPackets (85)
PCR 0x00030e8c+1 == 4.451839 => this duration 0.000334, new estimate 0.000334
MPEG2TransportStreamFramer duration estimate = 28390
[00000676] livedotcom demuxer debug: duration = 28390/4135
MPEG2TransportStreamFramer: frameSize (15980), fFrameSize (15980)
MPEG2TransportStreamFramer: presentationTime (0), numTSPackets (85)
PCR 0x000312e5+1 == 4.476571 => this duration 0.000334, new estimate 0.000334
MPEG2TransportStreamFramer duration estimate = 28390
[00000676] livedotcom demuxer debug: duration = 28390/4135
MPEG2TransportStreamFramer: frameSize (15980), fFrameSize (15980)
MPEG2TransportStreamFramer: presentationTime (0), numTSPackets (85)
PCR 0x0003173e+1 == 4.501304 => this duration 0.000334, new estimate 0.000334
MPEG2TransportStreamFramer duration estimate = 28390
[00000676] livedotcom demuxer debug: duration = 28390/4136
MPEG2TransportStreamFramer: frameSize (15980), fFrameSize (15980)
MPEG2TransportStreamFramer: presentationTime (0), numTSPackets (85)
PCR 0x00031b97+1 == 4.526036 => this duration 0.000334, new estimate 0.000334
MPEG2TransportStreamFramer duration estimate = 28390
[00000676] livedotcom demuxer debug: duration = 28390/4136
MPEG2TransportStreamFramer: frameSize (15980), fFrameSize (15980)
MPEG2TransportStreamFramer: presentationTime (0), numTSPackets (85)
PCR 0x00031ff0+1 == 4.550769 => this duration 0.000334, new estimate 0.000334
MPEG2TransportStreamFramer duration estimate = 28390
[00000676] livedotcom demuxer debug: duration = 28390/4136
MPEG2TransportStreamFramer: frameSize (15980), fFrameSize (15980)
MPEG2TransportStreamFramer: presentationTime (0), numTSPackets (85)
PCR 0x00032449+1 == 4.575501 => this duration 0.000334, new estimate 0.000334
PCR 0x000328a2+1 == 4.600234 => this duration 0.000334, new estimate 0.000334
MPEG2TransportStreamFramer duration estimate = 28390
[00000676] livedotcom demuxer debug: duration = 28390/4137
MPEG2TransportStreamFramer: frameSize (15980), fFrameSize (15980)
MPEG2TransportStreamFramer: presentationTime (0), numTSPackets (85)
PCR 0x00032cfb+0 == 4.624966 => this duration 0.000334, new estimate 0.000334
MPEG2TransportStreamFramer duration estimate = 28390
[00000676] livedotcom demuxer debug: duration = 28390/4137
MPEG2TransportStreamFramer: frameSize (15980), fFrameSize (15980)
MPEG2TransportStreamFramer: presentationTime (0), numTSPackets (85)
PCR 0x00033154+0 == 4.649698 => this duration 0.000334, new estimate 0.000334
MPEG2TransportStreamFramer duration estimate = 28390
[00000676] livedotcom demuxer debug: duration = 28390/4137
MPEG2TransportStreamFramer: frameSize (15980), fFrameSize (15980)
MPEG2TransportStreamFramer: presentationTime (0), numTSPackets (85)
PCR 0x000335ad+0 == 4.674431 => this duration 0.000334, new estimate 0.000334



More information about the live-devel mailing list