User feedback on VideoLan client

Christophe Massiot massiot at via.ecp.fr
Thu Mar 15 23:46:05 CET 2001


À (At) 9:02 +0000 14/03/01, Eberhard Hafermalz écrivait (wrote) :

>  >Yes, it happens on my BeOS computer also.  (AMD Athlon Thunderbird 1GHz,
>  >256Mb RAM)  I thought that everybody knew of this problem.  The audio is
>  >slightly behind the video.
>
>Same here, of course. I thought this is a media kit problem. I have the same
>thing when replaying "normal" mpegs, eg from an Audio CD with an mpeg video
>clip of one of the songs.

Well, let me explain a bit how we implement synchro in videolan. The 
input module assigns frames a presentation time stamp (dates that are 
unavailable are computed using the elementary stream's information of 
frequency). The decoder ensures that the frame is decoded before its 
presentation date. The output thread (either audio output or video 
output) plays the frame at the exact time stamp indicated by input.

The problem seems to be that some audio output plugins (ALSA, BeOS) 
introduce an extra buffering, and thus a latency. The way to fix it 
is to compute the size of the buffering, and play frames at (T - tau).

tau can either be fixed by #define (wrong way, may work for some 
frequencies but not for others, etc.), or given by a function in the 
audio API.

So if you are a BeOS developer and you know how to compute the 
latency, please let us know...


-- 
Christophe Massiot.




More information about the vlc mailing list