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

// Set our source file
$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

7 Years
Discussion Span
Last Post by gptArun

Most likely not installed properly, do you have a dedicated server?
P.S. If its urgent, don't post it to a forum! People are here for leasure not to solve ur comercial problems


yes having dedicated server,
having business plan from http://hostupon.com/ffmpeg-hosting.html

i use this in ubuntu 8.10 and windows xp with ffmpeg-php.dll and mencoder binary and ffmpeg in the htdoc/mencoder

<?phpflv_convert_get_thumb('input.avi', 'output.jpg', 'output.ogm');// code provided and updated by steve of phpsnaps ! thanks// accepts:// 1: the input video file// 2: path to thumb jpg// 3: path to transcoded mpeg?function flv_convert_get_thumb($in, $out_thumb, $out_vid){  // get thumbnail  $cmd = 'ffmpeg -v 0 -y -i '.$in.' -vframes 1 -ss 5 -vcodec mjpeg -f rawvideo -s 286x160 -aspect 16:9 '.$out_thumb;  $res = shell_exec($cmd);  // $res is the output of the command  // transcode video  $cmd = 'mencoder '.$in.' -o '.$out_vid.' -af volume=10 -aspect 16:9 -of avi -noodml -ovc x264 -x264encopts bitrate=500:level_idc=41:bframes=3:frameref=2: nopsnr: nossim: pass=1: threads=auto -oac mp3lame';  $res = shell_exec($cmd);}?>

'input.avi' is the input video, place a video sample and rename it into input.avi place it next to this script above in same folder and execute the script.

if your provider is using ubuntu this should work.

in windows you just need to put the full path to mencoder and ffmpeg like this C:\xamp\server\htdoc\ffmpeg.exe - i etcc


thanks for replying, but unbuntu is not provided by provider :(

Any other way to solve ffmpeg ??

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.