Using Mencoder Profiles

Posted by admin on January 21, 2011 under Tech Tips | 5 Comments to Read

Here’s a quick tip on using Mencoder profiles that serve as shortcuts for all of your favorite settings. This can save you a lot of time, especially when your encoding syntax is lengthy and difficult to remember.

Profiles are stored in the mencoder.conf file located in the appropriate place for your operating system. For Linux users, you can create a personalized file in your own home directory, ~/.mplayer/mencoder.conf.

Here’s the syntax you might use on a single-pass XviD project without using profiles.

mencoder -oac mp3lame -lameopts aq=0:q=0 -ovc xvid -xvidencopts \
fixed_quant=2:max_key_interval=25:vhq=2:bvhq=1:chroma_opt:quant_type=mpeg \
input.avi -o output.avi

Compare that with the following examples of some of my favorite profiles, and how easy it is to use them.

XviD Single-pass Profile Example

[xvid]
profile-desc="MPEG4/MP3 encoding"
ovc=xvid=1
xvidencopts=fixed_quant=2:max_key_interval=25:vhq=2:bvhq=1:chroma_opt=1:quant_type=mpeg
oac=mp3lame=1
lameopts=aq=0:q=0

mencoder -profile xvid input.avi -o output.avi

XviD 2-pass Profile Examples

[xvid-pass1]
profile-desc="MPEG4/MP3 encoding - PASS 1"
ovc=xvid=1
xvidencopts=pass=1:max_key_interval=25:turbo=1:vhq=0
nosound=1
o=/dev/null
passlogfile=xvid-pass1.log

[xvid-pass2]
profile-desc="MPEG4/MP3 encoding - PASS 2"
ovc=xvid=1
xvidencopts=pass=2:max_key_interval=25:vhq=2:bvhq=1:chroma_opt=1:quant_type=mpeg:bitrate=2000
oac=mp3lame=1
lameopts=aq=0:q=0
passlogfile=xvid-pass1.log

mencoder -profile xvid-pass1 input.avi
mencoder -profile xvid-pass2 input.avi -o output.avi

x264 2-pass Profile Examples

[x264-pass1]
profile-desc="x264 encoding - PASS 1"
ovc=x264=1
x264encopts=pass=1:threads=0:subq=1:frameref=1:bframes=3:b_pyramid=normal:weight_b=1:keyint=25
nosound=1
o=/dev/null
passlogfile=x264-pass1.log

[x264-pass2]
profile-desc="x264 encoding - PASS 2"
ovc=x264=1
x264encopts=pass=2:threads=0:subq=6:frameref=5:partitions=all:8x8dct=1:me=umh:bframes=3:b_pyramid=normal:weight_b=1:keyint=25:bitrate=2000
oac=mp3lame=1
lameopts=aq=0:q=0
passlogfile=x264-pass1.log

mencoder -profile x264-pass1 input.avi
mencoder -profile x264-pass2 input.avi -o output.avi

x264 Single-pass Profile Example

[x264]
profile-desc="x264 encoding"
ovc=x264=1
x264encopts=crf=20:threads=0:subq=6:frameref=5:partitions=all:8x8dct=1:me=umh:bframes=3:b_pyramid=normal:weight_b=1:keyint=25
aspect=16/9
oac=mp3lame=1
lameopts=aq=0:q=0

mencoder -profile x264 input.avi -o output.avi

Be Sociable, Share!

Comments

  • visitor said,

    And in Windows where is located mencoder.conf ?

  • gmendoza said,

    It’s in the same directory as mencoder.exe. For some that may be: c:\mplayer\mplayer\.

  • Rob said,

    When I run a sample script, I get an error:
    Unknown profile ‘xvid’.
    Error parsing option on the command line: -profile
    I am a linux novice, please tel me what I’m doing wrong.

  • gmendoza said,

    It looks like you may be missing something from the profile during your copy and paste.

    In your home folder, there is a hidden folder “.mencoder”. In this folder there should be a file “mencoder.conf”. If not, copy and paste the profile for [xvid] in the file and save it as mencoder.conf. If it does exist, just clear it would and again, copy and paste the example and save it.

  • totor said,

    The use of profiles in Windows really problematic!

    mencoder.conf in the same directory as mencoder (if that was the most logical) does not work

    mencoder.conf in C:\Users\Session-Name does not work

    Same for C:\Users\Session-Name\.mencoder and C:\Users\Session-Name\.mplayer

    There he will finally have someone who will give the ACCRUATE procedure to use profiles in Windows???

Add A Comment

You must be logged in to post a comment.