Is there any PHP library or function to covert Mp3 file to lower quality?
I want to compress / convert 128Kbps or higher quality Mp3 file to 64Kbps Mp3 file by PHP.
Anyone know?
First of all, you need to install ffmpeg available at: http://ffmpeg.org/download.html
Then, make sure you have safe mode enabled in your PHP configuration and select the right dir where you can execute files: safe_mode_exec_dir
Finally, use:
exec("ffmpeg -i inputfile.mp3 -ab 64 outputfile.mp3")
Have you taken a look at ffmpeg? http://ffmpeg-php.sourceforge.net/
This command worked for me
exec("ffmpeg -i inputfile.mp3 -b:a 64k outputfile.mp3")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With