Ir scripts, kas ljauj uploadot video failus, kad tas tiek uploadots to saak converteet ar ffmpeg. Convertaaciju izpilda ar exec funkciju, bet es sapratu, ka man vajag, lai scripts ietu taalaak (tuliit paskaidroshi)
Dotajaa mirklii man ir taa, upload form, es uploadoju(protams gaidu kameer tas notiek), tad saakas convertaacija(arii gaidu kameer tas notiek), bet vai nevareetu izdariit taa, lai tiek nosuutita komanda ka vajag converteet video, bet scripts pats iet taalaak?
p.s varbuut mazliet murgaini izteicu savu domu, bet nu citaadaak man neienaaca praataa ^^
Pagaidaam mans php izskataas shaads:
} elseif($_GET['action']=="save") {
echo '<table width="100%"><tr><td>';
$name=$_POST['name'];
$desc=nl2br($_POST['description']);
$file=$_FILES['file'];
$path="./movies/";
move_uploaded_file($file['tmp_name'], $path.$file['name']);
chmod($path.$file['name'], 0755);
$ffmpeg = "/usr/bin/nice -n 19 /usr/bin/ffmpeg";
$numbers = time() + "_" + rand(1000,9999);
$video_flv_convert = "./movies/".$numbers.".flv";
$video_image_convert = "./movies/".$numbers.".jpg";
$video_flv = ($numbers.".flv");
$video_image = ($numbers.".jpg");
$command = $ffmpeg." -i ".$path.$file['name']." -s 480x300 -f flv -r 30 -b 4000k -ar 44100 -ab 64 ".$video_flv_convert;
$output= exec($command);
print "$output";
$command = $ffmpeg." -i ".$path.$file['name']." -s 480x300 -vcodec mjpeg -ss 3 -an -f rawvideo -vframes 1 ".$video_image_convert;
$output= exec($command);
print "$output";
unlink($path.$file['name']);
echo '</td></tr></table>';
mysql_query("INSERT INTO ".PREFIX."movies (movheadline, movdescription, movfile, movimage, movowner, comments) VALUES ('".$name."', '".$desc."', '".$video_flv."', '".$video_image."', '".$userID."', '1')");
echo('Video uploaded!');