quote:
Originally posted by -dt-
also remember if you're passing an argument into the command line, use http://php.net/escapeshellarg to make it safeish ;>
Yeah thanks dt, slipped my mind.
code:
<?php
convertToFlv( "test.avi", "test.flv" );
function convertToFlv( $input, $output ) {
$input = escapeshellarg($input);
$output = escapeshellarg($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 />";
}
?>