Export MP3 in float
Export MP3 in float
I realize it doesn't make a big difference, but why not export MP3 in float instead of 16-bit? In most cases this will avoid a needless conversion to 16-bit and back to float (LAME uses float internally).
Perhaps very old versions of LAME didn't have float APIs? Worst case, somebody has to download a more recent version, which they should do anyway.
Perhaps very old versions of LAME didn't have float APIs? Worst case, somebody has to download a more recent version, which they should do anyway.
-
kozikowski
- Forum Staff
- Posts: 69357
- Joined: Thu Aug 02, 2007 5:57 pm
- Operating System: macOS 10.13 High Sierra
Re: Export MP3 in float
I'm betting the legacy 1995 format of MPEG-1, Layer 3 didn't have float. So to make a default exported MP3 play on the maximum number of players, 16 bit is the shining path.
Everything inside Audacity is 32-floating anyway, so unless you shot it that way and turn all the dithering off, you're going to go through conversions.
Koz
Everything inside Audacity is 32-floating anyway, so unless you shot it that way and turn all the dithering off, you're going to go through conversions.
Koz
-
kozikowski
- Forum Staff
- Posts: 69357
- Joined: Thu Aug 02, 2007 5:57 pm
- Operating System: macOS 10.13 High Sierra
Re: Export MP3 in float
Similarly, Broadcast WAV has many more tricks than regular, Microsoft WAV, so we should all use that instead.
Koz
Koz
Re: Export MP3 in float
MP3 does not have "bit depth" in the same way that uncompressed PCM audio does.
As far as I'm aware, the "numbers" in an MP3 file are floating point numbers, but these do not correspond directly to sample values. The bit depth of the decoded MP3 file depends on the decoder. Almost all MP3 decoders decode to 16 bit (just a couple that decode to 24 bit and there is hot debate as to whether 24 bit decoding has any practical benefits).
As far as I'm aware, the "numbers" in an MP3 file are floating point numbers, but these do not correspond directly to sample values. The bit depth of the decoded MP3 file depends on the decoder. Almost all MP3 decoders decode to 16 bit (just a couple that decode to 24 bit and there is hot debate as to whether 24 bit decoding has any practical benefits).
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
-
Robert J. H.
- Posts: 3633
- Joined: Thu May 31, 2012 8:33 am
- Operating System: Windows 10
Re: Export MP3 in float
Actually, they decode to 29 bit, or to be more precise, to 14.5 bit.steve wrote:MP3 does not have "bit depth" in the same way that uncompressed PCM audio does.
As far as I'm aware, the "numbers" in an MP3 file are floating point numbers, but these do not correspond directly to sample values. The bit depth of the decoded MP3 file depends on the decoder. Almost all MP3 decoders decode to 16 bit (just a couple that decode to 24 bit and there is hot debate as to whether 24 bit decoding has any practical benefits).
Re: Export MP3 in float
This has nothing to do with the MP3 format, it's about the LAME API and how Audacity uses it.
-
Gale Andrews
- Quality Assurance
- Posts: 41761
- Joined: Fri Jul 27, 2007 12:02 am
- Operating System: Windows 10
Re: Export MP3 in float
Just to touch bases, where are you getting the information that the Audacity exported MP3 has 16-bit values?Luke M wrote:I realize it doesn't make a big difference, but why not export MP3 in float instead of 16-bit?
Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
Re: Export MP3 in float
https://code.google.com/p/audacity/sour ... ortMP3.cppGale Andrews wrote:Just to touch bases, where are you getting the information that the Audacity exported MP3 has 16-bit values?Luke M wrote:I realize it doesn't make a big difference, but why not export MP3 in float instead of 16-bit?
(You can see it's calling lame_encode_buffer_interleaved, which takes 16-bit PCM. The float version would be lame_encode_buffer_interleaved_ieee_float).
Let me know if this is the wrong place to browse the Audacity source code.
Again, not a serious problem...just something that isn't ideal.
-
Gale Andrews
- Quality Assurance
- Posts: 41761
- Joined: Fri Jul 27, 2007 12:02 am
- Operating System: Windows 10
Re: Export MP3 in float
The code has not changed with reference to your point, but we've moved to Git so the correct location is now https://github.com/audacity/audacity/bl ... ortMP3.cpp.Luke M wrote:https://code.google.com/p/audacity/sour ... ortMP3.cppGale Andrews wrote:Just to touch bases, where are you getting the information that the Audacity exported MP3 has 16-bit values?Luke M wrote:I realize it doesn't make a big difference, but why not export MP3 in float instead of 16-bit?
(You can see it's calling lame_encode_buffer_interleaved, which takes 16-bit PCM. The float version would be lame_encode_buffer_interleaved_ieee_float).
Let me know if this is the wrong place to browse the Audacity source code.
Can you point for comparison to an MP3 encoder that uses float versions of lame_encode_buffer?
Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
Re: Export MP3 in float
Thanks.Gale Andrews wrote:The code has not changed with reference to your point, but we've moved to Git so the correct location is now https://github.com/audacity/audacity/bl ... ortMP3.cpp.Luke M wrote:https://code.google.com/p/audacity/sour ... ortMP3.cppGale Andrews wrote:Just to touch bases, where are you getting the information that the Audacity exported MP3 has 16-bit values?Luke M wrote:I realize it doesn't make a big difference, but why not export MP3 in float instead of 16-bit?
(You can see it's calling lame_encode_buffer_interleaved, which takes 16-bit PCM. The float version would be lame_encode_buffer_interleaved_ieee_float).
Let me know if this is the wrong place to browse the Audacity source code.
Good question. I *assumed* that the standard LAME front end did, but no! It doesn't. So I don't know, maybe it would be a world first.Gale Andrews wrote:Can you point for comparison to an MP3 encoder that uses float versions of lame_encode_buffer?