hi. i'm using this code for video convert mp4 to flv. but out put come in 0kb. <?php $srcFile = "upload_v/El-Bahia-Video.mp4"; $destFile = "upload_v/El-Bahia-Video.flv"; $ffmpegPath = "/usr/bin/ffmpeg"; $flvtool2Path = "/usr/bin/flvtool2"; // Create our FFMPEG-PHP class $ffmpegObj = new ffmpeg_movie($srcFile); // Save our needed variables $srcWidth = makeMultipleTwo($ffmpegObj->getFrameWidth()); $srcHeight = makeMultipleTwo($ffmpegObj->getFrameHeight()); $srcFPS = $ffmpegObj->getFrameRate(); $srcAB = intval($ffmpegObj->getAudioBitRate()/1000); $srcAR = $ffmpegObj->getAudioSampleRate(); // Call our convert using exec() //exec($ffmpegPath . " -i " . $srcFile . " -ar " . $srcAR . " -ab " . $srcAB . " -f flv -s " . $srcWidth . "x" . $srcHeight . " " . $destFile . " | " . $flvtool2Path . " -U stdin " . $destFile); /*exec($ffmpegPath." -i " . $srcFile ." -ar " . 22050 ." -ab ". 32 . " -f flv -s " . $srcWidth . "x" . $srcHeight .$destFile);*/ // Make multiples function function makeMultipleTwo ($value) { $sType = gettype($value/2); if($sType == "integer") { return $value; } else { return ($value-1); } } ?>
hi.. i want to convert video in php and use ffmpeg for video convert. how can we get proper out put. i'm using above code for video convert.