IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
24 bit lossless to mp3 using lame, For best quality, do I normalize it first?
mezzanine
post Jan 19 2012, 10:37
Post #1





Group: Members
Posts: 3
Joined: 3-January 12
Member No.: 96202



I want to convert a 24 bit FLAC to v0 mp3. (the source is not vinyl, I'd like to avoid that conversation)
Currently its highest peak is -9dBFS which is pretty quiet. Should I normalize the 24-bit file so that it peaks at the maximum value first?

An alternative way to word this question:
Does lame truncate 24 bits to 16 bits before encoding?

I'm also curious about dithering. Should I dither to 16 bits using a high quality algorithm like SoX and then feed that to lame to encode?

Thanks!
Go to the top of the page
+Quote Post
hlloyge
post Jan 19 2012, 11:51
Post #2





Group: Members
Posts: 689
Joined: 10-January 06
From: Zagreb
Member No.: 27018



AFAIK, mp3 doesn't really have bit-depth. So, you could normalize it to almost 0 dB (I would do peak normalization to -1 dB), and then just send it to encoder.
Maybe there is better way.

This post has been edited by hlloyge: Jan 19 2012, 11:54
Go to the top of the page
+Quote Post
punkrockdude
post Jan 19 2012, 13:12
Post #3





Group: Members
Posts: 243
Joined: 21-February 05
Member No.: 20022



I actually did tests on some encoders last week with 24 bit integer files and "an mp3 encoder" was one of very few that preserved sounds around -130dBFS just like it would sound around -13dBFS. Regards.
Go to the top of the page
+Quote Post
DVDdoug
post Jan 19 2012, 18:52
Post #4





Group: Members
Posts: 2445
Joined: 24-August 07
From: Silicon Valley
Member No.: 46454



QUOTE
An alternative way to word this question: Does lame truncate 24 bits to 16 bits before encoding?
No.

QUOTE
Currently its highest peak is -9dBFS which is pretty quiet. Should I normalize the 24-bit file so that it peaks at the maximum value first?
If it "feels" too quiet, then yes I'd normalize. Since you are probably going to crank-up the volume during playback, you might as well make it more convenient by "permanently" cranking-up the volume.

QUOTE
I'm also curious about dithering. Should I dither to 16-bits using a high quality algorithm like SoX and then feed that to lame to encode?
In this case, you don't need to downsample.

Whenever you downsample to 16-bits, it's up to you if you want to dither or what algorithm/application you want to use... At 16-bits, the dither is somewhere around -90dB and nobody is going to know if you dithered or not, or if you used a "good" dither algorithm. wink.gif
Go to the top of the page
+Quote Post
slks
post Jan 20 2012, 02:44
Post #5





Group: Members
Posts: 375
Joined: 31-March 06
From: Houston, Texas
Member No.: 29046



The bit depth refers to the number of bits used to represent the amplitude of one sample, in uncompressed PCM audio. MP3 uses some kind of mathematical trickery on the audio signal (I believe it's called an FFT) so that each sample does not have to be represented individually, thus there is no bit depth in an MP3 file.

However, when your MP3 gets converted back to PCM audio during playback, it again has a bit depth. Now generally with audio editing software, and for foobar2000, they decode to 32-bit PCM internally, so you won't have any issues with the audio levels being too close to the noise floor there.

So, if you wish, you can leave the audio as-is (peaking at -9 dB) and not run into any problems. LAME accepts 24-bit PCM input directly, and the MP3s internally have no bit depth, so you won't run into any problems from the signal level being too low, unless you end up having to convert it to 16-bit PCM at some point in the future (for example, if you want to put it on a CD). Even then, the quantization noise from the lower bit depth may or may not be audible. That depends more on the average signal level, rather than the peaks.

What I always do with the audio is to normalize it so that the highest peak is at 0 dB, this way I get the maximum amount of volume. If your highest peak is at -9 dB, and you end up converting the audio to 16-bit at some point, you effectively only use 14.5 bits of resolution. (Each bit adds another 6 dB of dynamic range).


--------------------
http://www.last.fm/user/sls/
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 23rd April 2014 - 11:13