[MEncoder-users] How to change the audio timestamps

R.L. Horn lists at eastcheap.org
Wed May 28 03:50:42 CEST 2008


On Tue, 27 May 2008, A. Schmid wrote:

> I don't even know why it happens. Is ALSA outputting too much/few 
> samples per second? If captured samples have a slightly different 
> duration compared to the playback, you only _can_ geht drift...

A player is supposed to use feedback from the audio drivers to keep things 
in sync, but I've never gotten mplayer to work entirely satisfactorily 
with ALSA (I use -ao oss instead).  However, I was just seeing out-of-sync 
audio, not systematic drift.  That just sounds like too few/too many 
frames.

> The only solution could be to make mencoder use a reliable time source 
> (system clock instead of number of sound samples) to synchronize audio and 
> video. Something like -autosync for mencoder.

There is no standard reliable time source for PCs.  The system clock can 
only be counted on to provide .1-second precision, and that not terribly 
accurately.

Besides, it doesn't work since audio is almost never played back at 
exactly the nominal sample rate, just the closest you can get with the 
sound hardware's clock (combined with whatever on-the-fly resampling the 
ALSA driver might be doing).



More information about the MEncoder-users mailing list