Jump to content

rmail2006

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

rmail2006's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Me again. I got the ffmpeg to convert my file from wmv to flv and it plays great but when it converts it it still comes up saying Command Failed! <?php exec('C:\xampp\ffmpeg\ffmpeg.exe -i C:\xampp\htdocs\Video\video.wmv -ar 22050 -ab 32 -f flv -s 1280x720 C:\xampp\htdocs\Video\video.flv'); echo $result.'<br/>'; if ($result !== 0) { echo 'Command failed!<br>'; print_r($command_output); die(); } echo 'success!'; print_r($command_output); ?> The problem is $result has no value in it when done so it will always say Command failed! Is there a proper way to check if it has converted? And the error before was the command to be executed should be wrapped in single quotations not double Thanks
  2. I've Cut down my code and added a check and it turns out the exec is working but its always failing. <?php exec("C:\xampp\ffmpeg\ffmpeg -i C:\xampp\htdocs\Video\video.wmv -ar 22050 -ab 32 -f flv -s 1280x720 C:\xampp\htdocs\Video\video.flv"); if ($result !== 0) { echo 'Command failed!<br>'; print_r($command_output); die(); } echo 'success!'; print_r($command_output);?>
  3. Sorry if this is in the wrong section, wasn't too sure. I have been running FFMPEG on Windows 7 using Xampp. It's all set up and I can read the Wildlife.wmv file but it doesn't convert it. Here's my code: <?php // Set our source file $ffmpegPath = "C:\xampp\ffmpeg\ffmpeg.exe"; $flvtool2Path = "C:\xampp\flvtool2\flvtool2.exe"; // Create our FFMPEG-PHP class $ffmpegObj = new ffmpeg_movie('C:\xampp\htdocs\Video\uploads\Wildlife.wmv'); // Save our needed variables $srcWidth = makeMultipleTwo($ffmpegObj->getFrameWidth()); $srcHeight = makeMultipleTwo($ffmpegObj->getFrameHeight()); $srcFPS = $ffmpegObj->getFrameRate(); $srcAB = intval($ffmpegObj->getAudioBitRate()/1000); $srcAR = $ffmpegObj->getAudioSampleRate(); // Call our convert using exec() exec("ffmpeg -i wildlife.wmv -ar 22050 -ab 32 -f flv -s 1280x720 wildlife.flv"); // Make multiples function function makeMultipleTwo ($value) { $sType = gettype($value/2); if($sType == "integer") { return $value; } else { return ($value-1); } }?> I've heard people mentioning the exec might not be working. Is there anyway to get it working if so? Thanks
  4. Sorry bowt tht. I own 2 domains. 1world1game.com and afc1886.com I want to know how users can log into 1world 1game.com and register and read messages that are at afc1886.com. e.g. Log into 1world1game.com, sregister an email tom@afc1886.com and then send and receive emails from that? Thanks for all the replies
  5. Im trying to choose a picture from my website but; it must be random each pic is only allowed to be rated once per day Iv set up the code but for some reason it doesnt always work. if($_GET[id]){ } else { $totNum = mysql_num_rows(mysql_query("SELECT * FROM totties")); echo $totNum."<br/>"; $totSelect = mysql_fetch_array(mysql_query("SELECT * FROM totties ORDER BY rand() LIMIT 0,1")); $totCheck = mysql_fetch_array(mysql_query("SELECT * FROM ratings WHERE imgId='$totSelect[tottyId]' AND username='$userUsername'")); if($totCheck[id]){ $timeDif = time() - $timeLimit; $totCheck2 = mysql_fetch_array(mysql_query("SELECT * FROM ratings WHERE id='$totCheck[id]' AND time > $timeDif")); $xCount=1; if ($totCheck2[id]){ while($totCheck2[id]){ $totSelect = mysql_fetch_array(mysql_query("SELECT * FROM totties ORDER BY rand() LIMIT 0,1")); $totCheck = mysql_fetch_array(mysql_query("SELECT * FROM ratings WHERE imgId='$totSelect[tottyId]' AND username='$userUsername'")); $totCheck2 = mysql_fetch_array(mysql_query("SELECT * FROM ratings WHERE imgId='$totSelect[id]' AND time > $timeDif")); if ($xCount==$totNum * 2){ echo "Rated All Girls"; $noGirls='1'; break; } $xCount++; } [color=red][b]$tottyChosen = $totSelect[tottyId]; echo "Got Girl ID ".$totSelect[tottyId];[/b][/color] } else { $totDetails = mysql_fetch_array(mysql_query("SELECT * FROM usr_images WHERE id='$totSelect[tottyId]'")); echo "Rated But Time ID ".$totCheck[imgId];} $tottyChosen = $totCheck[imgId]; }else{ [color=red][b]echo " No Ratings ID ".$totSelect[tottyId]; $tottyChosen = $totSelect[tottyId];[/b][/color] } } echo "<br/>".$tottyChosen; when it writes 'rated but time id ' and 'No Ratings Id ' it passes the id to the string $tottyChosen. That's Fine But when it randomly chooses another and echos 'Got Girl ID ' it doesnt pass the id to the string even though it prints it on screen. Can anyone help plz Thanks
  6. Iv registered a few domains and was wondering how i could set up the emails on them so that i could register an email on one site from another e.g. on example1.com i could register me@example2.com. Thanks
  7. yeh... it says Invalid query: you have an error in your sql syntax; chec the manual that corresponds to your mysql server version for the right syntax to use near '' at line 1. thnx for the reply
  8. Im trying to upload an image to my server and then copy information to a MySQL database. this is my code that isnt working. <html> <head> <title>Uploading...</title> </head> <body> <h1>Uploading file...</h1> <?php include_once("./include/config.php"); db_connect(); if ($_FILES['userfile']['error'] > 0) { echo 'Problem: '; switch ($_FILES['userfile']['error']) { case 1: echo 'File exceeded upload_max_file_size'; break; case 2: echo 'File exceeded max_file_size'; break; case 3: echo 'File only partially uploaded'; break; case 4: echo 'No File Uploaded'; break; } exit; } // Does the file have the right MIME type? //Put the file where we'd like it $upfile = './images/'.time().$_FILES['userfile']['name'] ; $tmpfile = $_FILES['userfile']['tmp_name'] ; $imgloc = $_POST['imglocation']; echo $upfile; echo '<br /><b>'; echo $imgloc; echo '</b><br />'; if (is_uploaded_file($tmpfile)) { if (!move_uploaded_file($tmpfile, $upfile)) { echo 'Could not move file to destination'; exit; } } else { echo 'Possible File Upload Attack. Filename: '; echo $_FILES['userfile']['name']; exit; } $date = date("Y-m-d"); $sqlresult = mysql_query ("INSERT INTO `photos` (photo_title, photo_desc, photo_date, photo_location) VALUES ('$upfile', '1', '$date', '$imgloc'"); if (!$sqlresult){ die('<br />Invalid Query: ' . mysql_error()); }; echo '<div align="center">'; echo 'File uploaded successfully<br /><br />'; echo '<b>Preview: </b><br />'; echo '<img border="2" src="'.$upfile.'" width="30%" >'; echo '</div>'; ?> </body> </html> can n e 1 help plz ?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.