I need to convert AMR audio file to MP3. How can I make it in PHP without FFMPEG (i have no permissions to install it on the server). Please help me.
Use SoX - the Swiss Army knife of sound processing. Very easy to use.
It is a command line tool not a PHP library so to use from PHP you need to execute a shell command and get the result with in your code. I have used it with in few projects.
Example with PHP:
<?php
exec('sox /mypath/my_audio.amr /mypath/my_audio.mp3');
?>
SoX is a cross-platform (Windows, Linux, MacOS X, etc.) command line utility that can convert various formats of computer audio files in to other formats. It can also apply various effects to these sound files, and, as an added bonus, SoX can play and record audio files on most platforms.
SoX is very mature project! Here is the link: http://sox.sourceforge.net/
Here are some examples I googled for you: http://www.thegeekstuff.com/2009/05/sound-exchange-sox-15-examples-to-manipulate-audio-files/
Just use ffmpeg
. You can simply download a binary of ffmpeg
(look for "static builds"), and then point your script to the binary. There is no need to install it so there should be no permission issues.
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