Opened 14 years ago

Last modified 13 years ago

#1603 new defect

MENCODER: Sound problems trying to convert from anything to 3gp w/amrnb

Reported by: sebastianlacuesta@… Owned by: reimar
Priority: important Component: core
Version: unspecified Severity: major
Keywords: Cc: dashing.meng@…
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

Hi, I'm trying to encode a given movie to 3gp using the following line:

mencoder input_file.ext -o output_file.3gp -of lavf -oac lavc -ovc lavc -srate 8000 -vf scale=176:144 -ofps 12 -af channels=1 -lavcopts vcodec=h263:acodec=libopencore_amrnb:abitrate=12200

Video looks awesome, but sound seems to be really accelerated, and of course it finishes before the video. Any video with sound I try gives this problem.

I'm using debian packages from debian-multimedia.org. Version is: 1:1.0.rc2svn20091101. Six months ago I tried to do the same but I had the same problem here described.
Thanks!

Change History (7)

comment:1 by reimar, 14 years ago

What did you try playing it with? Some mobile phone or MPlayer?
If MPlayer try e.g. -srate 44100 or -srate 48000 or -ao oss for playback.
If that helps, ALSA is once again having the very same bug.

comment:2 by sebastianlacuesta@…, 14 years ago

I tested before with mplayer -ao pulse. But now I tested in a Sony Ericsson K320i and in a Nokia 5800 XM, booth have the same issues as mplayer.

comment:3 by sebastianlacuesta@…, 14 years ago

I have to add that the problem was present before the switch to libopencore_amr, when mencoder used the old libamr

comment:4 by sebastianlacuesta@…, 14 years ago

Does anyone know where am I wrong? Any workarounds? Do we have to wait for a fix? :D

comment:5 by dashing.meng@…, 13 years ago

Cc: dashing.meng@… added

I had met the same question.

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.

Two environment, the same results:

1, ASUS EEEPC 900HA(ATOM CPU N270), Ubuntu 10.10, MPlayer SVN-r33081-4.4.5, opencore-amr-0.1.2, the command is below:

/usr/local/bin/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 test10s.r33081.h263.openamrnb.3gp test10s.avi

2, Vmware virtual machine(Core(TM)2 Duo CPU E7400), Ubuntu 10.04, MPlayer-1.0rc3, amrnb-7.0.0.2 come from http://www.penguin.cz/~utx/amr, the command is below:

/usr/local/bin/mencoder -noconfig all -oac lavc -ovc lavc -lavcopts vcodec=h263:vbitrate=200:acodec=libamr_nb:abitrate=10200 -of lavf -ofps 15 -srate 8000 -vf scale=176:144 -af lavcresample=8000,channels=1,volnorm -o test10s.rc3.h263.amrnb.3gp test10s.avi

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 .

comment:6 by dashing.meng@…, 13 years ago

Priority: normalimportant
Severity: normalmajor

The function is wrong, I consider it is an important and major bug.

comment:7 by dashing.meng@…, 13 years ago

Hi,
Maybe I found a clue of why the error happened.
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)

Note: See TracTickets for help on using tickets.