title: How do I run ffmpeg with PHP on a Mac with XAMPP
body: <p>There is literally nothing on this anywhere, the little there is does not work and is too advanced for me. If you can answer this you would make my life. How do I run ffmpeg commands from php which is running on my localhost? I prefer XAMPP, but MAMP will do just fine, at this stage I will use anything. Do I need to install ffmpeg on the XAMPP server itself, or does it just need to be installed on the mac? I can run the ffmpeg commands fine from terminal, for example,</p>
  
  <pre><code>ffmpeg -i Tmpfile.mp4 -c:v libx264 -preset ultrafast video.mp4
  </code></pre>
  
  <p>works fine, but </p>
  
  <pre><code>echo shell_exec("ffmpeg -i Tmpfile.mp4 -c:v libx264 -preset ultrafast video.mp4");
  </code></pre>
  
  <p>does nothing when I load the webpage with the index.php that that code is in. </p>
  
  <p>I will buy you a cookie if you can solve my problem :)</p>