I have this code failing:
$newName = $_SERVER['REMOTE_ADDR'].'_'.time();
$fileName=$newName.$extension;
$flvName=$newName.'.flv';
$ffmpegPath = "/usr/bin/ffmpeg";
$destination_file = $this->folder.basename($fileName);
$destination_movie = $this->folder.'original/'.basename($fileName);
$destination_flv = $this->folder.'flv/'.basename($flvName);
$destination_image = $doc_upload.'thumb/'.$newName.'.jpg';
$ffmpegDo = $ffmpegPath." -i ".$destination_movie." -ar 22050 -ab 128 -b 3600 -f flv -s 320x240 ".$destination_flv;
if (!exec($ffmpegDo)) { $error[] = ERROR_EXEC_FFMPEGDO.':'.$ffmpegDo; }
Any idea why this can fail? Thanks guys.
Edit: No error file is getting generated.
$ffmpegDo looks like this:
/usr/local/bin/ffmpeg -i /home/myaccount/public_html/upload/videos/original/86.69.191.177_1305714026.mpeg -ar 22050 -ab 128 -b 3600 -f flv -s 320x240 /home/myaccount/public_html/upload/videos/flv/86.69.191.177_1305714026.flv
Using the method described in the answer below, I got this error:
[0] => sh: /usr/local/bin/ffmpeg: No such file or directory
This is strange because my server guys specified me that this was my ffmpeg location. Now what?