[MEncoder-users] Can't encode amr audio correctly when convert avi to 3gp with mencoder (new clue maybe found)

littlebat dashing.meng at gmail.com
Wed Apr 6 04:03:01 CEST 2011


Hi,

I am a newbie to mencoder and this email list.

I try to convert an AVI file to 3GP with AMR Narrow Band encoder, but
every time it end with the audio duration is too shorter than video
duration. The video duration is 10 seconds and the audio duration is
about 2 second in my tests. I have played them on mplayer in Linux or
other player in Windows, the result is same.

I think it's a mencoder bug as someone report at:
http://bugzilla.mplayerhq.hu/show_bug.cgi?id=1603 (MENCODER: Sound
problems trying to convert from anything to 3gp w/amrnb)

I compiled Mplayer and AMR encoder from source.

I have attached the source file "test10s.avi" and two convert result
files "test10s.r33081.h263.openamrnb.3gp" and
"test10s.rc3.h263.amrnb.3gp" in a compressed file "testmencoder.zip".
You can get this attachment from:
http://www.learndiary.com/upload/2011/03/testmencoder.zip .

When I encoded a movie, it reported such as "[3gp @ 0xbe3bc0]Codec for
stream 0 does not use global headers but container format requires
global headers [3gp @ 0xbe3bc0]Codec for stream 1 does not use global
headers but container format requires global headers". But, I'm not
sure and haven't the ability to fix this bug.

the detail as below:

mencoder -noconfig all -oac lavc -ovc lavc -lavcopts
vcodec=h263:vbitrate=200:acodec=libopencore_amrnb:abitrate=10200 -of
lavf -ofps 15 -srate 8000 -vf scale=176:144 -af
lavcresample=8000,channels=1,volnorm -o fullmetal.mencoder.3gp F*.mkv
MEncoder SVN-r33197-4.5.2 (C) 2000-2011 MPlayer Team
success: format: 0  data: 0x0 - 0x248605
libavformat file format detected.
[wmv3 @ 0x99412f0] WMV3 Complex Profile is not fully supported
[matroska,webm @ 0x99335f0] Estimating duration from bitrate, this may
be inaccurate
[lavf] stream 0: video (wmv3), -vid 0
[lavf] stream 1: audio (aac), -aid 0
VIDEO:  [WMV3]  640x480  0bpp  23.976 fps    0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:44  fourcc:0x33564D57  size:640x480  fps:23.976
ftime:=0.0417
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders AUDIO:
48000 Hz, 2 ch, s16le, 0.0 kbit/0.00% (ratio: 0->192000) Selected audio
codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
** MUXER_LAVF
*****************************************************************
REMEMBER: MEncoder's libavformat muxing is presently broken and can
generate INCORRECT files in the presence of B-frames. Moreover, due to
bugs MPlayer will play these INCORRECT files as if nothing were wrong!
*******************************************************************************
OK, exit. Opening video filter: [expand osd=1] Expand: -1 x -1, -1 ;
-1, osd: 1, aspect: 0.000000, round: 1 Opening video filter: [scale
w=176 h=144]
==========================================================================
Opening video decoder: [dmo] DMO video codecs DMO dll supports VO
Optimizations 0 1 DMO dll might use previous sample when requested
Decoder supports the following formats: YV12 YUY2 UYVY YVYU RGB8 RGB555
RGB565 RGB24 RGB32 
Decoder is capable of YUV output (flags 0x1b)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
[swscaler @ 0x4ffdc0]BICUBIC scaler, from yuv420p to yuv420p using MMX2
videocodec: libavcodec (176x144 fourcc=33363268 [h263])
Selected video codec: [wmv9dmo] vfm: dmo (Windows Media Video 9 DMO)
==========================================================================
VIDEO CODEC ID: 5
AUDIO CODEC ID: 12000, TAG: 0
Writing header...
[3gp @ 0xbe3bc0]Codec for stream 0 does not use global headers but
container format requires global headers
[3gp @ 0xbe3bc0]Codec for stream 1 does not use global headers but
container format requires global headers
Pos:   0.1s      2f (30%)  0.00fps Trem:   0min   0mb  A-V:0.004 [0:0]

Skipping frame!
Pos:   0.3s      5f (30%)  0.00fps Trem:   0min   0mb  A-V:0.017 [0:0]

Skipping frame!
Pos:   0.4s      8f (30%)  0.00fps Trem:   0min   0mb  A-V:0.029 [0:0]

...(omitted)

Thanks.

littlebat


More information about the MEncoder-users mailing list