Skip to main content

Topic: How to prevent lame from cutting the spectrum? (Read 16566 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • mzso
  • [*][*][*]
How to prevent lame from cutting the spectrum?
Hi!
I tried increasing the lowpass value, but it didn't do anything useful. It only cut almost everything when I set it too high. But it never would leave the upper portions alone.
Also what's --lowpass-width supposed to do?

  • mixminus1
  • [*][*][*][*][*]
How to prevent lame from cutting the spectrum?
Reply #1
Why do you want to do this?
"Not sure what the question is, but the answer is probably no."

  • pdq
  • [*][*][*][*][*]
How to prevent lame from cutting the spectrum?
Reply #2
As I understand it, the option to eliminate any lowpass filtering was removed in current versions of LAME, because this is generally a bad idea. You might try older versions where this was still possible.

Edit: I think what happened when you set the lowpass too high was it switched from assuming Hz to assuming kHz.

Edit2: I think I got that backwards - below 20 something it assumes this is kHz, above it assumes Hz. To be safe, always specify in Hz so there is no confusion.
  • Last Edit: 15 September, 2011, 09:52:52 AM by pdq

  • Northpack
  • [*][*][*][*]
How to prevent lame from cutting the spectrum?
Reply #3
I tried increasing the lowpass value, but it didn't do anything useful.

Even if it worked it wouldn't do anything useful but possibly lower the perceptual quality of your MP3s. If you absolutely have to avoid low pass filtering, for whatever reason, you should use lossless encoding anyway.
  • Last Edit: 15 September, 2011, 10:12:32 AM by Northpack

  • lvqcl
  • [*][*][*][*][*]
  • Developer
How to prevent lame from cutting the spectrum?
Reply #4
To disable lowpass filter, use --lowpass -1 switch. But chances are high that LAME will remove high frequencies anyway because of its psychoacoustic model.

  • mjb2006
  • [*][*][*][*][*]
How to prevent lame from cutting the spectrum?
Reply #5
The higher-frequency content you're seeking to preserve tends to be more noise-like, thus more difficult to encode...your efforts to preserve it may well starve the rest of the spectrum of bits, impacting the quality at frequencies you're much more likely to notice. MP3 in particular also has difficulty with resolution above 16 kHz; Google "sfb21". At higher bitrates, depending on the characteristics of the audio and the psychoacoustic model, LAME will strategically allow higher-frequency content to be preserved. If you're not getting it, you don't need it. If you still think you need it, abandon MP3 and switch to a lossless format.

  • mzso
  • [*][*][*]
How to prevent lame from cutting the spectrum?
Reply #6
Thanks for the info guys.
To disable lowpass filter, use --lowpass -1 switch. But chances are high that LAME will remove high frequencies anyway because of its psychoacoustic model.

It still cuts. Even with cbr320.
Why do you want to do this?

I was trying to get the best the best out of mp3. Highest bitrate no spectrum butchering and whatnot.
The higher-frequency content you're seeking to preserve tends to be more noise-like, thus more difficult to encode...your efforts to preserve it may well starve the rest of the spectrum of bits, impacting the quality at frequencies you're much more likely to notice. MP3 in particular also has difficulty with resolution above 16 kHz; Google "sfb21". At higher bitrates, depending on the characteristics of the audio and the psychoacoustic model, LAME will strategically allow higher-frequency content to be preserved. If you're not getting it, you don't need it. If you still think you need it, abandon MP3 and switch to a lossless format.

Well mp3 isn't my format of choice. Its not even my lossy format of choice. But since mp3 is pretty much the norm and others are poorly supported... For example I didn't find a free hosting service that hosts vorbis (not to mention flac) and can play them back in the browser, only mp3. Its convenient for showing people something you like.

  • db1989
  • [*][*][*][*][*]
  • Global Moderator
How to prevent lame from cutting the spectrum?
Reply #7
Why do you want to do this?

I was trying to get the best the best out of mp3. Highest bitrate no spectrum butchering and whatnot.
Needlessly diverting bits to frequencies that you will never hear and thus degrading the overall quality of the bitstream including those lower frequencies that you can hear. Right!

  • dhromed
  • [*][*][*][*][*]
How to prevent lame from cutting the spectrum?
Reply #8
Right!

It's not unreasonable for people who aren't familiar with the internal workings of mp3 to assume that dropping things like lowpass will improve the sound quality and get them the "best possible mp3", even though in fact the opposite happens (regardless of audibility).


  • Northpack
  • [*][*][*][*]
How to prevent lame from cutting the spectrum?
Reply #9
I was trying to get the best the best out of mp3. Highest bitrate no spectrum butchering and whatnot.

You will achieve exactly the opposite of your intention. You will make your MP3s sounding worse when you force the encoder to keep all frequencys up to 22kHz.

See: there are many very clever people involved in the development of MP3 encoders. Do you really think that anything the encoder does - after more than 10 years of development - isn't well-founded and optimized for best possible quality? Do you really assume you know better than them?

  • mzso
  • [*][*][*]
How to prevent lame from cutting the spectrum?
Reply #10
Why do you want to do this?

I was trying to get the best the best out of mp3. Highest bitrate no spectrum butchering and whatnot.
Needlessly diverting bits to frequencies that you will never hear and thus degrading the overall quality of the bitstream including those lower frequencies that you can hear. Right!

I actually tested it. could definitely hear above 19k. Plus vorbis cuts above 20k even at q5 and doesn't cut anything at q7. Also that's why I combined it with the highest bitrates.

  • Northpack
  • [*][*][*][*]
How to prevent lame from cutting the spectrum?
Reply #11
I actually tested it. could definitely hear above 19k. Plus vorbis cuts above 20k even at q5 and doesn't cut anything at q7. Also that's why I combined it with the highest bitrates.

I'm afraid you've missed the point. It doesn't matter what you can hear. I can hear up to 20kHz, when listening to a sine wave signal, yet I can't tell the difference between music containing frequencies up to 22kHz and the same track low-passed to 17kHz, when conducting a proper (ABX) listening test. And this is not a singular deficiency of mine but a psychoacoustic principle MP3 and other lossy encoding technologies take advantage of.

Vorbis however is based on a very different approach than MP3 and is much more efficient at encoding high frequency content above 16kHz, thus vorbis can afford the "luxury" of keeping those frequencys - MP3 can't.
  • Last Edit: 16 September, 2011, 07:59:02 AM by Northpack

  • halb27
  • [*][*][*][*][*]
How to prevent lame from cutting the spectrum?
Reply #12
I do second this.
I don't think in real life music a lowpass of 17.5 or even 16.7 kHz is ABXable with the exception of extremely few listeners.
And Lame's standard lowpass is higher with the highest VBR modes.
lame3995n -Q0.5

  • ShotCaller
  • [*]
How to prevent lame from cutting the spectrum?
Reply #13
I agree with all the above statements that what you are trying to do is probably not going to improve your encode quality. However, LAME 3.99 beta now uses a lowpass filter at 21.5 kHz for VBR, so it seems the LAME developers have an interest in trying to preserve these high frequencies, for whatever reason...

  • db1989
  • [*][*][*][*][*]
  • Global Moderator
How to prevent lame from cutting the spectrum?
Reply #14
LAME 3.99 beta now uses a lowpass filter at 21.5 kHz for VBR
Of all levels?

  • ShotCaller
  • [*]
How to prevent lame from cutting the spectrum?
Reply #15
At -V 0. Didn't try the others, but I assume they are lower.

  • mzso
  • [*][*][*]
How to prevent lame from cutting the spectrum?
Reply #16
At -V 0. Didn't try the others, but I assume they are lower.

It even cuts lower with cbr320.

  • lvqcl
  • [*][*][*][*][*]
  • Developer
How to prevent lame from cutting the spectrum?
Reply #17
There are more ways than one to kill a cat lower the quality of MP3 files.

  • greynol
  • [*][*][*][*][*]
  • Global Moderator
How to prevent lame from cutting the spectrum?
Reply #18
That reminds me of Carter on Hogan's Heroes saying it was "easy as cake".
  • Last Edit: 17 September, 2011, 09:15:20 PM by greynol
13 February 2016: The world was blessed with the passing of a truly vile and wretched person.

Your eyes cannot hear.

How to prevent lame from cutting the spectrum?
Reply #19
At -V 0. Didn't try the others, but I assume they are lower.

It even cuts lower with cbr320.



I though that 320 cuts off at 20k, while -v0 cuts off at 19k (not that it matters).

Can someone provide a link?
FLAC -> JDS Labs ODAC/O2 -> Sennheiser HD 650

  • ShotCaller
  • [*]
How to prevent lame from cutting the spectrum?
Reply #20
Uh, you guys are forgetting I am talking about 3.99 beta not 3.98.4

By the way, -V 0 in 3.99 beta actually has a lowpass filter set at 22.1 kHz.  -V 1 is at 19.5 kHz (.5 kHz higher than in 3.98.4) -V 2 is at 18.5 kHz and -b 320 is at 20.5 kHz (both the same as 3.98.4)

  • mzso
  • [*][*][*]
How to prevent lame from cutting the spectrum?
Reply #21
Uh, you guys are forgetting I am talking about 3.99 beta not 3.98.4

By the way, -V 0 in 3.99 beta actually has a lowpass filter set at 22.1 kHz.  -V 1 is at 19.5 kHz (.5 kHz higher than in 3.98.4) -V 2 is at 18.5 kHz and -b 320 is at 20.5 kHz (both the same as 3.98.4)

No I didn't. I just tried CBR320 and V1 with it. And it only preserved the spectrum with V0.
I though that 320 cuts off at 20k, while -v0 cuts off at 19k (not that it matters).

Can someone provide a link?

You can find the beta here: http://www.rarewares.org/mp3-lame-bundle.php

  • db1989
  • [*][*][*][*][*]
  • Global Moderator
How to prevent lame from cutting the spectrum?
Reply #22
By the way, -V 0 in 3.99 beta actually has a lowpass filter set at 22.1 kHz.  -V 1 is at 19.5 kHz (.5 kHz higher than in 3.98.4) -V 2 is at 18.5 kHz and -b 320 is at 20.5 kHz (both the same as 3.98.4)
See, your initial statement could have been (mis?)construed as reporting that all VBR modes of LAME 3.99b lowpass at 21.5 kHz, which I doubted.

  • ShotCaller
  • [*]
How to prevent lame from cutting the spectrum?
Reply #23
Ok

  • arfgh
  • [*]
How to prevent lame from cutting the spectrum?
Reply #24
as i have seen at the moment, only lame 3.93.1 disable completly the lowpass with the switch -k, that now isnt used.
With lame 3.99.3 can be disabled with -lowpass -1, but 21,9 khz