[Live-devel] Synchronization drift

Ross Finlayson finlayson at live.com
Thu Dec 2 15:46:51 PST 2004


>I am using testMPEG1or2AudioVideoStreamer to stream an MPEG2 file 
>generated from a PVR-250. The streaming works fine, but the 
>synchronization between audio and video drifts over time. The only 
>references I have found for this are those that say it is the players 
>fault. I have tried playing this stream on VLC/Mac and mplayer for linux. 
>Both exhibit the problem (though mplayer _reports_ that the A-V is in sync).
>
>I know there are several timestamps going into this (RTP and 
>presentation). Is it possible that the code has some sort of roundoff 
>error or somthing that is causing the drift???

Actually, yes, roundoff error is possible, because of the way that 
presentation times for audio frames are currently calculated (in 
"MPEG1or2AudioStreamFramer").  The audio presentation times are computed by 
successive adding of the audio frame duration - but the audio frame 
duration is precise only to 1 us resolution.  (Video, OTOH, isn't a 
problem, because for video - unlike audio - the presentation time 
information is present inside the MPEG video stream itself.)

How long does your stream play before you notice A/V getting out of 
sync.  (The problem that I'm thinking of should not become noticeable until 
at least an hour or so has elapsed.)


	Ross Finlayson
	LIVE.COM
	<http://www.live.com/>



More information about the live-devel mailing list