try this :
Code:
mencoder.exe %1 -vf harddup-ovc x264 -x264encopts crf=18:frameref=3:bframes=3:b_pyramid:direct_pred=auto:weight_b:partitions=all:8x8dct:me=umh:mixed_refs:brdo:bime:trellis=1:nopsnr:nossim:subq=6:level_idc=41:threads=auto -nosound -of rawvideo -o "%~dpn1.crf.264"