[MEncoder-users] Mencoder params

Raimund Berger raimund.berger at gmail.com
Wed May 21 17:45:29 CEST 2008


John Doe <jdmls at yahoo.com> writes:

> And, for a mp4 version:
>
> mencoder "$INPUT" -o /dev/null -really-quiet -demuxer 35
>    -of lavf -lavfopts format=mp4
>    -oac faac -faacopts mpeg=4:object=2:raw:br=96 -srate 44100
>    -ovc x264 -x264encopts bitrate=2000:vqscale=5:me=dia:keyint=125:trellis=1:global_header:turbo=1:pass=1
>    -sws 0 -vf harddup
>
> mencoder "$INPUT" -o "$OUTPUT" -really-quiet -demuxer 35
>    -of lavf -lavfopts format=mp4
>    -oac faac -faacopts mpeg=4:object=2:raw:br=96 -srate 44100
>    -ovc x264 -x264encopts bitrate=2000:vqscale=5:me=umh:keyint=125:trellis=1:global_header:pass=2
>    -sws 2 -vf harddup


(1) You don't need to encode audio on the first pass. To save cpu
    cycles, rather use -oac copy

(2) last time I checked, lavf mp4 muxing was broken, although I don't
    recall right now the exact issues it had.
    Either way, most ppl including me use mp4box for muxing. You can
    for example first encode both streams into avi (default), then
    dump both streams and remux

(3) -sws isn't really needed as long as you don't scale the video

(4) "raw" in faacopts prevents remuxing and doesn't have any obvious
    advantage; I wonder how you came up with this

(5) if you aim for (hard/software) playback compatibility, your x264
    encoding options do matter; your's seem kind of arbitrary, I
    recommend checking out the MeGUI profiles (needs Windows though)
    for quicktime/ps3/xbox/whatever compatible profiles

(6) faac generally isn't that great an encoder; I currently use nero,
    which isn't open source but "free as in beer" and runs on linux

Apart from those, your options should be OK for PAL (resp. not
otherwise interlaced or telecined) video exclusively. You might want
to ask yourself though what the pressing reason exactly is for
resampling the audio to 41kHz.



More information about the MEncoder-users mailing list