Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: LAME 3.95.1 lowpass filter transition bands (Read 6314 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

LAME 3.95.1 lowpass filter transition bands

I tried searching for "lowpass" and mostly came up with suggestions for settings without much explanation.  I'm hoping someone can point me to a lot of information about how the transition band works.

To give everybody some background...  I've been using --alt preset standard for quite some time, and the results have always been great.  I did a few tests and could notice a some problems on the samples designed to break the codec but overall have been more than pleased with the transparency of the setting.

I just got some relatively good tweeters for my car (a set of four Infinity Kappas with the external crossovers).  By audiophile standards I'm sure this is nothing special, but it's much better than the speakers on my TV, computer, walkman, etc.  They sound beautiful with most CD's, but all my MP3's sound tinny.  I'm really not sure about the "--alt preset standard" encodes.  Maybe it's just my mind playing tricks on me, but all my lower bitrate MP3's definitely have horrible treble.  I don't care enough to re-rip all my CD's.  If I do that, I may just go with FLAC.  For now, though, I am concerned about the high-frequency quality of future MP3 encodes.

So, I'm thinking of switching to "--alt preset extreme" for everything.  I'm trying to figure out exactly what the lowpass filter does, though.  I went through all the presets in LAME 3.95.1, and I noticed the following:

Code: [Select]
LAME 3.95.1 polyphase lowpass filter transition bands
-----------------------------------------------------

ABR   8+ transition band =  1968 Hz -  2065 Hz (resample  8 kHz)    MPEG-2.5 Layer III
ABR  12+ transition band =  3645 Hz -  3742 Hz (resample  8 kHz)    MPEG-2.5 Layer III
ABR  20+ transition band =  3903 Hz -  4000 Hz (resample  8 kHz)    MPEG-2.5 Layer III
ABR  28+ transition band =  5484 Hz -  5677 Hz (resample 16 kHz)    MPEG-2 Layer III
ABR  36+ transition band =  7032 Hz -  7226 Hz (resample 16 kHz)    MPEG-2 Layer III
ABR  44+ transition band =  7557 Hz -  7824 Hz (resample 22.05 kHz) MPEG-2 Layer III
ABR  52+ transition band =  9774 Hz - 10065 Hz (resample 24 kHz)    MPEG-2 Layer III
ABR  60+ transition band = 10935 Hz - 11226 Hz (resample 24 kHz)    MPEG-2 Layer III
ABR  72+ transition band = 13548 Hz - 13935 Hz (resample 32 kHz)    MPEG-1 Layer III
ABR  88+ transition band = 15115 Hz - 15648 Hz (44.1 kHz)           MPEG-1 Layer III
ABR 104+ transition band = 15826 Hz - 16360 Hz
ABR 120+ transition band = 17249 Hz - 17782 Hz
ABR 144+ transition band = 17960 Hz - 18494 Hz ____ standard has a unique band
standard transition band = 18671 Hz - 19205 Hz
ABR 176+ transition band = 19383 Hz - 19916 Hz \___ ABR 176-207 shares with extreme
extreme  transition band = 19383 Hz - 19916 Hz /
ABR 208+ transition band = 20094 Hz - 20627 Hz \___ ABR 208-320 shares with insane
insane   transition band = 20094 Hz - 20627 Hz /  

(CBR bands always match ABR bands)


These bands seem a little strange to me.

Doesn't a higher transition band mean that your high frequencies will sound better as long as you have enough bitrate?

"--preset standard" is around 192kbps (theoretically better than ABR 192) with a transition band that starts at 18,671 Hz.  Why does ABR 176 have a transition band that starts higher at 19,383 Hz when it is a lower quality encode?

"--preset extreme" is around 256kbps (theoretically better than ABR 256) with a transition band that starts at 19,383 Hz.  Why do the bitrates between ABR 176 and ABR 207 share the same transition band?

ABR 208 has the same transition band as "--preset insane".  ABR 208 is probably going to be about the same or lower quality than "--preset standard", but it shares the same band with the highest possible quality setting.

It doesn't seem like a good idea, but if I want to improve high-frequency quality, should I be using the "--lowpass" and "--lowpass-width" switches?  Perhaps I should do some test encodes with the "insane" setting and then move around the transition band to see if I can really tell any difference between an 18,000 Hz cutoff and a 20,000 Hz cutoff.

My speakers are supposed to have a response up to 21,000 Hz.  Some tweeters go up to 30,000 Hz, but I seriously doubt anything over 20,000 matters.  But, OTOH, 44.1 KHz CD audio can technically reproduce frequencies up to 22,500 Hz...  Why would DVD use 48 KHz which can reproduce frequencies up to 24,000 Hz if it didn't matter?

Anyway, it just seems odd to me that the cutoff for "preset extreme" starts at 19,383 Hz while the cutoff for ABR 208 starts at 20,094.  Maybe a higher cutoff is just wasting bitrate and I'd be better off with the lower cutoff.

I'm thinking about this way too much, and I'm extremely uninformed on the topic.  The bottom line is that my ears are pretty sensitive to MP3's sounding "tinny," but maybe this doesn't even have anything to do with the lowpass filter.  Maybe it's just artifacts from an overall lower quality encode.

Any info/recommendations are appreciated.

LAME 3.95.1 lowpass filter transition bands

Reply #1
If you want to find out if there are audible differences for you caused by lame's lowpass, try using lowpass filters without lossy encoding first:

- Get some wave editor like Audition (fully functional trial version AFAIK) or Audacity (free).
- Take some (samples from) tracks that seem to have audible problems with lame --alt-preset standard in your car.
- Use the wave editor to create copies with different lowpasses (16/17/18 ... /21kHz), lowpass width is not that important here, just use something comparable to lame's lowpass width.
- Burn an audio CD containing the samples you've created, ideally you let someone else do this in a randomized order (writing it down for checking later).
- Listen to the CD in your car (maybe in radom mode with someone else looking at the car stereo's display) and check if you hear differences reliably (-> ABX section in the FAQ).

Now if you really hear 18kHz (or higher) lowpass, the question is: Why?

One possibility is you have exceptional hearing for someone old enough to drive a car.
More likely, something weird happens on playback like DAC causing aliasing of inaudible high frequencies to lower frequency bands or intermodulation distortion.
Check this by repeating the same test using decent hifi equipment (standalone CD player + good headphones, you can e.g. go to a hifi store and say you want to check some equipment with your special CD etc.)

To give some general answers to the questions from the 2nd part of your thread:
- At non-ear/equipment damaging volume, the limit of human hearing (pure sine tones) is between 16 and 20kHz (see some "How high can you hear" and similar threads <- Search function)
- The main advantage of higher sampling rates (DVD-A) is that good sounding filters (playback equipment) can be desinged much easier/cheaper and with less compromises (e.g. ringing).
- The presets standard, extreme an insane (talking about 3.90.x) have been created + tuned aiming at best quality, the lowpass settings have been chosen to give best possible compromise between saving bits to avoid artifacts and spending bits on high frequencies. One speculative explanation for higher lowpass of ABR is that the ABR presets are not tuned to spend as many bits on problematic passages like transients, resulting in e.g. more pre-echo but OTH the saved bits can be used for high frequencies (i.e. higher lowpass).
Let's suppose that rain washes out a picnic. Who is feeling negative? The rain? Or YOU? What's causing the negative feeling? The rain or your reaction? - Anthony De Mello

LAME 3.95.1 lowpass filter transition bands

Reply #2
Abr/cbr have the same behaviour as a vbr mode using -Y regarding high frequencies.

LAME 3.95.1 lowpass filter transition bands

Reply #3
Honestly, I can't say "--alt-preset standard" sounds tinny in the slightest to me.  All my lower quality MP3's used to sound "good enough" until I got the good speakers, though, so I guess I'm just thinking of having a little... umm... breathing room in my encodes?

I don't really think it would be a good idea to start messing around with many command line options.  I was mostly just thinking of changing up to "--alt-preset extreme" because I'm not that concerned about the extra space, but the more I look the more I see that not many people are impressed with the extreme setting.  I looks like if standard has problems with something, extreme usually won't be much better, and it looks like more effort has gone into tuning standard in the first place.

So, I guess I'll stick with standard.  I'm using 3.95.1 -V2 now.  I'm not that picky about it; I just like understanding how things work, and I was confused by the lowpass bands.

Quote
One speculative explanation for higher lowpass of ABR is that the ABR presets are not tuned to spend as many bits on problematic passages like transients, resulting in e.g. more pre-echo but OTH the saved bits can be used for high frequencies (i.e. higher lowpass).


That's what it seems like.  It still doesn't make much sense, though.  You'd think ABR would be better if you'd just lower the lowpass and maybe let it behave more like the presets.  I'm 28, and I don't think I'm going to be hearing much over 18 KHz.  If I used extreme, I would probably want to lower the lowpass to the same as standard so the extra bits aren't wasted on things you don't hear.  I don't see that as being necessary in the first place, though...  So I guess I'll just forget it all and stick with standard.

LAME 3.95.1 lowpass filter transition bands

Reply #4
Quote
Quote
One speculative explanation for higher lowpass of ABR is that the ABR presets are not tuned to spend as many bits on problematic passages like transients, resulting in e.g. more pre-echo but OTH the saved bits can be used for high frequencies (i.e. higher lowpass).


That's what it seems like.  It still doesn't make much sense, though.  You'd think ABR would be better if you'd just lower the lowpass and maybe let it behave more like the presets.  ...

Gabriel's post implies that my explanation was wrong.
Quote
Abr/cbr have the same behaviour as a vbr mode using -Y regarding high frequencies.

This means that in spite of the higher lowpass, most content > 16kHz isn't encoded at all, only strong signals > 16kHz are kept (could be regarded as adaptive lowpass).
Let's suppose that rain washes out a picnic. Who is feeling negative? The rain? Or YOU? What's causing the negative feeling? The rain or your reaction? - Anthony De Mello