Hi, all.
I have FFMPEG, and FFMPEG php installed on a server, and am trying to upload a video and convert it to flash (flv), it looks like it works, but i guess it doesnt...
Here is what is returned in the browser
built on Apr 23 2007 14:01:05, gcc: 3.4.4 [FreeBSD] 20050518
Here is my code
$id = htmlspecialchars($_SESSION['uid']);
$path = "../profiles/$id/videos";
$source = $_FILES['video']['tmp_name'];
$name = $_FILES['video']['name'];
$ext = strtolower(substr($name, -3));
$time = time();
$videoFile = $time.'.flv';
$infoFile = $time.'.tpl';
if ($ext){
$movedFile = "$path/$videoFile";
// The commented $encode_cmd's are the ones i also tried, i get the same output every time
//$encode_cmd = "/usr/local/bin/ffmpeg -i \"$source\" -acodec mp3 -ar 22050 -ab 32 -f flv \"$movedFile\"";
//$encode_cmd = "/usr/local/bin/ffmpeg -i \"$source\" -acodec mp3 -ar 22050 -ab 32 -f flv \"$movedFile\"";
//$encode_cmd = "export LD_LIBRARY_PATH=/usr/local/bin/ffmpeg/lame/lib; /usr/local/bin/ffmpeg/bin/ffmpeg -i '$source' -f '$path/$filename'";
//$encode_cmd = "export LD_LIBRARY_PATH=/usr/local/bin/ffmpeg/lame/lib; /usr/local/bin/ffmpeg -i '$source' -f '$path/$filename'";
$encode_cmd = "ffmpeg -i '$source' -f '$movedFile'";
print exec($encode_cmd) or die ('Could not convert video"');
The "../profiles/$id/videos" file is chmod-ed to 0777
I know most of the script works, if i add move_uploaded_file($source, $movedFile) Then the source file is moved...
Can anyone please tell me what i am doing wrong? And why the file isn't being converted to flv, or if it is, why isn't it getting put in the right place?
Thank you so much for your time
~Gabor