IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
How do lowpass frequencies affect VBR and ABR modes?, I did some encodings with lame3.98.2 and am not sure about the right c
Alexxander
post Nov 11 2008, 12:32
Post #1





Group: Members
Posts: 457
Joined: 15-November 04
Member No.: 18143



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.
Go to the top of the page
+Quote Post
shadowking
post Nov 11 2008, 13:41
Post #2





Group: Members
Posts: 1523
Joined: 31-January 04
Member No.: 11664



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


--------------------
Wavpack -b450
Go to the top of the page
+Quote Post
halb27
post Nov 11 2008, 14:09
Post #3





Group: Members
Posts: 2424
Joined: 9-October 05
From: Dormagen, Germany
Member No.: 25015



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.


--------------------
lame3100m -V1 --insane-factor 0.75
Go to the top of the page
+Quote Post
melomaniac
post Nov 11 2008, 14:25
Post #4





Group: Members
Posts: 43
Joined: 1-August 08
From: Brussels
Member No.: 56565



Here's an explanation of the -Y switch (sort of a 16kHz lowpass used by default in V3 and below)
Go to the top of the page
+Quote Post
Slipstreem
post Nov 11 2008, 18:41
Post #5





Group: Members
Posts: 966
Joined: 7-July 06
Member No.: 32660



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? smile.gif

Cheers, Slipstreem. cool.gif
Go to the top of the page
+Quote Post
Alexxander
post Nov 11 2008, 18:53
Post #6





Group: Members
Posts: 457
Joined: 15-November 04
Member No.: 18143



QUOTE (Slipstreem @ Nov 11 2008, 19:41) *
...
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? smile.gif

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

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?
Go to the top of the page
+Quote Post
Lyx
post Nov 11 2008, 19:21
Post #7





Group: Members
Posts: 3353
Joined: 6-July 03
From: Sachsen (DE)
Member No.: 7609



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.
Go to the top of the page
+Quote Post
Slipstreem
post Nov 11 2008, 19:49
Post #8





Group: Members
Posts: 966
Joined: 7-July 06
Member No.: 32660



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! laugh.gif

Cheers, Slipstreem. cool.gif
Go to the top of the page
+Quote Post
halb27
post Nov 11 2008, 20:19
Post #9





Group: Members
Posts: 2424
Joined: 9-October 05
From: Dormagen, Germany
Member No.: 25015



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).


--------------------
lame3100m -V1 --insane-factor 0.75
Go to the top of the page
+Quote Post
Alexxander
post Nov 13 2008, 19:00
Post #10





Group: Members
Posts: 457
Joined: 15-November 04
Member No.: 18143



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
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
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
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
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).

This post has been edited by Alexxander: Nov 13 2008, 19:14
Go to the top of the page
+Quote Post
halb27
post Nov 13 2008, 19:28
Post #11





Group: Members
Posts: 2424
Joined: 9-October 05
From: Dormagen, Germany
Member No.: 25015



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).


--------------------
lame3100m -V1 --insane-factor 0.75
Go to the top of the page
+Quote Post
Alexxander
post Nov 20 2008, 18:17
Post #12





Group: Members
Posts: 457
Joined: 15-November 04
Member No.: 18143



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
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
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
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.
Go to the top of the page
+Quote Post
pdq
post Nov 20 2008, 18:28
Post #13





Group: Members
Posts: 3371
Joined: 1-September 05
From: SE Pennsylvania
Member No.: 24233



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.
Go to the top of the page
+Quote Post
Alexxander
post Nov 21 2008, 10:13
Post #14





Group: Members
Posts: 457
Joined: 15-November 04
Member No.: 18143



QUOTE (pdq @ Nov 20 2008, 18:28) *
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 dry.gif 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.
Go to the top of the page
+Quote Post
pdq
post Nov 21 2008, 13:23
Post #15





Group: Members
Posts: 3371
Joined: 1-September 05
From: SE Pennsylvania
Member No.: 24233



QUOTE (Alexxander @ Nov 21 2008, 04:13) *
QUOTE (pdq @ Nov 20 2008, 18:28) *

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 dry.gif 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?
Go to the top of the page
+Quote Post
Alexxander
post Nov 21 2008, 15:15
Post #16





Group: Members
Posts: 457
Joined: 15-November 04
Member No.: 18143



QUOTE (pdq @ Nov 21 2008, 13:23) *
...
Thanks. What were the bitrates?

278kbps and 225kbps
Go to the top of the page
+Quote Post
pdq
post Nov 21 2008, 17:09
Post #17





Group: Members
Posts: 3371
Joined: 1-September 05
From: SE Pennsylvania
Member No.: 24233



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. smile.gif
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 23rd July 2014 - 17:46