Why extra headroom is needed for MP3s

Post
bitflipper
01100010 01101001 01110100 01100110 01101100 01101
2009/04/12 10:35:49
It's a nasty gloomy, rainy Sunday here in the Pacific Northwest, a good day for reading a book. Unfortunately, I have no new books to read, so I went back to some old favorites and was reading up on MP3 compression. Hey, I'm a hopeless geek, what can I say?

I decided to do some experiments to test a well-known truism, that you need to leave extra headroom when mastering for MP3s. It's true, by the way.

Here's a piece of an audio file in which Ozone has done its job of limiting output (in this case, to -1db, my longtime standard). Despite being a fairly highly-compressed section (about -9db RMS), no samples exceed -1db (the horizontal white line represents -1db):



Now here's a section of the same file that's been encoded to a high-quality MP3:



Note that a few peaks now exceed the previous limit. Fortunately, they're not overs because my conservative -1db limit left enough headroom to absorb these new peaks.

This phenomenon gets worse - much worse - with lower-quality MP3s. Below is the same song, this time encoded to 128Kb/s, CBR. Not the lowest quality, but representative of what Soundclick provides with a free account.



Note that many peaks now exceed the old limit, and in fact some of them are actual overs. The peaks have somehow grown by more than 1db.
bitflipper
01100010 01101001 01110100 01100110 01101100 01101
RE: Why extra headroom is needed for MP3s 2009/04/12 10:46:40
You can perform this test yourself using any audio editor. I used Adobe Audition, for its amplitude statistics feature, which reports overs. Sound Forge would work well, as would Audacity. Or even SONAR alone, if that's all you've got.

I simply loaded the original wave file (24/44.1) and took a screenshot, then saved it as an MP3 using Audition's highest VBR quality setting. I then closed the file and re-opened the MP3.

Audio editors cannot actually edit MP3 files directly. All of them, including SONAR, let you load MP3s. However, you are not looking at an MP3 but rather a wave file that was generated from the MP3. It is during this conversion to a wave that the peaks grow.

So you might be thinking that this is a quirk of the audio editor, and that it doesn't apply to MP3s that are never converted to waves. Wrong: every MP3 has to be converted to a wave if you want to actually hear it. It just normally happens inside the player. But the effect shown here applies to all MP3 files.
bitflipper
01100010 01101001 01110100 01100110 01101100 01101
RE: Why extra headroom is needed for MP3s 2009/04/12 11:46:06
You may be wondering why this occurs. It has to do with the fact that compression schemes such as MP3 rely on narrow bandpass filters.

You may recall that steep filters can cause ringing that raises peak levels. It's one of the reasons we usually try to avoid steep filters in mixing and mastering - but you can't avoid them if you're encoding to MP3.

There is a good article titled "Distortion to the People", written by Thomas Lund from TC Electronic and available as a pdf download. It discusses the need for headroom, not just with MP3 but other compressed formats and CDs. It recommends 5db headroom for MP3. Theoretically, you can get up to 6db increases when an MP3 is decoded.

Furthermore, uncompressed CDs are not immune from surprise peak values. Intersample peaks can be as much as 3db above the highest "peak" value when converted to analog.

Bottom line is that if you're mastering to -0.1db, or even -0.5db, stop that. Nobody is going to notice if your CD is limited to -2db or -3db, but the quality of your MP3s might noticeably improve if you do.
DaveClark
Max Output Level: -71 dBFS
RE: Why extra headroom is needed for MP3s 2009/04/12 13:24:50
Hi Dave,

Thanks for posting that.

The behavior you described is not limited to creating MP3's and expanding them again. Many types of processing of compressed audio can cause "overs." As you know, there is a lot of energy there --- the RMS values are high. *Anything* that detunes the very fine balance between all of the Fourier components could potentially unleash an over. The more severely compressed the audio, the more likely this will occur and the higher the "overs." Because MP3 compression is lossy, one should indeed expect detuning of this fine balance.

Regards,
Dave Clark

mixsit
Max Output Level: -75 dBFS
RE: Why extra headroom is needed for MP3s 2009/04/12 16:41:33
Thanks for posting this.
Wayne
Roflcopter
Max Output Level: -7.5 dBFS
RE: Why extra headroom is needed for MP3s 2009/04/12 20:02:42
There should be a law against pictures of obese wav files. They are fugly, man.

And then to think someone's Ipod will automatically normalize that yet again, with a bit of luck.



cliffsp8
Max Output Level: -83 dBFS
RE: Why extra headroom is needed for MP3s 2009/04/13 03:21:54
Yeah, I noticed that when converting to mp4/m4a files as well using Sound Forge or iTunes. A drum track limited to -2db grew to having peaks at full scale!

Not only that, but the mp4/m4a conversion also sometimes seems to crop about 20 -30 ms off the front of the file too and I'm having to add a bit of silence at the beginning before conversion to compensate. It may not seem a lot for a stand-alone file but if you are dropping compressed clips into a DAW its best to check that the transients of the audio line up where they should.

Cliff
The Maillard Reaction
Max Output Level: 0 dBFS
RE: Why extra headroom is needed for MP3s 2009/04/13 08:50:23
Now you have scared me... I'm about to send my first "single" to Tunecore to see if it can be placed on I-Tunes etc.

The idea that the mp3 is made automatically by the various "stores" and probably never auditioned by a human has been one thing that kept me from doing this earlier.

best regards,
mike
mattplaysguitar
Max Output Level: -55.5 dBFS
RE: Why extra headroom is needed for MP3s 2009/04/13 09:13:12
So, does a highly compressed track have more exceeding samples on average than a more dynamic one? Does the mp3 encoder kinda work worse on hot tracks, or is it just based on probability? A more compressed track will have a higher percentage of samples that are very close to the max headroom allowance than a less compressed one, so a less compressed one will have less overs as there were less samples within a dangerous range to become overs in the first place? Does that make sense? Either way, interesting stuff. If you got any recommended technical reading on this I would love to know.

Cheers
Roflcopter
Max Output Level: -7.5 dBFS
RE: Why extra headroom is needed for MP3s 2009/04/13 09:32:36
I think you also have to be careful with adding *lots* of mid/side spread and a ton or two of compression. Think that's also a good candidate.
bitflipper
01100010 01101001 01110100 01100110 01101100 01101
RE: Why extra headroom is needed for MP3s 2009/04/13 12:07:53
So, does a highly compressed track have more exceeding samples on average than a more dynamic one? Does the mp3 encoder kinda work worse on hot tracks, or is it just based on probability? A more compressed track will have a higher percentage of samples that are very close to the max headroom allowance than a less compressed one, so a less compressed one will have less overs as there were less samples within a dangerous range to become overs in the first place? Does that make sense? Either way, interesting stuff. If you got any recommended technical reading on this I would love to know.


Actually, highly-compressed files are not necessarily more likely to exhibit this problem, since it's about how many peaks cross the line. A lightly-compressed file could still have the same number of peaks that touch the limit, even though the average RMS is lower.

It's more about the chosen MP3 conversion quality. If, for example, you upload songs to a free Soundclick or MySpace account, they're going to convert it to 128KB/s CBR, not a particularly high-grade format. It will have worse problems than, say, a 256Kb/s file.

So if you're distributing MP3s at 320Kb/s CBR, you'll be OK as long as you maintain at least 1 or 2db headroom. (If you have a choice, CBR may be better than VBR, which is prone to sudden bursts of high-frequency content as the bitrate changes. VBR is better when file size is the overriding requirement.)

Here are a couple of relevant links:

Pleasurize Music Foundation: MP3 headroom
Pleasurize Music Foundation: intersample clipping
Distortion to the People

Principles of Digital Audio by Ken Pohlmann is a fat, dense textbook and if you have the patience to wade through it, contains a lot of good information, including a chapter on perceptual coding.
bitflipper
01100010 01101001 01110100 01100110 01101100 01101
RE: Why extra headroom is needed for MP3s 2009/04/13 12:10:13
Now you have scared me... I'm about to send my first "single" to Tunecore to see if it can be placed on I-Tunes etc.

The idea that the mp3 is made automatically by the various "stores" and probably never auditioned by a human has been one thing that kept me from doing this earlier.


How does that work, Mike? Do you send them a wave file and they do the conversion for you?
The Maillard Reaction
Max Output Level: 0 dBFS
RE: Why extra headroom is needed for MP3s 2009/04/13 13:04:54
I just sent them a .wav file 16/44 peaks at -1.2dBFS RMS at -14dBFS.

Once you send up your baby it's completely out of your hands.

Each vendor they supply too has a different way to do it but presumably it's all automated and quite heartless.

Tunecore began with accepting .mp3, then they moved to FLAC, now they request that you upload 16/44 .wav so that's what I did.

My wife is building me a shopping cart and I'll host and offer 320kbs .mp3 files direct from my site in the near future... because all the sites Tunecore will help yu with will only do lo-res. Apparently if someone in house at ITunes thinks its worthwhile they MAY offer a high res for you... but it's totally at their whim.

File all this under "you just have to try" because I'm not so much expecting anything to happen as I am acknowledging that nothing can happen if you do not make it possible. So I'm finally taking the first step.

best regards,
mike

batsbrew
Max Output Level: 0 dBFS
RE: Why extra headroom is needed for MP3s 2009/04/13 14:00:37
i now create my mp3's directly from WAVELAB, and at 320kbps, and i don't see these issues.

it's kinda f'd up that an mp3 encoder would apply algorhythms that cause gain increase on the data....
and do it so poorly.
bitflipper
01100010 01101001 01110100 01100110 01101100 01101
RE: Why extra headroom is needed for MP3s 2009/04/13 14:49:23
I guess the only way you'll know is to download their version and check it out. I wonder if you have any recourse if you don't like the result based on technical criteria.
The Maillard Reaction
Max Output Level: 0 dBFS
RE: Why extra headroom is needed for MP3s 2009/04/13 17:23:22

I figured I'd start with a "single" to see how it all works out.

It'll be 4-6 weeks before I expect to know if ITunes even accepts it.
julibee
Max Output Level: -47 dBFS
RE: Why extra headroom is needed for MP3s 2009/04/14 13:10:57
GREAT info bitflipper... I've been working so hard lately to get my stuff mixed better, and I'll add this to the pile! Grazie!
jimmyman
Max Output Level: -53.5 dBFS
RE: Why extra headroom is needed for MP3s 2009/04/14 13:21:41


may thanks for all your good info. the one thing im not clear on
is can an mpg be edited after conversion? it sounds like no it cant
in a way. does it convert to wav when its edited then when saved
converts back to mpg?

but the actual mpg isnt edited just a copy of it is?
Roflcopter
Max Output Level: -7.5 dBFS
RE: Why extra headroom is needed for MP3s 2009/04/14 13:25:30
If you edit an existing mpg and recompress it, and again, and again - you get the same results as when editing a jpg in Photoshop and saving it as jpg every time. After so many rounds there will be holes appearing in your file. It's awful.

That's why I never work on compressed files unless it's the only way to get the data. You want to work with either lossless compression, or failing that, none at all.
altima_boy_2001
Max Output Level: -55 dBFS
RE: Why extra headroom is needed for MP3s 2009/04/15 05:28:41
I believe there is software that will let you edit mp3 files without decompressing, but its functionality is limited to adding or removing encoded frames. This would allow things like trimming silence or joining 2 mp3 files into 1 file.
The Maillard Reaction
Max Output Level: 0 dBFS
RE: Why extra headroom is needed for MP3s 2009/04/15 07:21:46
Isn't it sort of like editing GOP video?
Roflcopter
Max Output Level: -7.5 dBFS
RE: Why extra headroom is needed for MP3s 2009/04/15 07:33:30
Any compressed file, essentially. If I edit video it goes from mpeg to lossless back to whatever - but anything I did to it never lost a single bit in the process, unless I thew it out.
auto_da_fe
Max Output Level: -56.5 dBFS
RE: Why extra headroom is needed for MP3s 2009/05/19 13:56:38
Bitflipper -

Do you use the free DR plug in from the pleasurize site ?

It looks like another interesting visual tool to help guide one to place where there would at lease be some consistency to the 'loudness' of one's efforts.

That MP3 tutorial you pasted may explain why my 'rough MP3s' sometimes sound better than my 'final MP3s'. (my rough MP3s I do not limit that much)

JR
rob.pulman
Max Output Level: -68 dBFS
RE: Why extra headroom is needed for MP3s 2009/05/19 15:51:19
I wonder if you can explain this to me, I'm a bit confused.

You mention the compression of the Soundclick site - when songs are uploaded there, they've already been compressed?

Sorry if this sounds daft, but just want to be clear on it.

I use the LAME encoder through Audacity to encode my Wavs - I don't know about bit rates etc, but could you explain how I could get a better quality mp3 from my Wavs? Is there anything I could do in Audacity to alter any settings that could give me better transfer to mp3?

many thanks
Rob
bitflipper
01100010 01101001 01110100 01100110 01101100 01101
RE: Why extra headroom is needed for MP3s 2009/05/19 16:49:04
Do you use the free DR plug in from the pleasurize site ?

Yes, I've been experimenting with both the offline version and the plugin.

At this time I am unable to say whether it's actually helped me much, though.

I am uncomfortable that its creator has not, AFAIK, publicly described its inner workings. I'm therefore not sure what it's really measuring, and not knowing that, I am not sure what useful information it's conveying.

But it's fun to play with.
bitflipper
01100010 01101001 01110100 01100110 01101100 01101
RE: Why extra headroom is needed for MP3s 2009/05/19 17:08:57
You mention the compression of the Soundclick site - when songs are uploaded there, they've already been compressed?

What happens is they are re-encoded to meet the site's requirements. As you might imagine, encoding the same file twice does not enhance its fidelity!

This applies to free Soundclick accounts only. Paid "premium" accounts just store the files you upload, without modification. But free accounts are restricted to 128kb/s CBR.

Anything else you send them, even 128kb/s VBR, will be automatically re-encoded and their quality reduced. Experimentation has shown that sending them a higher-quality file results in less degradation. But sending high-quality MP3s means bigger files, so you run into the catch-22 of the 10MB size limitation. You therefore want to send them the highest quality file that comes in under 10MB in size.

LAME has a boatload of options. Here is a list.

As for quality options, generally the higher the bit rate the better. 64kb/s is OK for speech. 128kb/s is about the minimal acceptable quality for music. 192kb/s is a good compromise between quality and file size. 256kb/s or 320kb/s is near-CD quality.

You can specify either constant or variable bit rates. With the latter, the encoder uses higher bit rates for sections that have a lot of high-frequency content and lower bit rates for sections that do not. The result is better resolution without increasing file size too much.

Use the -V n option to allow LAME to use variable bit rate (VBR), where n is a number between 0 and 9 that indicates the quality level. -V 0 gives the best quality, -V 9 gives the smallest files.

If you have a file size limitation (as with a free Soundclick account) you'll have to experiment to find which option you can get away with for any particular song. Start with -V 0 and see how big the file is. If it's too big, work your way down from -V 1 to -V 9 until you get the file size down where you need it to be.


SongCraft
Max Output Level: -36 dBFS
RE: Why extra headroom is needed for MP3s 2009/05/19 19:45:55
ORIGINAL: bitflipper

You mention the compression of the Soundclick site - when songs are uploaded there, they've already been compressed?

What happens is they are re-encoded to meet the site's requirements. As you might imagine, encoding the same file twice does not enhance its fidelity!

This applies to free Soundclick accounts only. Paid "premium" accounts just store the files you upload, without modification. But free accounts are restricted to 128kb/s CBR.

Anything else you send them, even 128kb/s VBR, will be automatically re-encoded and their quality reduced. Experimentation has shown that sending them a higher-quality file results in less degradation. But sending high-quality MP3s means bigger files, so you run into the catch-22 of the 10MB size limitation. You therefore want to send them the highest quality file that comes in under 10MB in size.

LAME has a boatload of options. Here is a list.

As for quality options, generally the higher the bit rate the better. 64kb/s is OK for speech. 128kb/s is about the minimal acceptable quality for music. 192kb/s is a good compromise between quality and file size. 256kb/s or 320kb/s is near-CD quality.

You can specify either constant or variable bit rates. With the latter, the encoder uses higher bit rates for sections that have a lot of high-frequency content and lower bit rates for sections that do not. The result is better resolution without increasing file size too much.

Use the -V n option to allow LAME to use variable bit rate (VBR), where n is a number between 0 and 9 that indicates the quality level. -V 0 gives the best quality, -V 9 gives the smallest files.

If you have a file size limitation (as with a free Soundclick account) you'll have to experiment to find which option you can get away with for any particular song. Start with -V 0 and see how big the file is. If it's too big, work your way down from -V 1 to -V 9 until you get the file size down where you need it to be.




Soundclick has both Lo-Fi and Hi-Fi Options for either free or paid accounts.

The file at Soundclick is re-encoded to Lo-Fi, if you take note when uploading be it free account or paid once the file is uploaded another window opens stating: 'now convertining to Lo-Fi' -- *ugh* I can live with 128kbs but I wish there was an option to not include Lo-Fi. Anyway... people soon realise it's best not to play the lo-fi version.

Generally! 128kbs is OK (not great but OK) anything less is not so great at all.

I set my main output levels to -1 and have never had any issues.

For years my mixes have always been -1 (outputs) including for CD release, however.... on some sites if their MP3 playback don't sound as good I simply reduce output level by another 1 or 2 but so far I have not had to do that because I have not had any issues other than corruption on upload (simply re-upload the same file and it's OK, if that option is not immediately available then contact support, they will remove it so you can try again).

Another thing is... increased peaks in that wavform you demonstrated is nothing to get overly worried about (if there's no horrible distortion or overly noticeable artifacts occuring) then live with it... that is just the nature of 'conversion' to MP3 format and we all know that isn't the best format but that's what a lot of listeners are use to (MP3) and some bands offer as a 'free' song (single) download (this is a good marketing stradegy I am seriously consider doing after reading up on it and since piracy can't be beaten) I understand why MP3 downloads is all too common it's because the band or record label wants to generate more interest for fans to purchase their CD (Thank you for downloading our song (MP3 format), we also have a CD available that is of the highest quality - click here to purchase) Having said that... do you get what I'm trying to say Bitflipper? bands give MP3 away for free so what if the sound is less than spactacular compared to CD. It's the song that matters most to fans and if they want more and if they want a better quality product give them the option to BUY the CD. Please read the following article: Click Here
post edited by SongCraft - 2009/05/19 20:01:11
rob.pulman
Max Output Level: -68 dBFS
RE: Why extra headroom is needed for MP3s 2009/05/20 01:10:23
Thanks for the info -

I just thought wavs got converted and that was it, didn't realise there was so much to it, different qualities etc.

I'll have a tinker about with LAME, see what happens.
Texrat
Max Output Level: -60 dBFS
RE: Why extra headroom is needed for MP3s 2009/05/20 10:07:37
So bit-- has this revelation induced you to consider rethinking your ceiling, to maybe -2 db?
No How
Max Output Level: -23.5 dBFS
RE: Why extra headroom is needed for MP3s 2009/05/21 13:12:22
What a blessing to find this thread.

these last couple weeks i've been rackin' my brain trying to figure why the mp3 is distorting when the wav isn't.

I keep going back into projects to take down more and more high end so it doens't screech... but to no avail.
of course an intelligent logical guy would immediately put 2 and 2 together.

I see i need to get something i've never gotten before....HEADROOM.
also: I'm using the mp3 converter in Audacity. I'll experiment with 'V'

(Thanks,Bit.)

post edited by No How - 2009/05/21 14:27:15
7-string_guy
Max Output Level: -82 dBFS
RE: Why extra headroom is needed for MP3s 2009/05/21 20:11:28
thanks mr flipper. that was a great read
rob.pulman
Max Output Level: -68 dBFS
RE: Why extra headroom is needed for MP3s 2009/06/02 02:45:41
I know this is resurrecting an old thread, but what the hell.

Can anyone explain how I actually alter the bitrate for the LAME convertor? I looked at the link from Bitflipper, and I understand that by altering the '-Vn' number in the code (numbers from 0-9 I think they are), I'll achieve better conversion resulting in a bigger mp3 file.

Thing is, I can't actually figure out how to physically do it in LAME.

My mp3s now usually turn out about 3.5mb, so I could really have a better conversion rate and still not exceed the 10mb Soundclick limit.

Any help would be appreciated, I'm also thankful for the explanations given on this thread previously.

My wife says I've got a brain like a computer - information needs to be punched into it.
Bob Oister
Max Output Level: -47.5 dBFS
RE: Why extra headroom is needed for MP3s 2009/06/02 03:03:51
Hi, Rob,

Lately I’ve switched to using the free “MediaCoder Audio Edition” as a front end for LAME. You can find it here: http://mediacoder.sourceforge.net/index.htm

It’s very user friendly and makes it easy to utilize all of the options available in LAME. You can easily switch conversion bitrates by choosing from a dropdown box full of choices.

Hope this helps!
Bob
DaveClark
Max Output Level: -71 dBFS
RE: Why extra headroom is needed for MP3s 2009/06/02 09:30:12
Hi Rob,

The -b option sets the bit rate, for example

lame -h -b 320 file.wav file.mp3

gives very high quality.

Regards,
Dave Clark

post edited by DaveClark - 2009/06/02 09:41:02
rob.pulman
Max Output Level: -68 dBFS
RE: Why extra headroom is needed for MP3s 2009/06/02 14:56:16
Thanks very much for the info.

Bob - I'll definitely check out the mediacoder, soon as I get home off this nightshift!

Cheers
Rob
rm5700@optonline.net
Max Output Level: -71 dBFS
RE: Why extra headroom is needed for MP3s 2009/06/02 20:15:31
Great info, and interesting...thanks for this Bitflipper
Lanceindastudio
Max Output Level: -29 dBFS
RE: Why extra headroom is needed for MP3s 2009/06/03 05:41:59
Good stuff Bit- thanx Bro
rob.pulman
Max Output Level: -68 dBFS
RE: Why extra headroom is needed for MP3s 2009/06/04 14:01:46
Bob I'm trying to convert wav to mp3 using the mediacoder at the moment. Everything looks ok, but when I go to play the final mp3 I get nothing but a hiss noise..no song lol.

Any ideas?

PS - I downloaded the 32 bit version mediacoder (not the 64 bit)...I'm using XP. Have I downloaded the right version of mediacoder?

Thanks
Bob Oister
Max Output Level: -47.5 dBFS
RE: Why extra headroom is needed for MP3s 2009/06/05 04:46:56
Hi, Rob,

I switched to MediaCoder because my new DAW is running Vista 64, so I’m using the 64 bit version and I recently upgraded from version 0.6.2 to version 0.7.0 listed on their download page.

Maybe you didn’t download the “Audio Edition”. They have four different editions with multiple versions on the download page. Go to the download page, click the link that says “Media Coder 0.7.0 (active version), then on the next page click on the top choice, “Media Coder Audio Edition” on the next page select either 32-bit or 64-bit.

When the software is installed and running, I just click the “+” button at the top left of the software to locate and select the Wav file that I want to convert to MP3, make sure the “LAME MP3” tab is selected on the right side of the middle section of the software, and then choose a quality preset from the dropdown box. When you choose any preset, you should be able to see the LAME command line in the box below change to reflect the command properties of whatever preset you choose. Next click the “Start” button at the right of the top menu.

You should then see the fly-out encoding status box while it’s working and then the “Successful” message when the new MP3 file is created.

The properties box at the top right shows the size of both the original Wav file and the new MP3.

Hope this helps!
Bob

bitflipper
01100010 01101001 01110100 01100110 01101100 01101
RE: Why extra headroom is needed for MP3s 2009/06/05 11:59:12
I get nothing but a hiss noise

That's usually the result of attempting to encode a 32-bit file. No standalone MP3 encoders I know of can handle floating-point files. Some can't even handle 24-bit integer files. You can, however, encode MP3 using full-featured editors such as Adobe Audition.
rob.pulman
Max Output Level: -68 dBFS
RE: Why extra headroom is needed for MP3s 2009/06/05 14:52:05
Thanks for that Bob. I just started a new thread about it, didnt see your answer here.
jcatena
Max Output Level: -82 dBFS
RE: Why extra headroom is needed for MP3s 2009/06/13 10:20:08
Note that as Bitflipper wrote, not only mp3 is affected.
For example, any modern DAC does oversampling, where the interpolation can result in samples of higher values than any in the input. Furthermore, a steep antialiasing filter is applied, that will have some ripple. In most cases the filter itself applies some neagtive gain to reduce the probability of clipping, but you don't know how much margin it provides internally, if any. Any sample rate conversion also results in peak levels that can be higher than in the input. And most common DSP algorithms.
So definitely its good to leave some headroom, but how much? You can only guess depending on the distribution format. MP3 or any loosie format needs more, and the more as loosier.
Hopefully all players will use ReplayGain soon. If this happens it will solve many problems, the most important one that you can not make your song sound louder than others through more dynamic range compression, neither you need to destroy it in order to sound as loud as the worst one. So we could deliver our music with as much headroom and dynamics as we wish.
The music industry should have set a standard for levels, as the cinema industry did, but sadly this never happened, and today, at least in pop/rock/dance, everything is delivered so highly compressed that it is virtually impossible to master to similar average levels without seriously compromising the quality. Most stuff is well above -10 dB RMS, many even above -5, that's ridiculous and everything sound like crap. Even first line bands that used to wound well, sound now horrible. The solution is so easy, but nobody wants to be the first delivering music that requires to turn up the playback volume to sound as loud as other's. If finally ReplayGain becomes standard in most players, we couild finally do it the right way, and the user will not need to change the playback volume, will not notice anything but a better, undistorted sound.
DaveClark
Max Output Level: -71 dBFS
RE: Why extra headroom is needed for MP3s 2009/06/13 12:34:08
Hi Jose,

Note that as Bitflipper wrote, not only mp3 is affected.


I thought I said that in reponse to Dave's (bitflipper's) initial posts... Did I miss something? Too many "Dave's?"

Regards,
Dave Clark

jcatena
Max Output Level: -82 dBFS
RE: Why extra headroom is needed for MP3s 2009/06/14 11:10:43
> I thought I said that in reponse to Dave's (bitflipper's) initial posts... Did I miss something? Too many "Dave's?"

Sorry Dave, you said it well. I only wanted to state two implications not mentioned before that you and many may know, but perhaps others don't. I was not aswering to you or anyone in particular.
peggysuechan
Max Output Level: -79 dBFS
Re: RE: Why extra headroom is needed for MP3s 2009/12/10 17:38:14
So how do we leave headroom? Who, what, where, when, why, and how in the world is this -1db that y'all're talking about?
 
feedback50
Max Output Level: -79 dBFS
Re: RE: Why extra headroom is needed for MP3s 2009/12/10 18:49:39
Check out the peak values on the main bus meter and adjust levels accordingly.
peggysuechan
Max Output Level: -79 dBFS
Re: RE: Why extra headroom is needed for MP3s 2009/12/10 18:58:35
I make sure the thingy doesn't go into the pink area, above the 6 in the track view. I should make the thingy go even lower?
timidi
Max Output Level: -21 dBFS
Re: RE: Why extra headroom is needed for MP3s 2009/12/10 19:10:35
thanks bitflipper. good info.
peggysuechan
Max Output Level: -79 dBFS
Re: RE: Why extra headroom is needed for MP3s 2009/12/10 19:52:58
peggysuechan


I make sure the thingy doesn't go into the pink area, above the 6 in the track view. I should make the thingy go even lower?


Bump.
brundlefly
Max Output Level: 0 dBFS
Re: RE: Why extra headroom is needed for MP3s 2009/12/11 14:40:43
peggysuechan


I make sure the thingy doesn't go into the pink area, above the 6 in the track view. I should make the thingy go even lower?
It depends on whether the "thingy" is the RMS meter (red bar) or the peak meter (little red dot to the right of the bar, or by itself if RMS is not enabled). Keeping track peaks under -6dB  and Master bus peaks under -1dB is a good rule of thumb. But RMS ("average") signal strength will typically be another 6dB or more below that peak level. If you don't have peak indicators enabled, and your RMS (the bar) is hitting -6dB, then the peaks could easily go over 0dB (clipping)... but you'd see that in the peak numbers and the peak warning marker at the end of the meter.


bitflipper
01100010 01101001 01110100 01100110 01101100 01101
Re: RE: Why extra headroom is needed for MP3s 2009/12/11 17:06:25
I make sure the thingy doesn't go into the pink area, above the 6 in the track view. I should make the thingy go even lower?


"I make sure the thingy doesn't go into the pink area" - don't let those Coffee House jokers get hold of that one!

If you're working in a purely analog environment, the rule is simple: keep every meter in the signal chain out of the red, in order to avoid clipping at every stage. That applies to everything from your mic preamp to your effects to your tape machine. (OK, the tape machine is forgiving and is routinely hit hard, but even it has limits and can also produce unpleasant distortion when driven too hard.)

In the digital realm we're given a lot more room for sloppiness, at least in SONAR. That's because SONAR works with floating-point data internally. The handy thing about floating-point data is if the number ever gets too big, we just scootch the decimal point over and we're good. It is virtually impossible to damage a signal as long as it's stored and manipulated as floating-point data.

But digital-to-analog converters do not work with floating-point numbers. At that stage, our audio has to return to the world of integer, fixed-point representation. At that stage, you get 24 bits (or 16 bits) to work with, period. Once you've used all 24 (or 16) of them up then there's no place left to go, and severe distortion results.

But that nastiness only happens at the final stage of the recording process. Up until then, you can peg the meters into the red if you want to (it's still not a good idea, though) and no harm will come to your signal. (Yeh, there are esoteric arguments about loss of resolution, loss of bits, but don't worry about that - it's rarely a significant concern.)

What we're talking about here is the final output levels, which usually means the output of your mastering limiter. That's where you want to make sure you stay out of the red.

You also don't want to drive your limiter so hard that it has no headroom to work within. Drive the limiter too hot and it can't do its thing, which is to decide how much of that headroom to use. It will dutifully keep your output under control, but it may horribly mangle your sound in the process. Since most limiters have an input trim control, all you have to do is turn that control down. That way, no matter what you're throwing at the limiter it'll bring it down to a sensible level before applying limiting. If your limiter doesn't have an input control, you can use the bus trim instead.

So the short answer can be condensed to three rules:
1. Try to keep your tracks out of the red but don't obsess over it. 1 or 2db into the red is usually OK.
2. Make sure the levels going in to the limiter are -6db or lower
3. Make sure the output of the limiter is -1db to -3db, the latter recommended if the next step is MP3 encoding



plectrumpusher
Max Output Level: -81 dBFS
Re: RE: Why extra headroom is needed for MP3s 2009/12/11 17:20:39
bitflipper



I make sure the thingy doesn't go into the pink area, above the 6 in the track view. I should make the thingy go even lower?


"I make sure the thingy doesn't go into the pink area" - don't let those Coffee House jokers get hold of that one!

If you're working in a purely analog environment, the rule is simple: keep every meter in the signal chain out of the red, in order to avoid clipping at every stage. That applies to everything from your mic preamp to your effects to your tape machine. (OK, the tape machine is forgiving and is routinely hit hard, but even it has limits and can also produce unpleasant distortion when driven too hard.)

In the digital realm we're given a lot more room for sloppiness, at least in SONAR. That's because SONAR works with floating-point data internally. The handy thing about floating-point data is if the number ever gets too big, we just scootch the decimal point over and we're good. It is virtually impossible to damage a signal as long as it's stored and manipulated as floating-point data.

But digital-to-analog converters do not work with floating-point numbers. At that stage, our audio has to return to the world of integer, fixed-point representation. At that stage, you get 24 bits (or 16 bits) to work with, period. Once you've used all 24 (or 16) of them up then there's no place left to go, and severe distortion results.

But that nastiness only happens at the final stage of the recording process. Up until then, you can peg the meters into the red if you want to (it's still not a good idea, though) and no harm will come to your signal. (Yeh, there are esoteric arguments about loss of resolution, loss of bits, but don't worry about that - it's rarely a significant concern.)

What we're talking about here is the final output levels, which usually means the output of your mastering limiter. That's where you want to make sure you stay out of the red.

You also don't want to drive your limiter so hard that it has no headroom to work within. Drive the limiter too hot and it can't do its thing, which is to decide how much of that headroom to use. It will dutifully keep your output under control, but it may horribly mangle your sound in the process. Since most limiters have an input trim control, all you have to do is turn that control down. That way, no matter what you're throwing at the limiter it'll bring it down to a sensible level before applying limiting. If your limiter doesn't have an input control, you can use the bus trim instead.

So the short answer can be condensed to three rules:
1. Try to keep your tracks out of the red but don't obsess over it. 1 or 2db into the red is usually OK.
2. Make sure the levels going in to the limiter are -6db or lower
3. Make sure the output of the limiter is -1db to -3db, the latter recommended if the next step is MP3 encoding

 
 
 
Another option if you think you are square waving you transients is to create  a null test and listen to the difference file that results , a real eye(ear !!) opener. Then just think of what the poor  perceptual codec mp3 encoder is going to do with that !!
 
dontletmedrown
Max Output Level: -58 dBFS
RE: Why extra headroom is needed for MP3s 2009/12/11 18:47:39
mike_mccue


I figured I'd start with a "single" to see how it all works out.

It'll be 4-6 weeks before I expect to know if ITunes even accepts it.


Good god.  I recommend using Tunecore instead of going direct.  They have gotten some of my clients' onto iTunes in just a couple of days.
patm300e
Max Output Level: -74 dBFS
RE: Why extra headroom is needed for MP3s 2011/01/04 09:01:34
 
http://mediacoder.sourceforge.net/index.htm
Media Coder looks to be dead code now, any other good options?

post edited by patm300e - 2011/01/04 09:03:54
bitflipper
01100010 01101001 01110100 01100110 01101100 01101
RE: Why extra headroom is needed for MP3s 2011/01/04 11:45:23
MediaCoder is still alive, but has been accused of being a carrier for adware.

Audacity might be an alternative.
patm300e
Max Output Level: -74 dBFS
RE: Why extra headroom is needed for MP3s 2011/01/04 12:48:19
Thanks.  I am going to check out Audacity, but I think I might just use the LAME encoder called from inside X1a...
 
BTW, here is a link to the thread that contains info on LAME inside X1a:

http://forum.cakewalk.com/tm.aspx?m=2170770&high=LAME+Mp3+Setup


post edited by patm300e - 2011/01/04 12:49:38
Alegria
Max Output Level: -54.5 dBFS
RE: Why extra headroom is needed for MP3s 2011/01/04 12:57:10
"bitflipper"
This applies to free Soundclick accounts only. Paid "premium" accounts just store the files you upload, without modification. But free accounts are restricted to 128kb/s CBR.



I had a VIP account at SoundClick for about 6 months, before I cancelled. One of the reasons I went for it in the first place was for the higher bit-rate mp3s. I was under the impression that they were going to be streamed at that rate. Not the case at all. They stream everything without exception @ 128 kbps. The higher bit-rate mp3 (unconverted) is only available for downloads. And although the information for this is hard to find on their site, "Tolgar" has confirmed this when directly asked about it.


In conclusion, a VIP account would make sense only if you're selling your works and want to offer the highest mp3 quality as a download only, after a purchase.
bitflipper
01100010 01101001 01110100 01100110 01101100 01101
RE: Why extra headroom is needed for MP3s 2011/01/04 15:15:13
Most hosting sites do stream at 128kb/s, ostensibly because they want the quality of paid downloads to be better by comparison. If you could stream at 256 or 320, you could then simply capture the stream and obtain the higher quality for free. Even Band Camp, which supports free downloads in any format, including uncompressed waves, streams at 128kb/s.

You're right, a VIP account only makes sense if you have ambitions of making money from downloads. Fortunately, I am unencumbered by any such designs and I'd like to offer high-quality free downloads. One way to accomplish this from a free SoundClick account is to link to another download site. Your ISP probably provides an adequate amount of free storage where you can copy your songs to, and sneak a link into your song descriptions on SoundClick.
Alegria
Max Output Level: -54.5 dBFS
RE: Why extra headroom is needed for MP3s 2011/01/04 15:32:08
Thanks for the tip, but I have my own site now (at a comparable cost to a VIP SoundClick account). And yes, I'm "pseudo-streaming" at 320 kbps. Theirs nothing like it.