I'm trying to convert an audio file in PHP using ffmpeg, I get the audio file via post as a m4a and I want to turn it into mp3. I do the following to do this:
$commandOutput = shell_exec('ffmpeg -i '.$filePath.' -ar 8000 -ab 16000 '.str_replace('m4a', 'mp3', $filePath));
Yet it does nothing, and commandOutput also contains nothing. The file is saved properly but not converted to mp3, when I run the same command in terminal it converts the file properly. Any idea what might be happening?