[Live-devel] Fwd: [vlc-devel] Problem in livedotcom.cpp

Derk-Jan Hartman hartman at videolan.org
Tue Mar 14 10:48:09 PST 2006

Hi Ross,

I was browsing trough my archives and stumbled upon this one. Do you  
think that such a patch is a good idea?
It actually sounds quite logical to me, since the whole idea is to  
base PCR on "servertime"
However perhaps it can have unexpected effects. I know too little of  
SR RTCP to really know for sure.


Begin forwarded message:

> From: Luca Abeni <lucabe72 at email.it>
> Date: 24 oktober 2005 11:00:08 GMT+02:00
> To: vlc-devel at videolan.org
> Subject: [vlc-devel] Problem in livedotcom.cpp
> Reply-To: vlc-devel at videolan.org
> Hello,
> I am testing vlc to receive RTP streams. In some experiments, I saw  
> that
> vlc has a lot of problems if there is a big jitter in the video  
> frames'
> arrival times.
> For example, in an experiment I introduced a random delay, up to 3
> seconds, on the video packets, and I saw that the video plays "almost
> ok", but the audio is often interrupted - of course, I am pre- 
> buffering
> 3 seconds of stream: the command line I use is
> vlc --rt-priority -vvv --file-caching 3000 stream:test.sdp
> (mp4ip player and QT player both correctly receive and play the  
> stream,
> without problems in the audio or in the video).
> I tried to analyse the problem, and it seems to me that it is  
> caused by
> the way used to update the reference clock in
> modules/demux/livedotcom.cpp: if I understand well, the i_pcr value  
> used
> in
> es_out_Control( p_demux->out, ES_OUT_SET_PCR, i_pcr )
> (in the Demux() function) is computed based on the presentation  
> time of
> the last received frame. This is ok if the jitter in the frame arrival
> time is small, but seems to completely screw the reference clock if
> frames can arrive up to 3 seconds late as in my test.
> I do not know the vlc internals and the live.com code too much
> (basically, I started to study vlc code to fix this problem), so  
> maybe I
> am asking a stupid question... But why is a PTS used to compute the  
> PCR?
> I tried to modify the code to update the reference clock based on the
> NTP time contained in the last received SR RTCP packet, and this seems
> to fix the problem I am seeing. I attach a patch that hopefully shows
> what I mean (with this patch applied, vlc can succesfully play the
> stream with delayed video packets).
> Can someone comment on this patch: is it acceptable? Or am I
> misunderstanding something?
> 			Thanks,
> 				Luca
> -- 
> ______________________________________________________________________ 
> _______
> Copy this in your signature, if you think it is important:
>                                N O    W A R ! ! !

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.live555.com/pipermail/live-devel/attachments/20060314/59b9cb89/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pcr.diff
Type: text/x-patch
Size: 3919 bytes
Desc: not available
Url : http://lists.live555.com/pipermail/live-devel/attachments/20060314/59b9cb89/attachment.bin 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.live555.com/pipermail/live-devel/attachments/20060314/59b9cb89/attachment-0001.html 

More information about the live-devel mailing list