[MEncoder-users] Bad timestamps from lavc audio encodings in AVI container
Robert Nichols
rnicholsNOSPAM at comcast.net
Tue Apr 29 22:19:48 CEST 2008
With any recent mencoder (anything newer that 1.0rc1) I get what
appears to be crazy timestamps on the audio packets whenever I
use "-oac lavc" with "-of avi". Because of the bad timestamps,
seeking in the resulting stream is impossible. If I run
mencoder -oac lavc -ovc lavc -of avi zap.mpg -o test.avi
then the messages I see when playing look like this:
$ /usr/local/bin/mplayer test.avi 2>&1 | tr '\r' '\n'
MPlayer dev-SVN-r26551-4.1.2 (C) 2000-2008 MPlayer Team
CPU: Intel(R) Pentium(R) 4 CPU 3.00GHz (Family: 15, Model: 4, Stepping: 9)
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
Playing test.avi.
AVI file format detected.
[aviheader] Video stream found, -vid 0
[aviheader] Audio stream found, -aid 1
VIDEO: [FMP4] 352x240 24bpp 29.970 fps 843.4 kbps (103.0 kbyte/s)
Clip info:
Software: MEncoder dev-SVN-r26551-4.1.2
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 44100 Hz, 2 ch, s16le, 224.0 kbit/15.87% (ratio: 28000->176400)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
AO: [oss] 44100Hz 2ch s16le (2 bytes per sample)
Starting playback...
VDec: vo config request - 352 x 240 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.47:1 - prescaling to correct movie aspect.
VO: [xv] 352x240 => 352x240 Planar YV12
A: 267.2 V: 0.0 A-V:267.179 ct: 0.000 1/ 1 ??% ??% ??,?% 0 0
A: 305.3 V: 0.0 A-V:305.313 ct: 0.003 2/ 2 ??% ??% ??,?% 0 0
A: 305.3 V: 0.1 A-V:305.283 ct: 0.007 3/ 3 ??% ??% ??,?% 0 0
A: 305.4 V: 0.1 A-V:305.262 ct: 0.010 4/ 4 ??% ??% ??,?% 0 0
A: 324.5 V: 0.1 A-V:324.354 ct: 0.013 5/ 5 ??% ??% ??,?% 0 0
A: 324.5 V: 0.2 A-V:324.351 ct: 0.017 6/ 6 ??% ??% ??,?% 0 0
A: 362.7 V: 0.2 A-V:362.512 ct: 0.020 7/ 7 ??% ??% ??,?% 0 0
A: 400.9 V: 0.2 A-V:400.648 ct: 0.023 8/ 8 ??% ??% ??,?% 0 0
A: 400.9 V: 0.3 A-V:400.644 ct: 0.027 9/ 9 ??% ??% ??,?% 0 0
A: 439.1 V: 0.3 A-V:438.809 ct: 0.030 10/ 10 ??% ??% ??,?% 0 0
...
The audio and video are playing just fine and are properly synchronized,
but if I try to seek ahead or back in the stream, the demuxer believes
the timestamps and the audio seeks to the wrong point.
The mencoder input file format does not seem to matter. I get this bad
result from the default codec (mp2) and also from acodec=ac3. Codecs
wmv1 and wmv2 seem to work OK. If I get away from lavc and use
"-oac pcm" all is well.
The problem seems to be in the file, not in mplayer. All versions of
mplayer (1.0rc1, 1.0rc2, current SVN) behave the same when playing the
resulting files.
To see if something in my build environment is causing this, I've tried
rebuilding 1.0rc1 from source. It works just fine. If I build 1.0rc2
or any recent Subversion snapshot, I get the above problem.
Am I doing something wrong here? I find it hard to believe that this
bug could have existed since 1.0rc2 without getting a lot of complaints.
I've attached the output from ./configure.
--
Bob Nichols "NOSPAM" is really part of my email address.
Do NOT delete it.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: config.out
URL: <http://lists.mplayerhq.hu/pipermail/mencoder-users/attachments/20080429/453cacfa/attachment.txt>
More information about the MEncoder-users
mailing list