Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: LAME MP3 support  (Read 16454 times)

0 Members and 1 Guest are viewing this topic.

Ashenwraith

  • Sr. Member
  • ****
  • Posts: 270
    • View Profile
LAME MP3 support
« on: June 09, 2010, 04:14:44 pm »
What about LAME MP3 support which is an open encoder that is able to play in mp3 players, but is not a real mp3.

http://lame.sourceforge.net/

The quality/compression is often much better than ogg, especially for music.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
LAME MP3 support
« Reply #1 on: June 09, 2010, 04:41:07 pm »
I always give the same answer: MP3 is not free and you must pay royalties to use a decoder/encoder for this format. LAME is ok because it provides only source code. But if you use a compiled version of LAME (which would be the case if I used it in SFML), you must pay royalties.

At least this is what I understand from the stuff I've read about MP3 licensing. Correct me if I'm wrong.

Quote
The quality/compression is often much better than ogg, especially for music.

I've always heard that OGG was slightly better. But maybe it was just about the compression rate, not the quality.
Laurent Gomila - SFML developer

Ashenwraith

  • Sr. Member
  • ****
  • Posts: 270
    • View Profile
LAME MP3 support
« Reply #2 on: June 09, 2010, 05:10:38 pm »
Quote from: "Laurent"
I always give the same answer: MP3 is not free and you must pay royalties to use a decoder/encoder for this format. LAME is ok because it provides only source code. But if you use a compiled version of LAME (which would be the case if I used it in SFML), you must pay royalties.

At least this is what I understand from the stuff I've read about MP3 licensing. Correct me if I'm wrong.

Quote
The quality/compression is often much better than ogg, especially for music.

I've always heard that OGG was slightly better. But maybe it was just about the compression rate, not the quality.


From what I've seen you can allow the user to insert the lame_enc.dll at their own discretion which is what most open source audio programs do (including Audacity).

Many artist now offer music in both ogg and mp3 and the mp3 always sounds better. If you take a good wav and encode it to ogg at a higher bit-rate it always sounds more damp/flat sounding vs mp3. For sound effects it doesn't really matter, but you can really tell with music.

I've never heard or been able to make a better sounding ogg vs a properly encoded mp3. Of course old mp3s sound like crap compared to ogg. I know ogg is supposed to be like the png of sound formats, but it's not better.

Here is a more technical explanation:

http://ixbtlabs.com/articles/oggvslame/

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
LAME MP3 support
« Reply #3 on: June 09, 2010, 06:28:05 pm »
Quote
From what I've seen you can allow the user to insert the lame_enc.dll at their own discretion which is what most open source audio programs do (including Audacity)

Yes, and that's probably what I'll do in SFML 2, after the plugin system is implemented. I'll do the same for MIDI and other audio formats that require a LGPL shared library.

In addition to what I said previously, it seems that the MP3 license do not apply for personal/home use.
Laurent Gomila - SFML developer

Ashenwraith

  • Sr. Member
  • ****
  • Posts: 270
    • View Profile
LAME MP3 support
« Reply #4 on: June 10, 2010, 03:44:10 pm »
Quote from: "Laurent"
Quote
From what I've seen you can allow the user to insert the lame_enc.dll at their own discretion which is what most open source audio programs do (including Audacity)

Yes, and that's probably what I'll do in SFML 2, after the plugin system is implemented. I'll do the same for MIDI and other audio formats that require a LGPL shared library.

In addition to what I said previously, it seems that the MP3 license do not apply for personal/home use.


A plug-in system for audio sounds great.

Musepack is impressive too if you want high quality compression vs ogg/wav and it's fully patent free:

http://www.musepack.net/

Spodi

  • Full Member
  • ***
  • Posts: 150
    • View Profile
    • http://www.netgore.com/
LAME MP3 support
« Reply #5 on: June 10, 2010, 09:18:02 pm »
Why use MP3? I can understand it for your every-day music just since its such a popular format and widely supported by portable devices, but MP3 is not exactly great. Ogg is just fine as a MP3 alternative, and is perfectly suitable for using for most game sounds. For game music, Ogg at around ~192kbps, like mp3, will be good enough quality in comparison to the source. Of course, you can always go higher (~224kbps), which may be needed for effects like explosions.

pdusen

  • Newbie
  • *
  • Posts: 30
    • View Profile
LAME MP3 support
« Reply #6 on: June 11, 2010, 01:07:48 am »
Quote from: "Ashenwraith"
Many artist now offer music in both ogg and mp3 and the mp3 always sounds better. If you take a good wav and encode it to ogg at a higher bit-rate it always sounds more damp/flat sounding vs mp3. For sound effects it doesn't really matter, but you can really tell with music.

I've never heard or been able to make a better sounding ogg vs a properly encoded mp3. Of course old mp3s sound like crap compared to ogg. I know ogg is supposed to be like the png of sound formats, but it's not better.


You use words like "Many" and "always" in a way that I think is grossly inappropriate. And anyway, what you are saying runs in direct contradiction to what I've experienced; given proper encoding all around, I have always greatly preferred the Vorbis version.

Quote
Here is a more technical explanation:

http://ixbtlabs.com/articles/oggvslame/


Maybe you should actually read the sources you post. It's not nearly as clear-cut as you seem to think it is:

Quote
Conclusion
The new versions of both coders handle their tasks much better than the previous ones.
The quality in the ABR mode for the LAME is never worse than in a standard mode, and it is often much better at any bitrates.
In the mode of the maximum similarity with an original (320/350 Kbit) both coders perform excellently.
In the ABR 256 Kbit mode the LAME better reproduces highs, and the OGG works better with middle frequencies. I would rather recommend the OGG, but it hasn't solid advantage as far as compatibility is concerned.
Coding in the 256 Kbit mode for the OGG and in the ABR 256 Kbit mode for the LAME corresponds to high quality and it is a good choice if you don't want the maximum similarity with an original.
In the ABR 192 Kbit mode the LAME is on the whole better than the OGG.
In case of 160 and 128 Kbit the OGG is an obvious leader.
The coding quality of 160 Kbit is much better than that of 128, that is why I recommend to take 160 everywhere where it is possible.

Ashenwraith

  • Sr. Member
  • ****
  • Posts: 270
    • View Profile
LAME MP3 support
« Reply #7 on: June 11, 2010, 02:39:54 am »
Quote from: "pdusen"
Quote from: "Ashenwraith"
Many artist now offer music in both ogg and mp3 and the mp3 always sounds better. If you take a good wav and encode it to ogg at a higher bit-rate it always sounds more damp/flat sounding vs mp3. For sound effects it doesn't really matter, but you can really tell with music.

I've never heard or been able to make a better sounding ogg vs a properly encoded mp3. Of course old mp3s sound like crap compared to ogg. I know ogg is supposed to be like the png of sound formats, but it's not better.


You use words like "Many" and "always" in a way that I think is grossly inappropriate. And anyway, what you are saying runs in direct contradiction to what I've experienced; given proper encoding all around, I have always greatly preferred the Vorbis version.

Quote
Here is a more technical explanation:

http://ixbtlabs.com/articles/oggvslame/


Maybe you should actually read the sources you post. It's not nearly as clear-cut as you seem to think it is:

Quote
Conclusion
The new versions of both coders handle their tasks much better than the previous ones.
The quality in the ABR mode for the LAME is never worse than in a standard mode, and it is often much better at any bitrates.
In the mode of the maximum similarity with an original (320/350 Kbit) both coders perform excellently.
In the ABR 256 Kbit mode the LAME better reproduces highs, and the OGG works better with middle frequencies. I would rather recommend the OGG, but it hasn't solid advantage as far as compatibility is concerned.
Coding in the 256 Kbit mode for the OGG and in the ABR 256 Kbit mode for the LAME corresponds to high quality and it is a good choice if you don't want the maximum similarity with an original.
In the ABR 192 Kbit mode the LAME is on the whole better than the OGG.
In case of 160 and 128 Kbit the OGG is an obvious leader.
The coding quality of 160 Kbit is much better than that of 128, that is why I recommend to take 160 everywhere where it is possible.


I did read it, but apparently you don't know anything about ogg sound compression and are too lazy to read entire articles before embarrassing yourself about something you know nothing of. You probably didn't even know what LAME MP3 was until you clicked on this link--but you want to debate anyways?

Try reading it again and you will see the part about how ogg smears and flattens the sound in exchange for hiding artifacts.

LAME MP3 will give you a sound closer to the original without as nearly as much smear/flattening. If your song/effect is more simple/low/bass than you might not care . This article is somewhat bias towards ogg in conclusions, but it still points out its problems. Unless you are listening with expensive headphones the slight increase in artifacts is generally preferable.

Quote from: "Spodi"
Why use MP3? I can understand it for your every-day music just since its such a popular format and widely supported by portable devices, but MP3 is not exactly great. Ogg is just fine as a MP3 alternative, and is perfectly suitable for using for most game sounds. For game music, Ogg at around ~192kbps, like mp3, will be good enough quality in comparison to the source. Of course, you can always go higher (~224kbps), which may be needed for effects like explosions.


It's not just the bit-rate it's the compression algorithm and the sound quality. Compare many songs in Ogg Vs LAME MP3 and you will hear the difference. Similarily MPC musepacks is better than ogg at higher bit rates because IT'S THE ALGORITHM(S).

If you haven't sat down and done comparisons you can't really say anything about the matter.

This is like arguing png is superior to dds because you just like it and you've never done anything serious with dds before  

Yes so let's not support dds because it's just patented bloat and png is 'good enough'...:roll:

Spodi

  • Full Member
  • ***
  • Posts: 150
    • View Profile
    • http://www.netgore.com/
LAME MP3 support
« Reply #8 on: June 11, 2010, 05:07:51 am »
Wow, calm down there sparky. MP3 is not better than Ogg Vorbis, or vise versa. They're just an alternative to one another and none is always the best in all situations. The problem with MP3 is the excessive amount of patents on it, while Ogg Vorbis does not have this issue. If Laurent can add MP3 support without any patient issues (which is doubtful), then that'd be great since it adds variety. If not, then no biggie.

Its not worth arguing MP3 vs Ogg Vorbis vs any other lossy audio format. Everyone has their own opinions. If you are so bent out of shape over audio quality, and Ogg Vorbis encoded at over 200 kbps is really not good enough for you, then just use lossless. Simple as that.

Also, I'm not sure why you are accusing everyone of knowing nothing about audio formats when you have absolutely no idea what kind of experience we have with audio formats.

pdusen

  • Newbie
  • *
  • Posts: 30
    • View Profile
LAME MP3 support
« Reply #9 on: June 11, 2010, 05:58:27 am »
Quote from: "Ashenwraith"
I did read it, but apparently you don't know anything about ogg sound compression and are too lazy to read entire articles before embarrassing yourself about something you know nothing of. You probably didn't even know what LAME MP3 was until you clicked on this link--but you want to debate anyways?


Hah, wow. I'm a musician who has dealt extensively in audio production, and you're just full of hot air. No thank you, I'm quite done debating. I can see where this is going.

Walker

  • Full Member
  • ***
  • Posts: 181
    • View Profile
LAME MP3 support
« Reply #10 on: June 12, 2010, 04:28:47 am »
Perhaps a useful suggestion would be that if ogg vorbis is not up to the standard of what you are doing then you should use a lossless codec instead? FLAC comes to mind.

I don't like listening to or creating music compressed to any lossy format, personally. I prefer Ogg Vorbis over MP3 due it's freeness and openness.

Ashenwraith

  • Sr. Member
  • ****
  • Posts: 270
    • View Profile
LAME MP3 support
« Reply #11 on: June 13, 2010, 07:43:26 am »
Quote from: "Spodi"
Wow, calm down there sparky. MP3 is not better than Ogg Vorbis, or vise versa. They're just an alternative to one another and none is always the best in all situations. The problem with MP3 is the excessive amount of patents on it, while Ogg Vorbis does not have this issue. If Laurent can add MP3 support without any patient issues (which is doubtful), then that'd be great since it adds variety. If not, then no biggie.

Its not worth arguing MP3 vs Ogg Vorbis vs any other lossy audio format. Everyone has their own opinions. If you are so bent out of shape over audio quality, and Ogg Vorbis encoded at over 200 kbps is really not good enough for you, then just use lossless. Simple as that.

Also, I'm not sure why you are accusing everyone of knowing nothing about audio formats when you have absolutely no idea what kind of experience we have with audio formats.


I'm plenty calm, everything you are saying is wrong and that's why I'm informing you are wrong.

DDS is just as patented as MP3 and so are many other formats. That doesn't mean they aren't useful or implemented. Even having a 3D camera in your game is patented.

Laurent already said it's not a big deal to implement a plug-in system for audio and he's already doing it for MIDI. You're arguing against something he is already going to implement? What is the logic behind that?

He also said it would appears to not be a problem to implement MP3 because it only requires licensing if you are selling the product. Did you not read the his post? Where do you get all these doubts from?

How do you expect people to agree with you when you don't even pay attention to what people type?

Quote from: "pdusen"
Hah, wow. I'm a musician who has dealt extensively in audio production, and you're just full of hot air. No thank you, I'm quite done debating. I can see where this is going.


Right, and I'm a PHD who doesn't want to debate people who are arguing against useful features that can be plugged in. Guess all of those other musicians must be part of the MP3/anti-OGG conspiracy.

The reality is if Vorbis devs got their heads out of the sky and implemented more/better algorithms instead of making excuses they wouldn't have to be blaming everything on a conspiracy against them.

Spodi

  • Full Member
  • ***
  • Posts: 150
    • View Profile
    • http://www.netgore.com/
LAME MP3 support
« Reply #12 on: June 13, 2010, 08:20:48 pm »
What is wrong with what I wrote? The points I made were:
1. Ogg and MP3 at around 192kbps is, to most, very close to the source
2. Effects with larger range can be encoded at 224kbps to retain those excessive high and low ranges that get removed by most any lossy encoder
3. MP3 is "not exactly great" - its popularity is not an indication of its superiority (otherwise, Xvid must be awesome, too)
4. Ogg is pretty much just as good as MP3

None of that is wrong like you said. Some of it is opinionated, but not wrong.

Quote
How do you expect people to agree with you when you don't even pay attention to what people type?


Only thing I am disagreeing with is your lust for MP3 and absolute hatred for Ogg Vorbis, combined with that you are being a dick for no reason towards everyone stating any opinion against mp3.

And why do you seem to think that anyone who likes Ogg Vorbis hates MP3, or vise versa?

pdusen

  • Newbie
  • *
  • Posts: 30
    • View Profile
LAME MP3 support
« Reply #13 on: June 14, 2010, 01:03:13 am »
Quote from: "Ashenwraith"
Right, and I'm a PHD who doesn't want to debate people who are arguing against useful features that can be plugged in. Guess all of those other musicians must be part of the MP3/anti-OGG conspiracy.


Yes, yes, your expensive degree and raving babble are very interesting to me. I'd just like to point out that I didn't say anything one way or the other about MP3 being in SFML; I simply disagreed with you about the relative merit of OGG and MP3.

Ashenwraith

  • Sr. Member
  • ****
  • Posts: 270
    • View Profile
LAME MP3 support
« Reply #14 on: June 14, 2010, 05:13:48 pm »
Quote from: "Spodi"
What is wrong with what I wrote? The points I made were:
1. Ogg and MP3 at around 192kbps is, to most, very close to the source
2. Effects with larger range can be encoded at 224kbps to retain those excessive high and low ranges that get removed by most any lossy encoder
3. MP3 is "not exactly great" - its popularity is not an indication of its superiority (otherwise, Xvid must be awesome, too)
4. Ogg is pretty much just as good as MP3

None of that is wrong like you said. Some of it is opinionated, but not wrong.

Quote
How do you expect people to agree with you when you don't even pay attention to what people type?


Only thing I am disagreeing with is your lust for MP3 and absolute hatred for Ogg Vorbis, combined with that you are being a dick for no reason towards everyone stating any opinion against mp3.

And why do you seem to think that anyone who likes Ogg Vorbis hates MP3, or vise versa?


No, I never said I hated ogg.

I use ogg all the time and if I sell a hobby game I will most likely use it for all music.

However, for a free internet game where compression/quality is important for music I would prefer LAME.

My point is that the algorithm for ogg alters the sound in a way that flattens music:





But even the graphs do not tell the whole story.

LAME sounds better for just general power of music sound, plus the adjusting bit-rate algorithms add more bits to complex parts to increase the overall quality which you can't see in the graphs.

It's also not a simple question of random popularity. Many musicians encode in both and prefer LAME ABR 192 for internet because IT IS BETTER.

"In the ABR 192 Kbit mode the LAME is on the whole better than the OGG."

http://ixbtlabs.com/articles/oggvslame/

If you sell music it's going to most likely be in AAC/whatever on itunes or CDA on a CD so the license doesn't matter. Only the compression/quality matters to most musicians online who are giving out free music.

Also, LAME MP3 was developed independently as open source with a lot of hard work. There are more options for compression than even OGG. Do not think it's just some generic MP3.