Jump to content

ffMPEG error


Recommended Posts

hi all, i m new to ffmpeg. I m converting a video file but unable to convert. i have set the all folder permission to 777. but getting the error 'ERROR: /usr/bin/flvtool2:16'. please help me to resolve this problem.

 

here i have enclose my code which i get from site.

 

<?php

convert_video('../files/video.wmv','../files/chuchu1222.flv');

function convert_video($srcFile,$destFile)

{

//echo $srcFile."|".$destFile."<Br>";

echo "Availabel<br>";

$ffmpegInstance = new ffmpeg_movie($srcFile);

 

$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()

echo exec($ffmpegPath . " -i " . $srcFile . " -ar " . $srcAR . " -ab " . $srcAB . " -f flv -s " . $srcWidth . "x" . $srcHeight . " " . $destFile . " | " . $flvtool2Path . " -U stdin " . $destFile);

//exec($ffmpegPath ." -i ".$destFile." -an -ss 00:00:03 -an -r 2 -vframes 1 -y ../files/djx.jpg");

}

 

function makeMultipleTwo ($value) {

if ($value % 2)

return $value - 1;

else

return $value;

}

?>

Link to comment
https://forums.phpfreaks.com/topic/109570-ffmpeg-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.