[MPlayer-users] Audio sync problem with mencoder and ogmmerge

Eric Potter ericp at earthlink.net
Thu Dec 5 20:04:02 CET 2002


Mencoder and ogmmerge do not seem to be communicating the same
frame rate when I encode a theatrical release from dvd.  I followed
the instructions from http://www.bunkus.org/videotools/ogmtools/

cat *.vob | mencoder - -ovc frameno -oac pcm -o frameno.avi
cat *.vob | mplayer - -vc dummy -vo null -hardframedrop -ao pcm -aofile
audio.wav
normalize audio.wav
oggenc -q 1 audio.wav -o audio.ogg
cat *.vob | nice mencoder - -oac copy -vop
scale=640:-2,crop=708:362:6:56,pp=lb -ovc lavc -o Film.avi -lavcopts
vcodec=mpeg4:vhq:v4mv:vqmin=2:vqmax=30:vbitrate=1400:vpass=1
cat *.vob | nice mencoder - -oac copy -vop
scale=640:-2,crop=708:362:6:56,pp=lb -ovc lavc -o Film.avi -lavcopts
vcodec=mpeg4:vhq:v4mv:vqmin=2:vqmax=30:vbitrate=1400:vpass=2
ogmmerge -o Film.ogm -A Film.avi audio.ogg

When I play back the resulting ogm with mplayer, the audio 
quickly begins to lag the video.  It appears that the video
is playing at 30 fps and the audio is playing at 24 fps.

Cache fill:  0.00% (0 bytes)    Detected OGG file format!
==========================================================================
Opening audio decoder: [libvorbis] Ogg/Vorbis audio decoder
AUDIO: 48000 Hz, 2 ch, 16 bit (0x10), ratio: 10000->192000 (80.0 kbit)
Selected audio codec: [vorbis] afm:libvorbis (OggVorbis Audio Decoder)
==========================================================================
vo: X11 running at 1280x960 with depth 24 and 32 bpp (":0.0" => local
display)
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm:ffmpeg (FFmpeg MPEG-4)
==========================================================================
SDL: Samplerate: 48000Hz Channels: Stereo Format Signed 16-bit
(Little-Endian)
AO: [sdl] 48000Hz 2ch Signed 16-bit (Little-Endian)
Building audio filter chain for 48000Hz/2ch/16bit ->
48000Hz/2ch/16bit...
Start playing...
This file was encoded with libavcodec build 4640
VDec: vo config request - 640 x 368 (preferred csp: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.74:1 - prescaling to correct movie aspect.
VO: [xv] 640x368 => 640x368 Planar YV12 
A: 164.4 V: 180.4 A-V:-16.015 ct:-11.174  4592/4592  11%  6%  2.6% 0 0
49%
As you can see from the output, the audio is 16 seconds slow after
3 minutes of play.  However, I can use -fps 24 and the file will
play back correctly.  I do not have this problem when using NTSC
source material.  Versions:
ogmtools-0.960
MPlayer-0.90pre10
MPlayer-20021128




More information about the MPlayer-users mailing list