[MEncoder-users] Mencoder Voice De-Sync with MP3 Audio Codec

Gary C. New garycnew at yahoo.com
Wed Nov 29 00:41:59 CET 2006


I am trying to transcode several .MOV files taken with
our Nikon digital camera to filtered MPEG files.

The main reason for transcoding is due to a number of
the .MOV files being taken in a profile (480x640)
style orientation (opposed to the normal landscape
view).

With the help of the mencoder docs and several
examples found on Google, I was able to figure out the
necessary video filters to rotate and scale the
effected videos.

The only issue that remains is an eventual audio
de-sync after roughly 5 minutes of play with the
transcoded file (I have verified the de-sync on
several machines).

I am trying to transcode using the lavc codec for mp3
audio and mpeg2 video.

mencoder test.mov -oac lavc -ovc lavc -of mpeg
-mpegopts format=dvd:tsaf -vf
rotate=1,expand=853:640,scale=640:480,harddup -mc 0
-noskip -srate 48000 -af lavcresample=48000 -lavcopts
vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=18:acodec=mp3:abitrate=192
-fps 30000/1001 -o test.mpg

MEncoder dev-CVS-050928-16:38-3.4.2 (C) 2000-2005
MPlayer Team
CPU: Intel Pentium 4/Xeon/Celeron Foster (Family: 8,
Stepping: 4)
Detected cache-line size is 64 bytes
CPUflags: Type: 8 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0
SSE: 0 SSE2: 0
Compiled with runtime CPU detection - WARNING - this
is not optimal!
To get best performance, recompile MPlayer with
--disable-runtime-cpudetection.
success: format: 0  data: 0x0 - 0x27cbea5c
Quicktime/MOV file format detected.
--------------
MOV track #0: 458 chunks, 13740 samples
Image size: 640 x 480 (24 bpp)
Display size: 640 x 480
Fourcc: jpeg  Codec: 'Photo - JPEG'
--------------
MOV track #1: 458 chunks, 0 samples
Audio bits: 8  chans: 1  rate: 8000
Fourcc: raw
--------------
MOV: longest streams: A: #1 (458 samples)  V: #0
(13740 samples)
VIDEO:  [jpeg]  640x480  24bpp  30.000 fps    0.0 kbps
( 0.0 kbyte/s)
[V] filefmt:7  fourcc:0x6765706A  size:640x480 
fps:30.00  ftime:=0.0333
input fps will be interpreted as 29.97 instead
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio
decoder
AUDIO: 8000 Hz, 1 ch, u8, 64.0 kbit/100.00% (ratio:
8000->8000)
Selected audio codec: [pcm] afm:pcm (Uncompressed PCM)
==========================================================================
PACKET SIZE: 2048 bytes
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000,
round: 1
Opening video filter: [harddup]
Opening video filter: [scale w=640 h=480]
Opening video filter: [expand w=853 h=640]
Expand: 853 x 640, -1 ; -1, osd: 0, aspect: 0.000000,
round: 1
Opening video filter: [rotate=1]
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec
codec family
Selected video codec: [ffmjpeg] vfm:ffmpeg (FFmpeg
MJPEG decoder)
==========================================================================
Building audio filter chain for 8000Hz/1ch/u8 ->
48000Hz/0ch/??...
Building audio filter chain for 8000Hz/1ch/u8 ->
48000Hz/1ch/s16le...
Writing AVI header...
Limiting audio preload to 0.4s
Increasing audio density to 4
VDec: vo config request - 640 x 480 (preferred csp:
Planar 422P)
Could not find matching colorspace - retrying with -vf
scale...
Opening video filter: [scale]
VDec: using Planar 422P as output csp (no 1)
Movie-Aspect is undefined - no prescaling applied.

SwScaler: BICUBIC scaler, from Planar 422P to Planar
444P using MMX2
videocodec: libavcodec (640x480 fourcc=3267706d
[mpg2])
New_Face failed. Maybe the font path is wrong.
Please supply the text font file
(~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
INITIAL DELAY of 0 frames  17fps Trem:   0min   0mb 
A-V:0.000 [0:0]
Pos: 458.5s  13740f ( 0%)  18fps Trem:   0min   0mb 
A-V:0.000 [4993:192]
Flushing video frames

Writing AVI index...

Overhead: 1.720% (5112909 / 0)
Fixing AVI header...

Video stream: 4993.592 kbit/s  (624198 B/s)  size:
286169011 bytes  458.458 secs
  13740 frames

Audio stream:  192.000 kbit/s  (24000 B/s)  size:
11013120 bytes  458.880 secs

Before using the "-mc 0 -noskip" options, the A/V
de-sync was apparent from the very beginning.  Adding
the "-mc 0 -noskip" options corrected the issue to
this point where de-sync begins about 5 minutes into
the video.

I have also tried using the mp3lame audio codec with
the same result.

mencoder test.mov -oac mp3lame -lameopts cbr:br=192
-ovc lavc -of mpeg -mpegopts format=dvd:tsaf -vf
rotate=1,expand=853:640,scale=640:480,harddup -mc 0
-noskip -srate 48000 -af lavcresample=48000 -lavcopts
vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=18
-fps 30000/1001 -o test.mpg

I would prefer to use an mp3 audio codec.

Any suggestions?  Your assistance is greatly
appreciated.

Respectfully,


Gary


 
____________________________________________________________________________________
Yahoo! Music Unlimited
Access over 1 million songs.
http://music.yahoo.com/unlimited



More information about the MEncoder-users mailing list