Open source audio to mp3 converter

I am looking for an open source conversion library that can convert various types of audio files to MP3. The server I'm working with is a standard LAMP with PHP. Does anyone know something that could be a solution?

+3
source share
3 answers

LAME can do it for you. I could also recommend FFMPEG . There is a PHP extension for FFMPEG , but I found that the easiest way is to simply execute it directly, as most Internet service providers will not install it for you. Of course, this is not a problem with your own servers.

+4
source

I found this

However, I will not rely on processing HTTP streams of audio streams, as this is a computationally intensive process.

In any case, converters such as lame can be invoked on the command line and therefore from PHP with a call system().

You can find the lame documentation using man lameon Unix

+4
source

I usually use gstreamer for such purposes, since it automatically detects most media formats and decodes them for you:

gst-launch filesrc location=input-file ! decodebin ! audioconvert ! audioresample ! lame bitrate=192 ! filesink location=output-file.mp3

Of course, you will have to call it from PHP as a separate process, but still.

+2
source

Source: https://habr.com/ru/post/1775055/


All Articles