On Jan 19, 2008 12:34 PM, Apple7777 <applepro7777@xxxxxxxxx> wrote: > Jochem Maas <jochem <at> iamjochem.com> writes: > > what's you exact code? how [exactly] do you run the code? > > Did you ask me or Nathan? My current code is (modified little bit, > because Gmane doesn't allow to use lines longer than 80 characters): that looks like my bad; i thought you asked that, not jocheem :( error_reporting(E_ALL); > $conn = mysql_connect("localhost:3306", "login", "pass") or die('Could not > connect: ' . mysql_error()); > mysql_select_db("geo", $conn); > mysql_query("SET NAMES 'utf8'"); > > > $sql = "SELECT * FROM geo.video_temporary WHERE id = 1"; > $trResult = mysql_query($sql, $conn) or die('Query failed: ' . > mysql_error()); > while ($trInfo = mysql_fetch_assoc($trResult)){ > $mainStatus = $trInfo['status']; > } > > if($mainStatus == 200){ exit; } > > > $sql = "SELECT * FROM geo.video_temporary WHERE status = 0"; > $trResult = mysql_query($sql, $conn) or die('Query failed: ' . > mysql_error()); > while ($trInfo = mysql_fetch_assoc($trResult)){ > $videoId = $trInfo['id']; > $videoUserid = $trInfo['userid']; > } > > $userPath = "/home/re/video/".$videoUserid."/"; > > > $sql = "UPDATE geo.video_temporary SET status = 200 WHERE id = 1"; > $trResult = mysql_query($sql, $conn) or die('Query failed: ' . > mysql_error()); > > $sql = "UPDATE geo.video_temporary SET status = 1 WHERE id = ".$videoId; > $trResult = mysql_query($sql, $conn) or die('Query failed: ' . > mysql_error()); > > $inputFile = $userPath.$videoId."temp"; > $outputFile = $userPath.$videoId.".flv"; > print "input file: ".$inputFile."<br />"; > print "output file: ".$outputFile."<br />"; > > $first = "/usr/local/bin/mencoder -really-quiet -vf > scale=448:-3,expand=448:336 > -sws 9 -of lavf -ovc lavc -lavcopts > > vcodec=flv:vbitrate=250:trell:v4mv:mv0:mbd=2:cbp:aic:cmp=3:subcmp=3:vpass=1 > > -frames 800 -ofps 24000/1001 -oac mp3lame -lameopts abr:br=64:mode=0 > -channels 1 -srate 22050 -of lavf -lavfopts format=flv -o > ".$outputFile." /home/re/ff/logo7.avi ".$inputFile; > > $second = "/usr/local/bin/mencoder -really-quiet -vf > scale=448:-3,expand=448:336 > -sws 9 -of lavf -ovc lavc -lavcopts > > vcodec=flv:vbitrate=250:trell:v4mv:mv0:mbd=2:cbp:aic:cmp=3:subcmp=3:vpass=2 > > -frames 800 -ofps 24000/1001 -oac mp3lame -lameopts abr:br=64:mode=0 > -channels 1 -srate 22050 -of lavf -lavfopts format=flv -o > ".$outputFile." /home/re/ff/logo7.avi ".$inputFile; > > print "first: ".$first."<br />"; > print "second: ".$second."<br />"; > > print system("cd /usr/local/bin/"); > print system($first); > print system($second); ya; you should def get a simple version working w/ just mencoder from the cli. then get that working from the browser. then add in the mysql support after thats finished. -nathan