title: how to install ffmpeg-PHP for newbies to linux?
body: <p>I'm trying to convert an <code>.avi</code> video file I have in my server folder to `.flv' format using ffmpeg-PHP. My attempt to "install" ffmpeg-PHP was to extract the contents of the "ffmpeg-php-0.6.0.tbz2" archive into a separate folder. The video conversion script I'm using references the directory location of the files extracted from "ffmpeg-php-0.6.0.tbz2"</p>
  
  <p>this is the conversion script:</p>
  
  <pre><code>&lt;?php
  
  // Set our source file
  $srcFile = "/videos/clip.avi";
  $destFile = "/videos/clip.flv";
  $ffmpegPath = "/install"; //where I extracted "ffmpeg-php-0.6.0.tbz2"
  
  // Create our FFMPEG-PHP class
  $ffmpegObj = new ffmpeg_movie($srcFile);
  
  // Save our needed variables
  $srcWidth = makeMultipleTwo($ffmpegObj-&gt;getFrameWidth());
  $srcHeight = makeMultipleTwo($ffmpegObj-&gt;getFrameHeight());
  $srcFPS = $ffmpegObj-&gt;getFrameRate();
  $srcAB = intval($ffmpegObj-&gt;getAudioBitRate()/1000);
  $srcAR = $ffmpegObj-&gt;getAudioSampleRate();
  
  function makeMultipleTwo ($value)
  {
      $sType = gettype($value/2);
  
      if($sType == "integer")
      {
      return $value;
      } else {
      return ($value-1);
      }
  }
  
  // Call our convert using exec()
  exec($ffmpegPath . " -i " . $srcFile . " -ar " . $srcAR . " -ab " . $srcAB . " -f flv -s " . $srcWidth . "x" . $srcHeight . " " . $destFile);
  
  ?&gt;
  </code></pre>
  
  <p>After running the conversion script, I get the output, "Fatal error: Class 'ffmpeg_movie' not found in [conversion script location]" </p>
  
  <p>I've read instructions on the ffmpeg-PHP page but it doesn't make sense to me. How do I execute these lines of linux code to install ffmpeg-PHP? </p>
  
  <pre><code>tar -xjf ffmpeg-php-X.x.x.tbz2
  
  cd ffmpeg-php-X.x.x/
  phpize
  
  ./configure &amp;&amp; make
  
  sudo make install
  </code></pre>
  
  <p>I think I'm using a shared hosting service by Inmotion with linux installed.</p>