How to convert all audio formats to mp3 in php
Using ffmpeg can be helpful. For details http://ffmpeg.org/
at first you install ffmpeg on your system. (it is free), then in PHP you can call the ffmpeg to convert any audio file to mp3 using the system command like this:
<?php
$output = system("ffmpeg parameters...");
echo $output;
?>
see the ffmpeg documentation for examples how to call ffmpeg.
来源:https://stackoverflow.com/questions/11840650/how-to-convert-all-audio-formats-to-mp3-in-php