title: Ffmpeg installation And Converting VIdeo's:
body: <p>I am confused with instruction to install ffmpeg-php for video converting... There are some <a href="https://stackoverflow.com/questions/1172916/how-to-install-ffmpeg-in-wampserver-2-0-windows-xp">guide us</a> to download and put files in particular folder and then convert files, but some instruct through <a href="http://www.vidionline.com/php/7-how-to-install-ffmpeg-on-windows" rel="nofollow noreferrer">another way</a>, where you must download ffmpeg.exe and place it local and then call it from php to convert file.....</p>
  
  <p>So which one is the best and how to install it....?????</p>
  
  <p>Now i download ffmpeg and execute this script but not working, and give rights also...</p>
  
  <pre><code>$ffmpeg = "ffmpeg/ffmpeg.exe";
  $desvfile = $_POST['file'];
  $curr_dir = dirname(__FILE__);
  $flvfile = $curr_dir."/converted/new1.flv";
  
  if(file_exists($ffmpeg)){
      $cmd = "ffmpeg/ffmpeg.exe -i ".$desvfile." -ar 22050 -ab 32 -f flv -s 320×240 ".$flvfile; 
      exec($cmd, $output); 
      echo "executed command: [".$cmd."] with result: ".print_r($output, true)."&lt;br&gt;\n";
      echo "Successfully video Converted, to video.flv";
  }
  else{
      echo "There is some problem during converting!";
  }
  </code></pre>
  
  <p>There is any way, to test => exec(ffmpeg) functionality....?????</p>
  
  <p><strong>UPDATED!</strong></p>
  
  <pre><code>if(file_exists($desvfile)){
      echo "Destination file Exist. &lt;br /&gt;";
      $cmd = "$ffmpeg -i '$desvfile' -ar 22050 -ab 32 -f flv -s 320×240 '$flvfile'"; 
      exec(escapeshellcmd($cmd), $output); 
      echo "executed command: =&gt; [".$cmd."] &lt;br /&gt;with result: =&gt; ".print_r($output, true)."&lt;br&gt;\n";
      echo "Successfully video Converted, to video_converted.flv";
   }
  else{
      echo "There is some problem during converting!";exit;
  }
  </code></pre>
  
  <p>Which give me the output,,, but not execute the video to convert....</p>
  
  <p><strong><em>Output:</em></strong></p>
  
  <pre><code>// Destination file Exist.
  
  // executed command: =&gt; [/var/www/html/test_site/converter/ffmpeg/ffmpeg.exe -i '/var/www/html/test_site/converter/uploads/Gazzump.com - YouTube - Anders And.avi' -ar 22050 -ab 32 -f flv -s 320×240 '/var/www/html/test_site/converter/converted/new1.flv']
  
  // with result: =&gt; Array ( )
  
  // Successfully video Converted, to video_converted.flv
  </code></pre>