I have installed ffmpeg on my server and it works fine via my terminal. I'm able to successfully convert a file to webm format, so I'm sure the installation is fine. I'm also sure that I only have one installation of ffmpeg installed on my machine.
A problem arises when I try to convert files through PHP via PHP's exec(). When I run the same commands, I ran in the terminal, nothing happens. I looked around stackoverflow and other parts of the net for some help. I tried this to see the output:
exec($cmd, $out, $rv);
echo "output is:\n".implode("\n", $out)."\n exit code:$rv\n";
The output is: "output is: exit code:127"
The command I'm using is in this format:
ffmpeg -i "sample.mov" -vcodec libvpx -r 30 -b "644k" -acodec libvorbis -ab 128000 -ar "44100" -ac 2 -s "352x198" "sample.webm"
I've tried replacing "ffmpeg" with the full path to FFmpeg but that did not work.
Why isn't the script running the command correctly and converting the files?
Thank you!