views:

607

answers:

6

Are there any C/C++ open source audio encoder besides LAME MP3? It doesn't need to be exactly mp3 format, I need a "compressed digital audio file".

I do not want to use Lame because it is too big while no programmer can answer a simple question on it (share simple but easily downloadable and readable project containing only needed 2 simple functions... So I'm tired of searching for help with it.. I need something fresh powerful but more readable than this lib I found (mp3stego) )

"I don't want LAME because I am a fighter with its monopoly" Haha..

+4  A: 

Well, LAME is the best among them. I can't assure you about it's speed, but it's community is really active and sound quality is very good.

You can try Helix Mp3 Encoder. It doesn't seen this codec is being actively developed anymore though.

But IMHO, the best place to ask these questions is at Hydrogenaudio, "the audio technology enthusiast's resource". It's a very old community (I remember using it in 2003) about audio encoding in general. There are some developers there too.

EDIT: I remembered I had a really simple codec 5 years ago that was really simple, and found it in some old bookmarks. It's called Shine Mp3 encoder.

The goal of this encoder was not quality, but simplicity. I tryed to simplify the encoding process as much as possible. So Shine is then a good starting point when a programmer needs a very simple MP3 encoder.

GmonC
+2  A: 

Blade is a mostly defunct encoder based on the ISO code, with fewer lines of code than LAME. I had to change a couple flags (delete -m486, replace -malign-* with -falign-*) to get it to compile, but it works.

You could also go straight to the ISO reference code, although this old copy of the ISO code looks unfinished and the real deal is expensive.

But I, like these other folks, think that you are far more likely to get help with LAME than anything else.

ctd
Blades audio quality is terrible compared to modern encoders. I'm guessing that you would probably need at least a 50% higher bitrate to get comparable audio quality with lame.
mikerobi
It's definitely not the prettiest girl at the ball, but without knowing what Ole's compressing, and by how much, I didn't want to give numbers.
ctd
+9  A: 

The LAME website has links to some alternate encoders, see this link for several alternatives.

When you say "mp3", do you mean ".mp3 format file" or "compressed digital audio file"? If you're open to other digital audio formats, I would recommend looking at Ogg Vorbis or FLAC.

bta
compressed digital audio file
Blender
@Ole Jak: In that case, I would definitely recommend one of these alternate formats that are not encumbered by patents and available under BSD-like licenses. Many people think these two formats sound better than MP3; there are some sample audio clips on the Vorbis page if you want to compare for yourself.
bta
You can even play Vorbis files in iTunes (http://www.xiph.org/quicktime/) and Windows Media Player (http://xiph.org/dshow/).
bta
+7  A: 

It doesn't need to be exactly mp3 format, I need a "compressed digital audio file"

Ogg Vorbis is better quality (per meg) than mp3 plus no licensing/legal issues.

MGOwen
+3  A: 

Again, GStreamer is an great tool for these kind of jobs.

StackedCrooked
+2  A: 

There is FLAC - Free Lossless Audio Codec

Eric Cope