Help - Search - Members - Calendar
Full Version: lame and high frequencies
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - Tech
Juan C.
I have this question a very long time ago. When I do an encoding of an mp3 using lame 3.92, the filter --lowpass does work I can encode up to 22 Khz (using 320 kbps of course rolleyes.gif ) and using Cool Edit, I can watch that the frequencies are kept, but using newer lames (>3.93) the lowpass filter does not work with settings above the 20.5 Khz (lower than that is ok) even using -k filter, the encodings have a 16 Khz cutoff. Is this normal for the newer versions of lame? Also the newer lames cannot handle very good the high frequencies like old lames (using GPSYCHO model) can do. Is there a solution for this or the NSPSYTUNE model limit the frequencies at a maximum of 20.5 Khz? Thanks.
pdq
Please supply your exact command line so that we can see if you are doing something wrong.
Juan C.
QUOTE(pdq @ Jan 31 2008, 18:26) *

Please supply your exact command line so that we can see if you are doing something wrong.


The command line : -b320 -ms -h --lowpass 22
pdq
QUOTE(Juan C. @ Feb 1 2008, 13:59) *

QUOTE(pdq @ Jan 31 2008, 18:26) *

Please supply your exact command line so that we can see if you are doing something wrong.


The command line : -b320 -ms -h --lowpass 22

Offhand I don't see anything wrong with this command line, other than -ms being less efficient than -mj (at this bitrate probably doesn't matter) and I believe -h is redundant here.
Juan C.
I have uploaded the spectral display for both lame 3.92 and lame 3.97 encoded files.

lame 3.97
IPB Image

lame 3.92
IPB Image
Juan C.
Also when I used encspot, it shows that the lowpass is 20.5 Khz when I have put in the command line 22 khz. mad.gif

IPB Image
Bourne
you should not worry or hunt any problem by analysing spectrum because high-frequencies are probably the least thing we can hear. even if 3.97 "looks" poorer, it will have definitely more quality and many improvements over older versions, these improvements do not appear in the high-frequencies so there's no use really to hunt them down.

do yourself a favor and encode using a highpass value... say 19kHz or 20kHz... then play the file and let's see if you can hear anything!
SpasV
smile.gif You cannot hear any single frequency from the spectrum. What you can hear is a range of frequencies when there is a pick big enough in there.
But the high frequensies do form the complex sound signal and more specifically the rising and falling edges of the signal - sound wave. I think it is important also. I care about the whole frequency range of a CD track (20 Hz - 22 kHz) and because of that I usee AAC encoder. Nero AAC enc preserves the whole frequensy range at any bitrate above 200 kbps.
evereux
QUOTE(SpasV @ Feb 3 2008, 05:20) *

I care about the whole frequency range of a CD track (20 Hz - 22 kHz) and because of that I usee AAC encoder. Nero AAC enc preserves the whole frequensy range at any bitrate above 200 kbps.


Original wav

neroAacEnc q0.7 ~270kbps

ps spectral analysis is meaningless in lossy compression. Use ABX to access a codecs quality.
Gabriel
Audio CD usable frequency range is supposed to be 0 to 20kHz. The 2kHz of extra headroom are there to compensate for imperfect filters, and are recommended to be attenuated/filtered by the playback equipment.
lexor
I'm surprised at you guys. This isn't a thread about sound quality, it doesn't matter what we can or cannot hear. You all trying to dismiss a legitimate bug. Just because it won't be heard by anyone doesn't change the fact that the encoder isn't obeying the given options. And as the screencaps show, it's not cutting at 20.5 because the last 2 is just a buffer, there is data there. The encoder should obey a valid option. And I do believe the option is valid.
Irakli
Well, Lame 3.97 seems to just ignore many custom settings because they do not belong to 'presets'. This seems to apply to --lowpass. This isn't bad, because it prevents unexperienced Lame users from spoiling quality by wrong settings.

Regards,
Irakli
SpasV
smile.gif Lame 3.98 follows the lowpass option until 20 - no more.
Light-Fire
QUOTE(lexor @ Feb 3 2008, 19:45) *

...it doesn't matter what we can or cannot hear. You all trying to dismiss a legitimate bug. Just because it won't be heard by anyone doesn't change the fact that the encoder isn't obeying the given options...


If it can't be heard than the "bug" is an irrelevant condition. So it cannot be considered a bug.
Gabriel
It's not really a bug, it's intentional. I capped lowpass to 20kHz.
The parameter is not ignored, it's just that you used a value higher than the cap. Try using a lower value, and you'll notice that --lowpass xxx is not ignored.
pdq
QUOTE(Gabriel @ Feb 4 2008, 06:44) *

It's not really a bug, it's intentional. I capped lowpass to 20kHz.
The parameter is not ignored, it's just that you used a value higher than the cap. Try using a lower value, and you'll notice that --lowpass xxx is not ignored.

Is that only for 44.1 kHz files or does it also apply to 48 kHz files?
2Bdecided
QUOTE(lexor @ Feb 4 2008, 00:45) *

I'm surprised at you guys. This isn't a thread about sound quality, it doesn't matter what we can or cannot hear. You all trying to dismiss a legitimate bug. Just because it won't be heard by anyone doesn't change the fact that the encoder isn't obeying the given options.
It's intentional. Even at 320kbps, bits are "limited" and it's wiser to spend those bits encoding things in the audible region than things outside of it.

That's not to say no one can ever hear things above 20kHz - just that, for the vast majority of the time, the bits are better spent elsewhere.

You may think that bits are best spent making pretty looking spectrograms which light up all the way to the top. Thankfully, lame isn't letting you do this anymore. For pretty pictures, use a paint program. For nice sound, use lame wink.gif

(sorry - getting carried away here).

Cheers,
David.

Gabriel
QUOTE(pdq @ Feb 4 2008, 13:07) *

Is that only for 44.1 kHz files or does it also apply to 48 kHz files?

That's for any sampling frequency.
lexor
QUOTE(Gabriel @ Feb 4 2008, 07:44) *

It's not really a bug, it's intentional. I capped lowpass to 20kHz.
The parameter is not ignored, it's just that you used a value higher than the cap. Try using a lower value, and you'll notice that --lowpass xxx is not ignored.

Well then there is a different bug, according to OP it went above the restriction you've put.
Silversight
QUOTE(lexor @ Feb 4 2008, 18:03) *
Well then there is a different bug, according to OP it went above the restriction you've put.

... using LAME 3.92.
Juan C.
So from what I read, newer lames doesn't let you to use lowpass higher than 20.5 Khz right. I asked this question because when I hear both files 3.92 & 3.97, I cannot notice which one is 3.92 or 3.97 and for the same bitrate (320 k) I got better frequency with 3.92 than 3.97. So I guess that is useless to encode at 320 with 3.97 when 256 or even 224 kbps will give me a very similar result dry.gif .
greynol
Absolutely, and if you were to use joint-stereo you'll probably be able to get even smaller files without being able to tell the difference when only using your ears. biggrin.gif
pdq
QUOTE(Juan C. @ Feb 4 2008, 14:59) *

So from what I read, newer lames doesn't let you to use lowpass higher than 20.5 Khz right. I asked this question because when I hear both files 3.92 & 3.97, I cannot notice which one is 3.92 or 3.97 and for the same bitrate (320 k) I got better frequency with 3.92 than 3.97. So I guess that is useless to encode at 320 with 3.97 when 256 or even 224 kbps will give me a very similar result dry.gif .

Let's not try to over-generalize here. What is being said is that it is unlikely that someone will hear the difference resulting from the lower cutoff frequency, and that often the lower cutoff frequency will make additional bits available to either improve the quality of a cbr encoding or shrink the size of a vbr encoding without any quality loss. If you choose to apply this difference by using a lower bitrate then that is your choice, although once you drop below 320 kbps you should be better off using vbr rather than cbr.
Juan C.
QUOTE(pdq @ Feb 4 2008, 14:19) *

QUOTE(Juan C. @ Feb 4 2008, 14:59) *


Let's not try to over-generalize here. What is being said is that it is unlikely that someone will hear the difference resulting from the lower cutoff frequency, and that often the lower cutoff frequency will make additional bits available to either improve the quality of a cbr encoding or shrink the size of a vbr encoding without any quality loss. If you choose to apply this difference by using a lower bitrate then that is your choice, although once you drop below 320 kbps you should be better off using vbr rather than cbr.


I know that this is true for vbr files, but at 320 kbps cbr I don't think that the lowpass 20.5 is necessary, maybe Nspsytune model is optimized for encodings of 20 khz or less and that could be the reason for that lowpass? huh.gif .
Silversight
QUOTE(Juan C. @ Feb 4 2008, 21:36) *
maybe Nspsytune model is optimized for encodings of 20 khz or less and that could be the reason for that lowpass? huh.gif .

Of course it is. 20 kHz or less is the audible range. There's no point in encoding stuff we cannot hear with a program designed for discarding stuff we cannot hear.
Juan C.
Well, seeing that losing high frequencies that we cannot hear is best for the final encoding, is there a way to enable Gpsycho model in lame >= 3.94? I tried to use --gpsycho but it does not work. Or the gpsycho model was removed completely in newer lame versions?
pdq
Considering that no further work is being done to tune gpsycho, or has been for some time, why do you care?
Juan C.
QUOTE(pdq @ Feb 8 2008, 09:44) *

Considering that no further work is being done to tune gpsycho, or has been for some time, why do you care?

To do some testing that's all biggrin.gif
pdq
As I recall, through 3.97 gpsycho was the default.
Cygnus X1
Gpsycho was not the default for 3.97; nspsytune was. I think gpsycho was removed from versions above 3.93, IIRC - which explains why it cannot be called up with a switch. The alt-presets (and later -V settings) never used gpsycho as their psymodel.
Juan C.
QUOTE(Cygnus X1 @ Feb 8 2008, 15:11) *

Gpsycho was not the default for 3.97; nspsytune was. I think gpsycho was removed from versions above 3.93, IIRC - which explains why it cannot be called up with a switch. The alt-presets (and later -V settings) never used gpsycho as their psymodel.


I found that gpsycho still exists in lame 3.98a, using --psymodel 1 the encoder will use gpsycho instead of nspsytune; in 3.97, the switch does not work.
halb27
I wouldn't consider using gpsycho with current versions.
I once did and got strange results - bitrate very much higher than it should be.
The devs didn't work on gpsycho with 3.97/3.98 so I would consider the outcome of using gpsycho as being pretty much random.

All the improvements of 3.98 were done on nspsytune basis, so IMO this is the way to go nowadays.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.