convert video files into .flv using ffmpeg
Posted: Tue Jul 08, 2008 6:07 am
Hi All,
I convert the video files into .flv format in cmd by using ffmpeg.Whether i did it in my php file i didnot get the converted file.Please tell me how i can use cmd in my file.Here is my code..
<?
$srcFile = "/FFmpeg/monkeydog.wmv";
$destFile = "/FFmpeg/mn.flv";
$ffmpegPath = "/FFmpeg/ffmpeg";
echo exec('cmd /c echo Hello World!');
exec($ffmpegPath . " -i " . $srcFile . " -ar 22050 -ab 32 -f flv -s 420 * 320 " . $destFile);
//$x=exec('cmd /c ffmpeg.exe -i monkeydog.wmv -ar 22050 -ab 32 -f flv -s 320×240 video2.flv');
//exec("/usr/local/bin/ffmpeg -i /your/dir/uploadedfile.flv -an -ss 00:00:03 -an -r 2 -vframes 1 -y /your/dir/%d.jpg");
// Make multiples function
?>
I convert the video files into .flv format in cmd by using ffmpeg.Whether i did it in my php file i didnot get the converted file.Please tell me how i can use cmd in my file.Here is my code..
<?
$srcFile = "/FFmpeg/monkeydog.wmv";
$destFile = "/FFmpeg/mn.flv";
$ffmpegPath = "/FFmpeg/ffmpeg";
echo exec('cmd /c echo Hello World!');
exec($ffmpegPath . " -i " . $srcFile . " -ar 22050 -ab 32 -f flv -s 420 * 320 " . $destFile);
//$x=exec('cmd /c ffmpeg.exe -i monkeydog.wmv -ar 22050 -ab 32 -f flv -s 320×240 video2.flv');
//exec("/usr/local/bin/ffmpeg -i /your/dir/uploadedfile.flv -an -ss 00:00:03 -an -r 2 -vframes 1 -y /your/dir/%d.jpg");
// Make multiples function
?>