[MEncoder-users] MEncoder Settings - Pls Help

Nik Martin mencoder at nik-martin.com
Tue Dec 26 15:51:07 CET 2006


On 12/26/06, NHW3W at aol.com <NHW3W at aol.com> wrote:
>
> Can anyone tell me what setting in mecoder I  need to change to encode at
> 41000Hz instead of 48000Hz?
>

> I thought my code (below) WAS setting to  encode at 44100Hz but when I check
> the output it seems to be still at 48000Hz.
>
> Can anyone tell me what setting in mecoder I need to change to encode at
> 41000Hz instead of 48000Hz?
>
>
> **************************************************************
> $mencoderString = "mencoder.exe $stub"."_DVD.mpg -srate 44100 -af
> lavcresample=44100 -oac copy -vf scale=480:320,lavcdeint -sws 2 -ovc lavc  -lavcopts
> vcodec=mpeg4:vhq:vmax_b_frames=2:vbitrate=400:vpass=1 -ofps 30  -ffourcc DX50 -o
> $stub".".avi";
> _print_ (http://forums.afterdawn.com/thread_view.cfm/401584#)
> $mencoderString ."\n";
> `$mencoderString`;
> $mencoderString = "mencoder.exe $stub"."_DVD.mpg -srate 44100 -af
> lavcresample=44100 -oac mp3lame -lameopts mode=3:preset=128:aq=0 -vf
> scale=480:320,lavcdeint -sws 2 -ovc lavc -lavcopts
> vcodec=mpeg4:vhq:vmax_b_frames=2:vbitrate=400:vpass=2 -ofps 30 -ffourcc DX50 -o
> **********************************************************************
>
>From my experience with mencoder, I would change the script in a couple of ways:
pass 1 will run a LOT faster if you only use pass one to gather statistics.
also, you are using lame AND the built in lavc - I'd jusy us elame to
do all your audio resampling/encoding. And, I get GREAT reults using
XVID for all video encoding and compression:

#pass 1, video only
mencoder -oac copy -ovc xvid -xvidencopts pass=1 [MyVideo].avi -o /dev/null

#Then pass 2:
#video + audio track (pass: 2)
mencoder -oac mp3lame -lameopts mode=1:cbr:br=96:vol=2 -srate 44100
-ovc xvid -xvidencopts vhq=4:trellis:pass
=2:bitrate=800 -sws 1 -vf scale=480:320,pullup,pp=md [Input.avi] -o [output].AVI


using lame, the -srate parameter will be passed to the lame encoder as
the frequency to resample to.  I have no idea why it's not part of
lameopts, but it's not.

regards,
nik



More information about the MEncoder-users mailing list