Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the Python equivalent of Lame MP3 Converter?

Tags:

python

audio

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?

like image 631
satoru Avatar asked May 24 '11 08:05

satoru


People also ask

Is LAME still the best MP3 encoder?

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.

Is LAME an MP3 encoder?

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.

WHAT IS A LAME MP3?

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!

Does Audacity use LAME?

LAME is a free codec that is used for encoding audio files to MP3 format and can even be used with the Audacity application.


2 Answers

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.

like image 148
Merlyn Morgan-Graham Avatar answered Sep 29 '22 11:09

Merlyn Morgan-Graham


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.

like image 41
Luis Alberto Santana Avatar answered Sep 29 '22 12:09

Luis Alberto Santana