EN` Posted August 16, 2008 Report Posted August 16, 2008 $name=$_POST['name']; $desc=nl2br($_POST['description']); $file=$_FILES['file']; $path="./movies/"; $numbers = time() + "_" + rand(1000,9999); $saveflvpath = "./movies/"; $converted = "./movies/converted/".$numbers.".flv"; $ffmpeg = "C:/xampp/htdocs/ffmpeg/ffmpeg"; $command = $ffmpeg." -v 0 -y -i $saveflvpath$file -s 580x382 -f flv -r 30 -ar 44100 $converted"; $output= exec($command." 2>&1"); print "$output"; Izmet aaraa: Usually that means that input file is truncated and/or corrupted. Nevaru iisti atrast probleemu. Iespeejams pie vainas ir, ka experementeeju uz windows'a. Meybe kaads ir ar kko taadu saskaaries, un vareetu pateikt kur mekleejams risinaajums.
waplet Posted August 16, 2008 Report Posted August 16, 2008 Man liekas ka kaut kas ar encodingu nav pareizi , ķip jo nevar izlasīt izmainīto failu!
p4F Posted August 16, 2008 Report Posted August 16, 2008 (edited) sataisi echo $command peece taas parveido no $command = $ffmpeg." -v 0 -y -i $saveflvpath$file -s 580x382 -f flv -r 30 -ar 44100 $converted"; uz $command = $ffmpeg." -v 0 -y -i ".$saveflvpath.$file." -s 580x382 -f flv -r 30 -ar 44100 ".$converted; Edited August 16, 2008 by p4F
EN` Posted August 17, 2008 Author Report Posted August 17, 2008 Itkaa saanaaca. Pats biju mazliet kljudijies. Tagad man izskataas taa: $name=$_POST['name']; $desc=nl2br($_POST['description']); $file=$_FILES['file']; $path="./movies/"; $upload=move_uploaded_file($file['tmp_name'], $path.$file['name']); chmod($path.$file['name'], 0755); $numbers = time() + "_" + rand(1000,9999); $saveflvpath = "C:/xampp/htdocs/movies/"; $converted = "C:/xampp/htdocs/movies/converted/".$numbers.".flv"; $ffmpeg = "C:/xampp/htdocs/ffmpeg/ffmpeg"; //$command = $ffmpeg." -i $saveflvpath$file -f ogg -acodec mp3 -ab 256k -ac 1 -b 5000 -r 30 -s 580x382 -ar 44100 $converted"; //$command = $ffmpeg." -i $upload -f ogg -acodec mp3 -ab 256k -ac 1 -b 5000 -r 30 -s 580x382 -ar 44100 $converted"; $command = $ffmpeg." -v 0 -y -i ".$path.$file['name']." -s 580x382 -f flv -r 30 -ar 44100 ".$converted; $output= exec($command." 2>&1"); print "$output";
Recommended Posts