hello there,
need urgent help in ffmpeg, shows no error. but not working for me :(
i tried out so many examples, after that i found below code -
ffmpeg and other paths are also fine. our hosting is from - www.hostupon.com
<?php
define('PHPVIDEOTOOLKIT_EXAMPLE_ABSOLUTE_BATH', dirname(__FILE__).DIRECTORY_SEPARATOR);
// Set our source file
$srcFile = PHPVIDEOTOOLKIT_EXAMPLE_ABSOLUTE_BATH."robot.avi";
$destFile = PHPVIDEOTOOLKIT_EXAMPLE_ABSOLUTE_BATH."robot.flv";
$ffmpegPath = "/usr/local/bin/ffmpeg";
$flvtool2Path = "/usr/local/bin/flvtool2";
// Create our FFMPEG-PHP class
$ffmpegObj = new ffmpeg_movie($srcFile);
// Save our needed variables
echo $srcWidth = makeMultipleTwo($ffmpegObj->getFrameWidth());
echo $srcHeight = makeMultipleTwo($ffmpegObj->getFrameHeight());
echo $srcFPS = $ffmpegObj->getFrameRate();
echo $srcAB = intval($ffmpegObj->getAudioBitRate()/1000);
echo $srcAR = $ffmpegObj->getAudioSampleRate();
echo "<br/>";
// Call our convert using exec()
echo exec($ffmpegPath . " -i " . $srcFile . " -ar " . $srcAR . " -ab " . $srcAB . " -f flv -s " . $srcWidth . "x" . $srcHeight . " " . $destFile . " | " . $flvtool2Path . " -U stdin " . $destFile);
// Make multiples function
function makeMultipleTwo ($value)
{
$sType = gettype($value/2);
if($sType == "integer")
{
return $value;
} else {
return ($value-1);
}
}?>
pls. reply ASAP
Arun