code:
<?php
convertToFlv( "test.avi", "test.flv" );
function convertToFlv( $input, $output ) {
echo "Converting $input to $output<br />";
$command = "mencoder $input -o $output -af volume=10 -aspect 16:9 -of avi -noodml -ovc x264 -x264encopts bitrate=300:level_idc=41:bframes=3:frameref=2: nopsnr: nossim: pass=1: threads=auto -oac mp3lame ";
echo "$command<br />";
shell_exec( $command );
echo "Converted<br />";
}
?>
How about that? Uses the mencoder command you wanted.