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: strange results using low-pass filter ( lame 3.98/3.99.5 ) (Read 29644 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

strange results using low-pass filter ( lame 3.98/3.99.5 )

Reply #25
looks

This is the problem, full stop.

We listen with our ears, not our eyes.  How the signal "looks" is irrelevant.

Brush up on TOS #8 before posting on this topic again.
Generally, especially when you don't know what you're doing, graphs of any kind are a terrible way to judge lossy codecs.

However, in this case the spectrogram shows silence below 19kHz in the original, and a signal hitting -40dB right across the audible band after encoding+decoding. I don't need to listen to know that I can hear crap at -40dB in the audible range when there's no other signal to mask it. And [JAZ] has used a spectrogram to diagnose the problem.

It would be kind of easy to listen though.  That said, I'd be careful listening to artefacts added to a 19kHz sine wave - depending on the level of the artefacts and your hearing, you might inadvertently raise the volume level too high and fry your tweeters.


btw, the point the OP seems still to have missed, and it's been said several times in this thread, is that because lossy codecs intentionally change the waveform (though hopefully not the sound), you need to keep the signal away from 0dB to avoid clipping. Usually the clipping is caused by the adaptive lossiness of the encoder rather than it's "fixed" filter, and usually the clipping is inaudible, but it's still good practice and not news.

Cheers,
David.

strange results using low-pass filter ( lame 3.98/3.99.5 )

Reply #26
I agree with everything David said. And yes, paracent, if your test has revealed a problem with LAME that can be fixed (which I presume it can), then it will end up being very useful after all.

strange results using low-pass filter ( lame 3.98/3.99.5 )

Reply #27
are you really using 16.5kHz lo pass for all your music needs? - this would explain...

How I encode my music is determined through listening, not through looking.

strange results using low-pass filter ( lame 3.98/3.99.5 )

Reply #28
"Generally, especially when you don't know what you're doing, graphs of any kind are a terrible way to judge lossy codecs."

In general, this might be right. Working on a few hundred samples in last a few days, and seeing something completely unexpected in the "Lame", again, made me open this topic. Different codecs, different features, different profiles, different approaches to reproduce sound in a lossy environment can make people with a bit less knowledge completely lost when looking at the spectrograms. For example look at AAC_PLUS / AAC_HE, what it does with the frequencies above ~8-10kHz, especially in low bit rates... it is done on purpose, to provide a person with a feel of a Clean, decent quality sound - fine & great! But in the Lame "case", I do not think that this was done on purpose, and if it was, there might be a need to re-visit it. Assuming "not knowing what you are doing", might be a sign of proper judgement, but at the same time it might be a simple sign of ignorance.

strange results using low-pass filter ( lame 3.98/3.99.5 )

Reply #29
"How I encode my music is determined through listening, not through looking. "

I agree with you, to a point. When using a lossy codec, you probably want to use a codec, setting, profile, feature, whatever, that is >>less<< lossy than the other one, while not being as space hungry as FLAC or WAV. At least this is my goal, and beside my ears, I also need a proof - we live in digital world, and a proof in this case easy to get, rather than just relying on what I "hear". In the longer run, If I do the job right today, ( at least I hope ) I will not cry tomorrow, in a year or two...


strange results using low-pass filter ( lame 3.98/3.99.5 )

Reply #30
When using a lossy codec, you probably want to use a codec, setting, profile, feature, whatever, that is >>less<< lossy than the other one

How is this being judged?

You found that a full-scale sinusoid gives problems with a low-pass setting that is 1% above it. Despite what David said, I don't see this a problem with Lame, rather I see this as another example of how to break a codec.

Besides your eyes, what has given you the idea that -V0 without a user-configured low-pass doesn't provide enough cow bell?

strange results using low-pass filter ( lame 3.98/3.99.5 )

Reply #31
When using a lossy codec, you probably want to use a codec, setting, profile, feature, whatever, that is >>less<< lossy than the other one

How is this being judged?

You found that a full-scale sinusoid gives problems with a low-pass setting that is 1% above it. Despite what David said, I don't see this a problem with Lame, rather I see this as another example of how to break a codec.

Besides your eyes, what has given you the idea that -V0 without a user-configured low-pass doesn't provide enough cow bell?



V0 was used only to compare, as an example, along with 50 other tests I did on Lame, which I am not planning to use anyway.

here the answers to your questions:

1> V0 without lo-pass above ~20.2 kHz introduces whatever it is it introduces, which is not acceptable.
2> testing different quality profiles ( all V ) with forcing low-pass in 18-22kHz range I was comparing the results and ended up with the V0

Gargamel, what else do you want to tall me , to convince me, that whatever I do makes no sense?

strange results using low-pass filter ( lame 3.98/3.99.5 )

Reply #32
You didn't answer either of my questions.

Do I think you are judging codecs in incorrectly? Without any hint of doubt, yes, absolutely!

Don't use Lame. I couldn't care less.  If you want to call mosquito tones music that is your business.  I don't think this is how the developers see it.

So humor me, what does Lame -V0 (no --lowpass) introduce?

strange results using low-pass filter ( lame 3.98/3.99.5 )

Reply #33
On the technical side of the problem:

I believe this might not get fixed, not because of being a special case, but because of the way it is implemented.

This is not an IIR or FIR lowpass filter working in the time domain, but instead, the filter is applied over the calculated band energies in the mdct tool.
In some way, it could be considered as a filter that acts in the frequency domain, and the mirroring in question is similar to the artifact of a resampler with a soft filter. (with the difference that in this case it is mirrored above the cutoff, not below).


I would like to mention that the problem happens in the whole frequency range.
For example, a 15.5Khz sine sampled at 48Khz and using lame -V0 --lowpass 16 (which means "Using polyphase lowpass filter, transition band: 15677 Hz - 16258 Hz") also shows the mirroring. (In this case, at 16Khz).

Usually, we should expect signals at these frequencies to be down -30dBFS or more, and the aliasing intensity to decrease fast the further from the frequency cutoff point.

strange results using low-pass filter ( lame 3.98/3.99.5 )

Reply #34
Gargamel: "Humor me" - This would be off-topic. Find your amusement somewhere else.

strange results using low-pass filter ( lame 3.98/3.99.5 )

Reply #35
"Humor me" - This would be off-topic. Find your amusement somewhere else.

Really? Is this really how you wriggle out of a request to confirm that the default settings do not introduce the problem you reported? By taking issue with a metaphorical item of language? In case you are unaware, to humour someone in this context means to put up with their request, even if you are not personally keen on it, in order to remove uncertainty from the situation.

I agree with you that the problem with the non-default lowpass is worth investigating. I do not, however, agree with you continuing to passive-aggressively create diversions to avoid actually replying to other members.

And his username is greynol. I suspect you are leveraging his avatar to make more unstated implications about his character. You should probably stop that. If that amuses you, perhaps you are the one who should go elsewhere for humour.

strange results using low-pass filter ( lame 3.98/3.99.5 )

Reply #36

On the technical side of the problem:

I believe this might not get fixed, not because of being a special case, but because of the way it is implemented.

This is not an IIR or FIR lowpass filter working in the time domain, but instead, the filter is applied over the calculated band energies in the mdct tool.
In some way, it could be considered as a filter that acts in the frequency domain, and the mirroring in question is similar to the artifact of a resampler with a soft filter. (with the difference that in this case it is mirrored above the cutoff, not below).


I would like to mention that the problem happens in the whole frequency range.
For example, a 15.5Khz sine sampled at 48Khz and using lame -V0 --lowpass 16 (which means "Using polyphase lowpass filter, transition band: 15677 Hz - 16258 Hz") also shows the mirroring. (In this case, at 16Khz).

Usually, we should expect signals at these frequencies to be down -30dBFS or more, and the aliasing intensity to decrease fast the further from the frequency cutoff point.


JAZ - thanks a lot for the reply - is the mirroring at a higher, not "exepected" dBFS a property / design of Lame? since I have not seen similar effects on AAC or Vorbis for example.

strange results using low-pass filter ( lame 3.98/3.99.5 )

Reply #37
db1989 - I am no here to find amusement, an not here to humor anybody, especially on request... My response was not right, neither his/her request.

strange results using low-pass filter ( lame 3.98/3.99.5 )

Reply #38
What was wrong with the request to confirm that the default settings do not produce the problem, and the question about why you feel the need to use non-default settings? I understand why you might want to use customised settings for testing purposes, but greynol is making the point that the default settings are default for a good reason. All you were asked was to answer those questions; to my mind, if you dance around them and avoid doing so, people are justified in repeating them. That does not mean anyone is making fun of you, victimising you, or anything else.

strange results using low-pass filter ( lame 3.98/3.99.5 )

Reply #39
It is a property of the implementation that is used to do the filtering, except that the increase in amplitude (in time domain) of the original signal is not a property per-se, but a consequence of mixing several signals (in this case, the sine, and the mirrored aliasing, which is the real property).

Other codecs probably use a FIR filter on the input, or other means.

strange results using low-pass filter ( lame 3.98/3.99.5 )

Reply #40
Unless I'm way off base, the pictures look like regular aliasing to me, though, with some added stripes due to the spectrograph's window function. Wouldn't be surprising given a 19.5kHz low-pass and a 19.3KHz tone.

not here to humor anybody,


I sense a language barrier (superfluous commas and quotes being a strong hint!). 'humor me' has nothing to do with entertainment or laughter. It just means, "Why not? Won't hurt to let me know." or something to that effect.

strange results using low-pass filter ( lame 3.98/3.99.5 )

Reply #41
beside my ears, I also need a proof
An ideal psychoacoustic-based codec will give the maximum possible perceived quality at a given bitrate, or deliver a given quality level (e.g. no audible difference from the original) at the lowest possible bitrate.

Given that some things visible on graphs are completely inaudible, and other easily audible things are invisible on certain graphs, how exactly do you propose to use a graph to judge which lossy codec is working best? The final arbiter of lossy coding is the human ear, because it is the human ear that the lossy codec is trying to trick.


The graphs you posted earlier in this thread are useful because they demonstrate a particular problem which, from a graph, we can clearly say is audible. The audibility of most of the changes caused by a lossy codecs cannot be predicted from their appearance on graphs.

This has all been discussed many times here. Please go and look through the FAQ. Top right, near search (another useful tool  ).

Cheers,
David.

strange results using low-pass filter ( lame 3.98/3.99.5 )

Reply #42
the point the OP seems still to have missed, and it's been said several times in this thread, is that because lossy codecs intentionally change the waveform (though hopefully not the sound), you need to keep the signal away from 0dB to avoid clipping. Usually the clipping is caused by the adaptive lossiness of the encoder rather than it's "fixed" filter, and usually the clipping is inaudible, but it's still good practice and not news.



I can further attest to clipping being very important to eliminate. Having developed a shoutcast streaming player which actually shows the peak after decoding. (unclipped/floating point decoding so peaks above 0dBFS can be shown), I have seen max peaks reach as high as over +6dBFS.
Mind you that was with the source not using ReplayGain, and 48kbit HA-AAC, and FAAD2 based decoding. These are probably intersample peaks that manifest themselves during the encoding and then decoding process.
So not hitting 0dBFS does not guarantee this won't happen with lossy formats. Using -3dBFS or even as low as -6dBFS might be needed.
It is also worth nothing that it is highly compressed (as in it's dynamics) music that exhibit the most extreme overs.
Also note that a impulse can do really odd things. I managed to create sample with a impulse that causes a, what was it +11dBFS intersample peak, and that was in a lossless format.

strange results using low-pass filter ( lame 3.98/3.99.5 )

Reply #43
FWIW, I don't think this is resulting from clipping.  Feel free to generate the samples and have a look for yourself.

Like [JAZ] had done initially, I went back and decoded to floating point.  The resulting signal is the original tone with the imaged tone.  Alternately, I could have used foobar2000 or MP3Gain to reduce the global gain before decoding to fixed point.

David will not claim there is sufficient evidence of audibility.

EDIT:
Regarding the importance of eliminating clipping, I'm still waiting for another example of a published title of music that causes an audible problem when a lossy-encoded version is decompressed to fixed point.

This is a non-issue.

strange results using low-pass filter ( lame 3.98/3.99.5 )

Reply #44
Regarding the importance of eliminating clipping, I'm still waiting for another example of a published title of music that causes an audible problem when a lossy-encoded version is decompressed to fixed point.

Lana Del Rey's "Born To Die" or "Paradise" are two possible candidates. I'm not sure if it was just one particular iTunes release or not (which was said to have been fixed later). But several have reported massive clipping/crackling (audible) on her tracks. A victim of the Loudness War. Daft Punks Tron Legacy soundtrack too though in their case it's hard to know if they did it on purpose or not, but the CD release seem to suffer from the Loudness War a little too. I seem to recall Paradise was said to be a little worse than Born To Die.

Quote
This is a non-issue.

Though one could guess clipping makes the job of a lossy encoder a tad more difficult bit allocation-wise (then again, any modern encoder and decoder should have code to handle that as well).
I tried to search the forum but the only thing I found was a question here http://www.hydrogenaudio.org/forums/index....amp;#entry24453 though I have to admit I have not done a exhaustive forum search.

If you mean just the odd clipping here or there then yeah, folks will most likely never notice (too brief) and it should not impact a encoder/decoder either. (again, too brief)

strange results using low-pass filter ( lame 3.98/3.99.5 )

Reply #45
Clipping in the mastering stage, which necessarily means prior to lossy compression, is completely irrelevant here.

The challenge was to provide a track that is properly mastered and therefore does not clip, but that is forced to exhibit audible clipping by subsequent lossy compression.

strange results using low-pass filter ( lame 3.98/3.99.5 )

Reply #46
Clipping in the mastering stage, which necessarily means prior to lossy compression, is completely irrelevant here.

The challenge was to provide a track that is properly mastered and therefore does not clip, but that is forced to exhibit audible clipping by subsequent lossy compression.


Oh right! Yeah, I highly doubt one will find that outside artificially created ones.
Then again properly mastered is not that descriptive, didn't Iggy Pop on purpose master one of his albums so hot that well, it was the sound that he wanted (or so he said).

But since I'm partly to blame for veering off topic here.
To try and get back on topic. What is seen in that image is an impulse, and those can do weird things.
But a impulse is normally not found that often in normal music (normal being a tad relative here though).



strange results using low-pass filter ( lame 3.98/3.99.5 )

Reply #47
Nope, according to the OP, it was a sustained tone lasting for ten seconds, not an impulse.

strange results using low-pass filter ( lame 3.98/3.99.5 )

Reply #48
It's a full-scale sinusoid, not an impulse, but you're right it won't be found in normal content.

If I ever needed to compress a 19.3kHz FS test tone I would not use a lossy encoder.  I don't see this as a legitimate reason to choose one codec over another for music, however.

strange results using low-pass filter ( lame 3.98/3.99.5 )

Reply #49
How's it sound in lame 3.100a2?

(I'd also be curious what the -Y switch does with it, but I suspect that'd be straying off-topic.)