open source audio converter to mp3 [closed]
开发者_开发百科
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this questionI'm looking for an open source audio conversion library that can convert audio files of various types to MP3. The server I'm working with is a standard LAMP with PHP. Anyone aware of something that could be the solution?
LAME can do this for you. I might also recommend FFMPEG. There is a PHP extension for FFMPEG, but I've found it is easiest to just execute it directly, as most ISPs won't install it for you. Of course, this isn't an issue with your own servers.
I found this
However, I wouldn't rely on HTTP application processing of audio streams, since this is a computationally intensive process.
Anyway, converters such as lame can be invoked command-line and thus from PHP with system()
call.
You can find the documentation of lame using man lame
in Unix
I usually use gstreamer for such purposes, since it will automatically detect most media formats and decode 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 invoke it from PHP as a separate process, but still.
精彩评论