#!/bin/sh
#usage: sh x264.sh input_file output_file video_bitrate audio_bitrate
#video codec: x264 git (2009.09.12)
#audio codec: faac 1.28

mencoder \
	-ovc x264 -x264encopts subq=6:partitions=all:8x8dct:me=umh:frameref=5:bframes=3:b_pyramid:weight_b:bitrate=$3:threads=2 \
	-oac faac -faacopts br=$4:mpeg=4:object=2 -channels 2 -srate 48000 \
	-o $2 $1

