[MEncoder-users] Garbled sound while transcoding a video

Akshat Aranya aaranya at gmail.com
Sat Oct 13 14:56:43 CEST 2007


On 10/13/07, James Hastings-Trew <jimht at shaw.ca> wrote:
> Akshat Aranya wrote:
> > Hi,
> >
> > I'm trying to use mencoder on Ubuntu Feisty to transcode videos. The
> > video gets transformed OK but the audio is completely garbled. This
> > happens no matter what kind of audio output I choose -- I've tried
> > faac and mp3lame. The only way the audio is okay is if I just use the
> > "-oac copy" option. Also, it does not matter what kind of video I try
> > to transcode. Here's the command line that I'm using:
> >
> > mencoder a.avi -o b.avi -srate 44100 -oac mp3lame -lameopts
> > vbr=0;br=96 -ovc lavc -lavcopts vcodec:mpeg4:vbitrate=96 -vf-add crop
> > 586:352 -vf=add scale=240:144 -ofps 12.5 -ffourcc DIVX -noidx
> > -force-avi-aspect 1.66666
> Try this:
> -af lavcresample=44100 -oac mp3lame -lameopts br=96:cbr
>
> You can also put all of your video filters into one statement:
> -vf crop=586:352,scale=240:144
>
> Also, I am unsure why you want the -noidx option for your avi. Avi files
> without indexes are broken for a lot of applications. Perhaps you really
> want the -noodml option instead?
>
> I could be wrong on this one, but I am under the impression that AVI
> headers do not store aspect ratio information (says so in the MEncoder
> docs in section 13.10) since the PAR of an AVI is always assumed to be 1:1.
>
> One question though - why such ridiculously low bitrates for video?


Thanks for your help.  I finally figured out what was happening.  The
problem was on the audio decoding side, not on the encoding side.
mencoder was using mp3lib to decode the audio which is somehow buggy
on my machine.  I switched to libmad using the -afm option and it
works ok now.

I'm re-encoding my video for my Nokia N800 and I'm using a script
called "770-encode.pl" that has some preset setting for Nokia
770/N800.  The low bitrate for the video looks reasonably OK on a 4"
screen.  I'll experiment with different settings to see what is the
best tradeoff in terms of quality and file size.  I'll also experiment
with the -noodml option as you suggested.

Thanks.



More information about the MEncoder-users mailing list