[vlc-devel] Re: VLC skips on "reduced" MPEG2-TS streams

Marian Durkovic md at bts.sk
Thu Jan 18 11:54:32 CET 2007


> Indeed the delay between PCR and PTS is too low, and there is not enough
> time from the moment when the packet enters the decoder until the moment
> we're supposed to display it. Theoritically the minimum is 120 ms (one I
> + 2 B's), to which we add 300 ms, so even at the minimum we should have
> time to decode the frames. I suppose the PTS's are in the past then.
> 
> AFAIK there is no specification for this value, at least not in MPEG.
> Conventional broadcaster use a value of 500 ms between the PCR and the
> next PTS.

I've attempted to debug the synchro at vout_SynchroChoose() and got the
following result:

With default file-caching (300msec) the delta between now and pts
drops to negative values after _big_ I frames (this is VBR stream) 

With file-caching set to 600 msec or more, the delta looks fine
and after initial 600 msec (or bigger) value it stabilizes at ~360 msec 
for I and P frames and ~240 msec for B frames.

Looks like we're probably seeing a buffer underrun within input when the
I frame is really big. Indeed the debug "hangs" momentarily when this
happens as if the decoder is suspended waiting for more data.

This is generating the debug:

msg_Dbg(p_synchro, "%i pts="I64Fd" delta="I64Fd , i_coding_type, pts/1000,
 (pts-now)/1000);

default 300 msec file-caching:

[00000584] main private debug: 1 pts=1169116331652 delta=341  (OK)
[00000584] main private debug: 3 pts=1169116331572 delta=255
[00000584] main private debug: 3 pts=1169116331612 delta=240
[00000584] main private debug: 2 pts=1169116331772 delta=361
[00000584] main private debug: 3 pts=1169116331692 delta=240
[00000584] main private debug: 3 pts=1169116331732 delta=241
[00000584] main private debug: 2 pts=1169116331892 delta=360
[00000584] main private debug: 3 pts=1169116331812 delta=239
[00000584] main private debug: 3 pts=1169116331852 delta=240
[00000584] main private debug: 2 pts=1169116332012 delta=361
[00000584] main private debug: 3 pts=1169116331932 delta=240
[00000584] main private debug: 3 pts=1169116331972 delta=241
[00000584] main private debug: 1 pts=1169116332132 delta=121   (!)
[00000584] main private debug: 3 pts=1169116332052 delta=37    DROPPED
[00000584] main private debug: 3 pts=1169116332092 delta=76    DROPPED
[00000584] main private debug: 2 pts=1169116332252 delta=236
[00000584] main private debug: 3 pts=1169116332172 delta=154
[00000584] main private debug: 3 pts=1169116332212 delta=192
[00000584] main private debug: 2 pts=1169116332372 delta=330
[00000584] main private debug: 3 pts=1169116332292 delta=246
[00000584] main private debug: 3 pts=1169116332332 delta=284
[00000584] main private debug: 2 pts=1169116332492 delta=370
[00000584] main private debug: 3 pts=1169116332412 delta=220
[00000584] main private debug: 3 pts=1169116332452 delta=221
[00000584] main private debug: 1 pts=1169116332612 delta=349   (OK)
[00000584] main private debug: 3 pts=1169116332532 delta=238
[00000584] main private debug: 3 pts=1169116332572 delta=240
[00000584] main private debug: 2 pts=1169116332732 delta=361
[00000584] main private debug: 3 pts=1169116332652 delta=240
[00000584] main private debug: 3 pts=1169116332692 delta=241
[00000584] main private debug: 2 pts=1169116332852 delta=361
[00000584] main private debug: 3 pts=1169116332772 delta=239
[00000584] main private debug: 3 pts=1169116332812 delta=241
[00000584] main private debug: 2 pts=1169116332972 delta=361
[00000584] main private debug: 3 pts=1169116332892 delta=239
[00000584] main private debug: 3 pts=1169116332932 delta=240
[00000584] main private debug: 1 pts=1169116333092 delta=100   (!)
[00000584] main private debug: 3 pts=1169116333012 delta=16    DROPPED
[00000584] main private debug: 3 pts=1169116333052 delta=56    DROPPED
[00000584] main private debug: 2 pts=1169116333212 delta=216
[00000584] main private debug: 3 pts=1169116333132 delta=132
[00000584] main private debug: 3 pts=1169116333172 delta=169
[00000584] main private debug: 2 pts=1169116333332 delta=291
[00000584] main private debug: 3 pts=1169116333252 delta=205
[00000584] main private debug: 3 pts=1169116333292 delta=239
[00000584] main private debug: 2 pts=1169116333452 delta=359
[00000584] main private debug: 3 pts=1169116333372 delta=238
[00000584] main private debug: 3 pts=1169116333412 delta=239

600 msec file-caching:

[00000584] main private debug: 1 pts=1169116921714 delta=369
[00000584] main private debug: 3 pts=1169116921634 delta=249
[00000584] main private debug: 3 pts=1169116921674 delta=261
[00000584] main private debug: 2 pts=1169116921834 delta=360
[00000584] main private debug: 3 pts=1169116921754 delta=241
[00000584] main private debug: 3 pts=1169116921794 delta=240
[00000584] main private debug: 2 pts=1169116921954 delta=361
[00000584] main private debug: 3 pts=1169116921874 delta=240
[00000584] main private debug: 3 pts=1169116921914 delta=242
[00000584] main private debug: 2 pts=1169116922074 delta=362
[00000584] main private debug: 3 pts=1169116921994 delta=241
[00000584] main private debug: 3 pts=1169116922034 delta=242
[00000584] main private debug: 1 pts=1169116922194 delta=361
[00000584] main private debug: 3 pts=1169116922114 delta=238
[00000584] main private debug: 3 pts=1169116922154 delta=242
[00000584] main private debug: 2 pts=1169116922314 delta=380
[00000584] main private debug: 3 pts=1169116922234 delta=241
[00000584] main private debug: 3 pts=1169116922274 delta=242
[00000584] main private debug: 2 pts=1169116922434 delta=362
[00000584] main private debug: 3 pts=1169116922354 delta=241
[00000584] main private debug: 3 pts=1169116922394 delta=243
[00000584] main private debug: 2 pts=1169116922554 delta=362
[00000584] main private debug: 3 pts=1169116922474 delta=239
[00000584] main private debug: 3 pts=1169116922514 delta=243
[00000584] main private debug: 1 pts=1169116922674 delta=362
[00000584] main private debug: 3 pts=1169116922594 delta=240
[00000584] main private debug: 3 pts=1169116922634 delta=242
[00000584] main private debug: 2 pts=1169116922794 delta=371
[00000584] main private debug: 3 pts=1169116922714 delta=232
[00000584] main private debug: 3 pts=1169116922754 delta=232
[00000584] main private debug: 2 pts=1169116922914 delta=352
[00000584] main private debug: 3 pts=1169116922834 delta=230
[00000584] main private debug: 3 pts=1169116922874 delta=232
[00000584] main private debug: 2 pts=1169116923034 delta=352
[00000584] main private debug: 3 pts=1169116922954 delta=230
[00000584] main private debug: 3 pts=1169116922994 delta=232
[00000584] main private debug: 1 pts=1169116923154 delta=351
[00000584] main private debug: 3 pts=1169116923074 delta=228
[00000584] main private debug: 3 pts=1169116923114 delta=232
[00000584] main private debug: 2 pts=1169116923274 delta=352
[00000584] main private debug: 3 pts=1169116923194 delta=231
[00000584] main private debug: 3 pts=1169116923234 delta=242
[00000584] main private debug: 2 pts=1169116923394 delta=361
[00000584] main private debug: 3 pts=1169116923314 delta=240
[00000584] main private debug: 3 pts=1169116923354 delta=242
[00000584] main private debug: 2 pts=1169116923514 delta=362
[00000584] main private debug: 3 pts=1169116923434 delta=241
[00000584] main private debug: 3 pts=1169116923474 delta=242

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list