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: How do lowpass frequencies affect VBR and ABR modes? (Read 7015 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How do lowpass frequencies affect VBR and ABR modes?

Today I played with the Lame --lowpass switch for the first time and I got results I didn't expect. When using a cutoff frequency below the default of the -V compression level the resulting overall filesize and average bitrate are lower. When reducing frequency range clearly not the same amount of bits are used. It seems the bitrate reduction is caused by throwing away bits above the lowpass frequency (compared to default values). Or are still some bits used for better encoding below lowpass (clearly not all bits)?

And are there cutoff frequencies in ABR mode? What's the mechanism? Using --lowpass in ABR mode did not have much effect on resulting average bitrate. Lame v3.98 -V0 --lowpass 16000 results in much lower avg. bitrate than --abr --lowpass 16000 so I would suspect that ABR with lowpass could produce better results. Depending on your answers I could ABX some problem samples.

Note: I could express the frequencies in Hz and kHz, somehow Lame can determine that both units are identical allthough the lame --longhelp tells to use kHz.

How do lowpass frequencies affect VBR and ABR modes?

Reply #1
-V2.xx - V0 can suffer from SBF21 bloat. Its only an issue for vbr.

How do lowpass frequencies affect VBR and ABR modes?

Reply #2
Lowering the lowpass for VBR makes the encoder (targeting at the same quality) choose a lower bitrate as there is less to encode. At least as a tendency. When lowering the lowpass for ABR there is not so much of a reason for lowering the bitrate when having a target bitrate in mind. The net effect is achieving a higher quality for the frequency range encoded as a tendency.
lame3995o -Q1.7 --lowpass 17

How do lowpass frequencies affect VBR and ABR modes?

Reply #3
Here's an explanation of the -Y switch (sort of a 16kHz lowpass used by default in V3 and below)

How do lowpass frequencies affect VBR and ABR modes?

Reply #4
And this all brings up a question that's been slightly bugging me of late. I'm almost embarrassed to ask it as one of this forums first members to jump on people for suggesting tweaking LAME with extra settings, but...

Would the following assumption be sensible?

A person wants to encode to LAME VBR at the highest quality possible without effectively wasting bits past their own personal upper cut-off frequency. Assuming this to be 16kHz, would he/she gain the best quality versus average bitrate with plain -V3, or with -V0 with an enforced lowpass at 16kHz? I'd imagine that this has all been played with before in previous versions of LAME, but has it been tried on LAME 3.98.2, for example?

In brief, does setting a higher target quality in VBR (ie, lower -Vn) and enforcing a lowpass below the default as a means of bitrate usage "steering" actually improve perceived transparency to that individual? Is the apparent resolution of the lossy encoding higher (hence distortion should be lower?) within the required audio passband for a given average bitrate? If so, doesn't this make the encoder more robust against artifacts than -V3 and less wasteful for the individual in terms of bitrate used than plain -V0 for this situation?

Cheers, Slipstreem. 

How do lowpass frequencies affect VBR and ABR modes?

Reply #5
...
In brief, does setting a higher target quality in VBR (ie, lower -Vn) and enforcing a lowpass below the default as a means of bitrate usage "steering" actually improve perceived transparency to that individual? Is the apparent resolution of the lossy encoding higher (hence distortion should be lower?) within the required audio passband for a given average bitrate? If so, doesn't this make the encoder more robust against artifacts than -V3 and less wasteful for the individual in terms of bitrate used than plain -V0 for this situation?

That's exactly what's also on my mind. 

And otherwise: would an ABR with a lowpass filter below personal upper cut-off frequency be more robust against artifacts then without this lowpass filter?

How do lowpass frequencies affect VBR and ABR modes?

Reply #6
Regarding artifacts - this also depends on the quality of the lowpass. In theory, what isn't there cannot have/cause artifacts. However, doing a lowpass wrong can result in "ringing". A few weeks ago in another thread, i asked if some ringing problem samples are perhaps actually lowpass-problem samples. IIRC, no one was able or willing to answer to that question at that time.

Similiar to VBR, if a lowpass is done right, then yes, it is safest and most efficient to only encode the freq range which is important.
I am arrogant and I can afford it because I deliver.

How do lowpass frequencies affect VBR and ABR modes?

Reply #7
Unless somebody has already ABX-ed for this and posted results to clarify it already, I think it's worth running a few problem samples and checking this out. The hypothetical person could end up being me as I have nothing to gain/lose beyond 16kHz as far as I'm concerned, and my 15 year old son who can hear tones as high as 21kHz couldn't ABX the effects of a ~16.5kHz lowpass on "typical" music content in -V5 when we last checked.

If it helps people with less than perfect hearing (ie, most of us) to achieve a higher target quality for a lower average bitrate than an available preset, then it seems like the most efficient way to do it really, filter-related issues aside... but they may happen.

Go on, Alexxander. Get testing! 

Cheers, Slipstreem. 

How do lowpass frequencies affect VBR and ABR modes?

Reply #8
I played around with Lame 3.98.1 -V0 and a lowpass of 17.5 kHz. With those problems samples I care about I didn't find a quality improvement. Just average bitrate dropped from 239 to 231 kbps for my personal typical set of pop and singer/songwriter tracks.

I didn't dare to go below 17.5 kHz because like Lyx I'm afraid that disadvantages from the lowpass itself may make it into the quality as well as that there may be tracks where I might hear the lowpass effect (wishful thinking a bit at an age of 59).
lame3995o -Q1.7 --lowpass 17

How do lowpass frequencies affect VBR and ABR modes?

Reply #9
I did some ABX on sample Pet Shop Boys - In The Night I posted here and playing with ABR and lowpass 16000 Hz.

Lame v3.98.2 setting -V3 resulted in a 178kbps files and was easy to ABX:
Code: [Select]
foo_abx 1.3.3 report
foobar2000 v0.9.6 beta 4
2008/11/13 16:14:04

File A: F:\Temp\01 - Pet Shop Boys - In The Night.flac
File B: F:\Temp\01 - Pet Shop Boys - In The Night --398V3.mp3

16:14:04 : Test started.
16:14:19 : 01/01  50.0%
16:14:22 : 02/02  25.0%
16:14:25 : 03/03  12.5%
16:14:30 : 04/04  6.3%
16:14:34 : 05/05  3.1%
16:14:40 : 06/06  1.6%
16:14:45 : 07/07  0.8%
16:14:49 : 08/08  0.4%
16:14:58 : 09/09  0.2%
16:15:02 : 10/10  0.1%
16:15:07 : 11/11  0.0%
16:15:17 : 12/12  0.0%
16:15:33 : Test finished.

----------
Total: 12/12 (0.0%)


As the average song bitrate is 178kbps I encoded flac file with "--abr 178" which resulted in a 176kbps file. ABX results:
Code: [Select]
foo_abx 1.3.3 report
foobar2000 v0.9.6 beta 4
2008/11/13 16:26:43

File A: F:\Temp\01 - Pet Shop Boys - In The Night.flac
File B: F:\Temp\01 - Pet Shop Boys - In The Night --398ABR178.mp3

16:26:43 : Test started.
16:26:59 : 01/01  50.0%
16:27:04 : 02/02  25.0%
16:27:08 : 03/03  12.5%
16:27:14 : 04/04  6.3%
16:27:17 : 05/05  3.1%
16:27:24 : 06/06  1.6%
16:27:31 : 07/07  0.8%
16:27:41 : 08/08  0.4%
16:27:49 : 09/09  0.2%
16:28:00 : 10/10  0.1%
16:28:10 : 11/11  0.0%
16:28:18 : 12/12  0.0%
16:28:20 : Test finished.

----------
Total: 12/12 (0.0%)

Still no clean sound and therefore easy to ABX (a kind of warbling sound of the foreground synthesizer which start at around 2.2 secs).

Then I compared abr-encoded files with and without lowpass 16kHz:
Code: [Select]
foo_abx 1.3.3 report
foobar2000 v0.9.6 beta 4
2008/11/13 16:38:22

File A: F:\Temp\01 - Pet Shop Boys - In The Night --398ABR178.mp3
File B: F:\Temp\01 - Pet Shop Boys - In The Night --398ABR178lowpass16000.mp3

16:38:22 : Test started.
16:38:44 : 00/01  100.0%
16:39:31 : 01/02  75.0%
16:39:50 : 02/03  50.0%
16:40:04 : 03/04  31.3%
16:40:10 : 04/05  18.8%
16:40:19 : 05/06  10.9%
16:40:42 : 06/07  6.3%
16:40:49 : 07/08  3.5%
16:40:58 : 08/09  2.0%
16:41:11 : 09/10  1.1%
16:41:24 : 10/11  0.6%
16:41:35 : 11/12  0.3%
16:41:46 : 12/13  0.2%
16:42:18 : 13/14  0.1%
16:42:25 : 14/15  0.0%
16:42:35 : Test finished.

----------
Total: 14/15 (0.0%)

Clearly file B sounds better (less warbling). With lowpass 16000 average bitrate is also 176kbps.

As the lowpass encoded-file sounded better I compared it with the flac file:
Code: [Select]
foo_abx 1.3.3 report
foobar2000 v0.9.6 beta 4
2008/11/13 16:45:25

File A: F:\Temp\01 - Pet Shop Boys - In The Night.flac
File B: F:\Temp\01 - Pet Shop Boys - In The Night --398ABR178lowpass16000.mp3

16:45:25 : Test started.
16:45:45 : 01/01  50.0%
16:45:53 : 02/02  25.0%
16:46:06 : 03/03  12.5%
16:46:10 : 04/04  6.3%
16:46:18 : 05/05  3.1%
16:46:27 : 06/06  1.6%
16:46:40 : 07/07  0.8%
16:47:00 : 08/08  0.4%
16:47:07 : 09/09  0.2%
16:47:13 : 10/10  0.1%
16:47:22 : 11/11  0.0%
16:47:28 : 12/12  0.0%
16:47:37 : 13/13  0.0%
16:47:54 : 14/14  0.0%
16:47:56 : Test finished.

----------
Total: 14/14 (0.0%)

Still distinguishable.

I tried several times ABX-ing -V3 file against the --abr 178 (default parameters/no lowpass) file but could not distinguish them.

So for now on this sample I can conclude that an abr-encoding with a lowpass close to my hearing limit contributes to handling problematic spots and sounds also better than -V3 encoded file (with defaults).

How do lowpass frequencies affect VBR and ABR modes?

Reply #10
Results may be even better when going a little bit higher with abr target bitrate.
I remember when testing 3.98 abr 170 had a special issue with herding_calls. abr 175 was better, and abr 180 made this specific issue disappear. As you tested in this bitrate area maybe things are getting better when increasing bitrate a bit (maybe comparing against -V2 or -V2 --lowpass 16000 for a fair comparison).
lame3995o -Q1.7 --lowpass 17

How do lowpass frequencies affect VBR and ABR modes?

Reply #11
And now I compare lame -V0 with lowpass 16000 Hz with an equivalent default -Vx. For this sample the -V level results to be -V2 because -V0 --lowpass 16000 has an average bitrate of 225kbps and that of -V2 with default filter is 222kbps.

First ABX -V2 agains FLAC:
Code: [Select]
foo_abx 1.3.3 report
foobar2000 v0.9.6 beta 5
2008/11/20 16:03:45

File A: F:\Temp\01 - Pet Shop Boys - In The Night.flac
File B: F:\Temp\01 - Pet Shop Boys - In The Night --398V2.mp3

16:03:45 : Test started.
16:04:03 : 01/01  50.0%
16:04:08 : 02/02  25.0%
16:04:18 : 03/03  12.5%
16:04:25 : 04/04  6.3%
16:04:51 : 05/05  3.1%
16:04:57 : 06/06  1.6%
16:05:01 : 07/07  0.8%
16:05:05 : 08/08  0.4%
16:05:13 : 09/09  0.2%
16:05:18 : 10/10  0.1%
16:05:25 : 11/11  0.0%
16:05:29 : 12/12  0.0%
16:05:34 : Test finished.

----------
Total: 12/12 (0.0%)


Then -V0 --lowpass 16000 against FLAC:
Code: [Select]
foo_abx 1.3.3 report
foobar2000 v0.9.6 beta 5
2008/11/20 16:07:02

File A: F:\Temp\01 - Pet Shop Boys - In The Night.flac
File B: F:\Temp\01 - Pet Shop Boys - In The Night --398V0 lowpass16000.mp3

16:07:02 : Test started.
16:07:21 : 01/01  50.0%
16:07:26 : 02/02  25.0%
16:07:39 : 03/03  12.5%
16:07:44 : 04/04  6.3%
16:07:54 : 05/05  3.1%
16:08:07 : 06/06  1.6%
16:08:16 : 07/07  0.8%
16:08:25 : 08/08  0.4%
16:08:34 : 09/09  0.2%
16:08:48 : 10/10  0.1%
16:08:53 : 11/11  0.0%
16:08:59 : 12/12  0.0%
16:09:04 : 13/13  0.0%
16:09:08 : 14/14  0.0%
16:09:17 : 15/15  0.0%
16:09:19 : Test finished.

----------
Total: 15/15 (0.0%)


And then trying to see if I could distinguish both lossy files:
Code: [Select]
foo_abx 1.3.3 report
foobar2000 v0.9.6 beta 5
2008/11/20 16:10:04

File A: F:\Temp\01 - Pet Shop Boys - In The Night --398V0 lowpass16000.mp3
File B: F:\Temp\01 - Pet Shop Boys - In The Night --398V2.mp3

16:10:04 : Test started.
16:10:32 : 01/01  50.0%
16:10:39 : 02/02  25.0%
16:11:11 : 03/03  12.5%
16:11:43 : 04/04  6.3%
16:11:52 : 05/05  3.1%
16:12:17 : 06/06  1.6%
16:12:29 : 07/07  0.8%
16:12:54 : 08/08  0.4%
16:13:18 : 08/09  2.0%
16:13:38 : 09/10  1.1%
16:13:52 : 10/11  0.6%
16:14:04 : 11/12  0.3%
16:14:28 : 12/13  0.2%
16:14:42 : 13/14  0.1%
16:15:05 : 14/15  0.0%
16:15:24 : 15/16  0.0%
16:15:32 : Test finished.

----------
Total: 15/16 (0.0%)

I was not only able to distinguish -V0 --lowpass 16000 and -V2 but also noted that -V2 had more distortion than -V0 with lowpass. Clearly I prefer -V0 with lowpass.

How do lowpass frequencies affect VBR and ABR modes?

Reply #12
Could you try to ABX -V0 against -V0 with the lowpass? I would like to know if the lowpass actually improves the quality, in addition to making the file smaller.

How do lowpass frequencies affect VBR and ABR modes?

Reply #13
Could you try to ABX -V0 against -V0 with the lowpass? I would like to know if the lowpass actually improves the quality, in addition to making the file smaller.

I tried yesterday and this morning again, I also searched for other spots but no luck    I can't ABX lame3.98.2 -V0 against -V0 --lowpass 16000. This could confirm that in default mode the extra bits are only used for the frequencies above lowpass cutoff. Maybe some lame expert can shed some more light on this.

How do lowpass frequencies affect VBR and ABR modes?

Reply #14

Could you try to ABX -V0 against -V0 with the lowpass? I would like to know if the lowpass actually improves the quality, in addition to making the file smaller.

I tried yesterday and this morning again, I also searched for other spots but no luck    I can't ABX lame3.98.2 -V0 against -V0 --lowpass 16000. This could confirm that in default mode the extra bits are only used for the frequencies above lowpass cutoff. Maybe some lame expert can shed some more light on this.

Thanks. What were the bitrates?


How do lowpass frequencies affect VBR and ABR modes?

Reply #16
Here is what I was hoping for:

If a very high quality vbr setting is used (such as -V0) then on some frames there will be some reduction in quality due to the 320 kbps limit.

If part of the problem on these frames is that some bits are being used to encode high frequencies that most people can't hear, then changing the lowpass can make more bits available for the frequencies that can be heard.

Theoretically then, lowering the lowpass of a vbr encode can actually improve the quality, but this is apparently a very rare situation. I was hoping that this would turn out to be an example of that, which we could point to whenever this question comes up.