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: missing frequencies/sounds >16kHz using lame 3.99.4-64 (Read 7406 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

missing frequencies/sounds >16kHz using lame 3.99.4-64

hi,

i recorded some vinyl using Goldwave 5.25 under win 7 pro x64 and saved the files as a 24/96 un-compressed Windows Wave file.

i had a look at the frequency representation in Adobe Soundbooth CS5 and noted that the max. freq. attained was around ~27kHz (which seems acceptable given my sound card, cartridge and phono stage).

i then compressed the file using Foobar2000 1.1.9 to a lame mp3 with the settings:

Audio
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 3
Mode : Joint stereo
Duration : 5mn 51s
Bit rate mode : Variable
Bit rate : 282 Kbps
Minimum bit rate : 32.0 Kbps
Channel(s) : 2 channels
Sampling rate : 48.0 KHz
Compression mode : Lossy
Stream size : 11.8 MiB (100%)
Writing library : LAME3.99r
Encoding settings : -m j -V 0 -q 0 -lowpass 24 --vbr-new -b 32

having a look at the frequency representation again in Soundbooth showed a reduction/cutoff above 16kHz for certain sounds (not all).

Why is this and how (if possible) could I retain these upper frequencies ?
I assumed since the mp3 is a 48kHz file each channel should contain up to 24kHz sounds - from the graph it does, but only for certain sounds, and others are removed >16kHz

Also, is it a default setting by either foobar/lame to use lowpass by default ?

i've uploaded some screen grabs for visualisation:











missing frequencies/sounds >16kHz using lame 3.99.4-64

Reply #1
What you see in action is the "ATH". As you know, MP3 is a lossy encoder, and as such, it decides to hide and remove sounds (or simply replace it by something that "sounds" alike).

Also, the MP3 as a format, has more difficulty storing the frequencies above 16Khz with precision. LAME, in order to preserve better the whole sound, tends to be a bit more aggressive on the higher end of the spectrum, provided that the sound is below the ATH. (which translates to "the quietest frequencies").

In the end, this appears graphically as this sort of dynamic filter above 16Khz.

Also, you shouldn't be using --vbr-new with 3.99. --vbr-new was made default in 3.98, and in 3.99, --vbr-new stands for a new setting which is in development.

missing frequencies/sounds >16kHz using lame 3.99.4-64

Reply #2
gracias por sus comentarios,

what is ATH ?

So, if this is a limitation in the LAME codec itself I can live with that - if the result is 'transparent' to my ears in real life i don't mind - i was curious why the cutoff occurs...

i tested with Foobar and it seems it uses its own default settings for LAME - i couldn't change the use of lowpass or vbr-new in the settings

is there another program that will use 24 bit WAVS (or other uncompressed files) to batch process ?
impossible via command line ?

i have used Goldwave and EAC to process WAVS, but they only handle 16 bit files

missing frequencies/sounds >16kHz using lame 3.99.4-64

Reply #3
With foobar2000 you can add any number of a custom set of parameters for lame. In the choose output file format dialog>Add New>select custom from Encoder drop down list.


missing frequencies/sounds >16kHz using lame 3.99.4-64

Reply #5
these are my settings in foobar:



and these settings result from MediaInfo

-m j -V 0 -q 0 -lowpass 22.1 --vbr-new -b 32

can anybody duplicate this issue ?

missing frequencies/sounds >16kHz using lame 3.99.4-64

Reply #6
"--bitwidth 24" is useless, "Format is: lossless (or hybrid)" is incorrect.

And, neither LAME nor foobar2000 write actual settings to mp3 files, so MediaInfo tries to guess LAME settings.

missing frequencies/sounds >16kHz using lame 3.99.4-64

Reply #7
Sorry for the confusion about --vbr-new. I thought that it was written in the comment field, and not guessed.

Now, extending on lvqcl's comment, --bitwidth is only necessary for raw audio (foobar sends .wav, so that's not raw) and the format setting should be "lossy".
This one is just a hint for foobar to know what the codec will do (so it is not dangerous, but better to have it to its correct value, which is lossy).

You were given a link for more info about the ATH, i guess that's enough but as a simple explanation, the ear is not equally sensitive to all frequencies and the ATH is the representation of how sensitive we are to them.





missing frequencies/sounds >16kHz using lame 3.99.4-64

Reply #8
Quote
So, if this is a limitation in the LAME codec itself I can live with that - if the result is 'transparent' to my ears in real life i don't mind - i was curious why the cutoff occurs...
MP3 is lossy compression, it has to throw-away some information.  If you "force" LAME to keep certain information (that you probably can't hear) it will have to throw-away some other information (that you might be able to hear).

missing frequencies/sounds >16kHz using lame 3.99.4-64

Reply #9
To assess the quality of a perceptual (lossy) encoder, please perform an ABX test instead of comparing spectra. MP3 is meant to perceptually reproduce the input audio file, i.e. achieve transparency. This means that the "missing" frequencies mean nothing if the resulting MP3 file sounds the same to you. It might also well be that most information in the higher frequencies might be inaudible or noise. If you want to archive your vinyl, use lossless encoding like FLAC or WAV. MP3, or any lossy codec, is meant for (end user) consumption.
It's only audiophile if it's inconvenient.

missing frequencies/sounds >16kHz using lame 3.99.4-64

Reply #10
Jaz: thank you & noted for bitwidth and raw files, I thought that these settings were referring to the input file

dvddoug: primarily horns, sax, vocals are the frequencies i wish to preserve as much as i can, it would be fine for me if, what you say, the lower frequencies were thrown out more compared to the higher ones (if this is what occurs by forcing lame to retain higher ones). I still have a little confusion about this process and will need to read up more on how this is dynamically achieved at compression time.

kohlrabi: i appreciate the link, this will take a while to digest, im not archiving just 'yet.' i'll need to invest a little more in equipment

again, thank you for the responses.


missing frequencies/sounds >16kHz using lame 3.99.4-64

Reply #11
It will behoove you to follow Kohlrabi's advice before digging further into how lossy compression works.

All that matters is what you hear.  What you see is irrelevant.

missing frequencies/sounds >16kHz using lame 3.99.4-64

Reply #12
It will behoove you to follow Kohlrabi's advice before digging further into how lossy compression works.

All that matters is what you hear.  What you see is irrelevant.


A famous photographer once said "photography deals exquisitely with appearances but nothing is what it appears to be."

noted ;-)

missing frequencies/sounds >16kHz using lame 3.99.4-64

Reply #13
It's not so much a matter of throwing out other frequencies if too many bits are wasted on the very highest frequencies. Rather it is that all frequencies are preserved less accurately, introducing artifacts.

missing frequencies/sounds >16kHz using lame 3.99.4-64

Reply #14
primarily horns, sax, vocals are the frequencies i wish to preserve as much as i can


Those are all mid-low frequencies that barely make 10KHz, so you're safe. You preserve them as much as you can with the 16KHz lowpass.

Quote
if this is what occurs by forcing lame to retain higher ones)


Nope.