When I try to execute the following code:
- Code: Select all
<?php
echo "Starting ffmpeg";
$output = shell_exec("ffmpeg -i test.mp3 -codec:a libmp3lame -b:a 128k out.mp3 2>&1");
echo "<pre>$output</pre>";
?>
I am receiving the following on my browser:
Starting ffmpeg
sh: 1: ffmpeg: not found
I am assuming that I somehow need to install ffmpeg to my xampp server but it is not obvious how to do that. After searching online I can find linux and Windows tutorials but I couldn't figure out something out by looking at them.
What I tried doing was to download the ffmpeg static build form https://ffmpeg.org/download.html#build-mac and placed it in the htdocs holder, and then tried to execute ffmpeg as if it was an executable (after changing chmod), but still no luck.
How would one go and install and then run ffmpeg on their xampp server?