I need to convert mp3 audio files to 64kbps on the server side.
Right now, I am using subprocess
to call lame
, but I wonder if there are any good alternatives?
Today, LAME is considered the best MP3 encoder at mid-high bitrates and at VBR, mostly thanks to the dedicated work of its developers and the open source licensing model that allowed the project to tap into engineering resources from all around the world.
LAME is a software encoder that converts digital audio into the MP3 Audio coding format. LAME is a free software project that was first released in 1998, and has incorporated many improvements since then, including an improved psychoacoustic model.
LAME is a software codec designed to encode audio data in the MP3 format. LAME is one of the most highly-regarded MP3 encoders, capable of converting audio data to the lossy MP3 format with minimal decline in quality. LAME MP3 Encoder is available for free!
LAME is a free codec that is used for encoding audio files to MP3 format and can even be used with the Audacity application.
There seems to be a slightly old thread on that topic here: http://www.dreamincode.net/forums/topic/72083-lame-mp3-encoder-for-python/
The final conclusion was to create a custom binding to lame_enc.dll via Python->C bindings.
The reason for that conclusion was that the existing binding libraries (pymedia/py-lame) have not been maintained.
Unfortunately the guy didn't get it to work :)
Maybe you should continue to use subprocess
. You could take advantage of that choice, abstract your encoding at a slightly higher level, and reuse the code/strategy to optionally execute other command line encoding tools (such as ogg or shn tools).
I've seen several audio ripping tools adopt that strategy.
I've been working with Python Audio Tools, which is capable of make conversions between different audio formats.
I've already used it to convert .wav files into mp3, .flac and .m4a.
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