[MEncoder-users] Audio drift in mencoder 1.0rc2

David Santinoli marauder at tiscali.it
Mon Feb 25 11:52:26 CET 2008


Hi,
  I've encoded a few files from a DVB TS (read from the /dev/.../dvr0
device) using the 1.0rc2 mencoder (-ovc lavc -oac lavc -lavcopts
vcodec=mpeg4).  When playing back the encoded files, audio slowly drifts
away (get progressively delayed) from video.  In the status line, the
audio position gets incremented extremely quickly (around 600-700 units
per second), the "ct" field increases by roughly 0.1 each second, while
the video position is correct.

The version of mplayer used for playback is not relevant.
The version of mencoder used for encoding _does_ matter, as this
only happens with -rc2 and later releases (including the day before
yesterday's SVN).

Running "mplayer -v" I could spot a small difference in the output:

File encoded with mencoder 1.0rc1:

======= WAVE Format =======
Format Tag: 80 (0x50)
Channels: 2
Samplerate: 48000
avg byte/sec: 28000
Block align: 672
bits/sample: 0
cbSize: 0


File encoded with mencoder >=1.0rc2:

======= WAVE Format =======
Format Tag: 80 (0x50)
Channels: 2
Samplerate: 48000
avg byte/sec: 28000
Block align: 1
bits/sample: 0
cbSize: 0

The "Block align" value is different.  Does this have something to do
with the audio drift problem?

Is there any way to "fix" the badly encoded files?

A (fragment of a) sample file is available at
http://www.santinoli.com/drift.avi .

Thanks,
 David



More information about the MEncoder-users mailing list