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: -Y switch: strange behaviour (Lame 3.96.1/3.97a10) (Read 8342 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

-Y switch: strange behaviour (Lame 3.96.1/3.97a10)

Hi,
I just made some tests with the -Y switch with Lame 3.90.3,  3.96.1 and 3.97a10 and was surprised about the strange, inconsistent behaviour:

- 3.96.1 (VBR old): It encodes lots of HF content up to 19 kHz when used with --preset standard (or 18 kHz when used with --preset medium, which uses -Y by default). In fact, it seems to have relatively little impact on cutting HF content.
- 3.96.1 (VBR new): It encodes nothing at all above 16 kHz (both APFS -Y/APM), looks like lowpass.

Note: When used with 3.90.3, APS -Y works as I expected: It cuts out most content > 16 kHz, but there remain some spikes in places with much HF energy.

- 3.97a10: (VBR old): looks very similar to 3.90.3, i.e. some spikes remain.
- 3.97a10 (VBR new): same as 3.96.1 VBR new (all >16 kHz content is killed)

I must say I am confused by this behaviour. The complete cutting of anything above 16kHz in VBR new modes with 3.96.1 and latest alpha seems to be wrong. OTOH, 3.96.1 with VBR-old keeps much more HF content than either 3.90.3 or 3.97a10, which also seems strange.
This leads me to think that some modes could have a bug and should not be recommended at the moment, e.g. --preset fast medium 

Of course this doesn't mean these "buggy"(?) modes sound worse, as most people are not good at hearing beyond 16 kHz in actual music, but I thought I'd point out this inconsistent behaviour in case something has really gone wrong in 3.96.1 and/or 3.97a10.
Proverb for Paranoids: "If they can get you asking the wrong questions, they don't have to worry about answers."
-T. Pynchon (Gravity's Rainbow)

-Y switch: strange behaviour (Lame 3.96.1/3.97a10)

Reply #1
Interesting..How many samples did you test?

In my test preset fast medium 3.96 is less annoying than 3.90.3 in problem samples.
wavpack -b2.9cs.5
lame --preset cd -f

-Y switch: strange behaviour (Lame 3.96.1/3.97a10)

Reply #2
Both vbr modes in LAME use completely different code (or did the last time I messed with LAME).  Furthermore, -Y was never meant to be used by the public, but for some reason the LAME devs left it exposed.  In other words, you shouldn't even really count on -Y behaving any specific way as it's an experimental flag.  Obviously in this case, the different vbr implementations are probably interpreting the switch in a different manner.

So if -Y changes behavior in different versions, this doesn't necessarily imply anything is broken.  This is one of the obvious downsides of leaving this sort of functionality exposed through the frontend.

-Y switch: strange behaviour (Lame 3.96.1/3.97a10)

Reply #3
I cant figure out if any non -Y altered presets are effectively lowpassing at 16k ?
It may be tweaked so almost no energy is being put into 16k for presets with higher lowpass's. Despite peoples wishes for reaching numbers of KHz, past screeech, and twieieieng.
no conscience > no custom


-Y switch: strange behaviour (Lame 3.96.1/3.97a10)

Reply #5
This was a bug in vbr-new.
However, it should be fixed now.

-Y switch: strange behaviour (Lame 3.96.1/3.97a10)

Reply #6
Quote
Both vbr modes in LAME use completely different code (or did the last time I messed with LAME).  Furthermore, -Y was never meant to be used by the public, but for some reason the LAME devs left it exposed.  In other words, you shouldn't even really count on -Y behaving any specific way as it's an experimental flag.  Obviously in this case, the different vbr implementations are probably interpreting the switch in a different manner.

So if -Y changes behavior in different versions, this doesn't necessarily imply anything is broken.  This is one of the obvious downsides of leaving this sort of functionality exposed through the frontend.
[a href="index.php?act=findpost&pid=307160"][{POST_SNAPBACK}][/a]

Hmm, I thought -Y was expressly recommended (also by you) as the best and most sensible way of lowering the bitrate if --preset standard bloats too much for one's taste, but what you say implies that it shouldn't be used at all because its behaviour is not predictable. Is it at least safe to use with Lame 3.90.3?

What also worries me is that -Y is hardcoded into all VBR modes below -V2 in Lame 3.95.1 and above, so it actually is already widely used and cannot even be deactivated. So I guess it should be made sure that it works as it should.
Proverb for Paranoids: "If they can get you asking the wrong questions, they don't have to worry about answers."
-T. Pynchon (Gravity's Rainbow)

-Y switch: strange behaviour (Lame 3.96.1/3.97a10)

Reply #7
Quote
Interesting..How many samples did you test?

In my test preset fast medium 3.96 is less annoying than 3.90.3 in problem samples.
[a href="index.php?act=findpost&pid=307158"][{POST_SNAPBACK}][/a]

I tested it with several complete songs. Did you also compare the quality of --preset medium with --preset fast medium in 3.96?
Proverb for Paranoids: "If they can get you asking the wrong questions, they don't have to worry about answers."
-T. Pynchon (Gravity's Rainbow)

-Y switch: strange behaviour (Lame 3.96.1/3.97a10)

Reply #8
Quote
Quote
Interesting..How many samples did you test?

In my test preset fast medium 3.96 is less annoying than 3.90.3 in problem samples.
[{POST_SNAPBACK}][/a]

I tested it with several complete songs. Did you also compare the quality of --preset medium with --preset fast medium in 3.96?
[a href="index.php?act=findpost&pid=307266"][{POST_SNAPBACK}][/a]


If you're interested, I've tested medium preset (or V4) two times in a recent past:
- [a href="http://www.hydrogenaudio.org/forums/index.php?showtopic=30547&st=0&p=264991&#entry264991]3.97 alpha 5[/url]: --preset medium (V4) was significantly worse than --preset fast medium (V4 --vbr-new). Both encodings were compared to 3.09.3 ABR and 3.96.1.
- 3.97 alpha 7: Gabriel tuned -V4, and the gap between -V4 and -V4 --vbr-new was lowered, minor but still present, especially for some samples (micro-attacks problems).

-Y switch: strange behaviour (Lame 3.96.1/3.97a10)

Reply #9
Quote
This was a bug in vbr-new.
However, it should be fixed now.
[{POST_SNAPBACK}][/a]

Hmm, I downloaded the latest alpha10 again from rarewares, and VBR old/new still show quite different behaviour. Here's 40 seconds of an example:
Edit: Damn, I can't figure out how to upload the spectrogram screenshots. I'll do so in the uploads section and post the link.
OK, [a href="http://www.hydrogenaudio.org/forums/index.php?showtopic=34944]here[/url] they are.
Proverb for Paranoids: "If they can get you asking the wrong questions, they don't have to worry about answers."
-T. Pynchon (Gravity's Rainbow)

-Y switch: strange behaviour (Lame 3.96.1/3.97a10)

Reply #10
Fast was worse on a group of samples where i hear a pitch distorsion, old vbr doesn't have it or its much less. Then I found a cure song 'night like this' where i abxed 3.96.1 -aps but not --vbr-new - so sometimes 'new' is better ?!

On -apx I can't seem to tell anything apart on normal music on both vbr modes. Little problems are easier to spot on V5 / V4 and I'll upload some material soon.
wavpack -b2.9cs.5
lame --preset cd -f

-Y switch: strange behaviour (Lame 3.96.1/3.97a10)

Reply #11
Does that mean that --preset fast medium is buggy with 3.96.1? And if so, is it audible?

The reason I ask is because I have a lot of songs encoded with --preset fast medium and LAME 3.96.1 and I want to assess if a reencode is necessary.

thanks.

-Y switch: strange behaviour (Lame 3.96.1/3.97a10)

Reply #12
I also obtain a flat lowpass at 16000 hertz with 3.97a10, -V4 --vbr-new -Y (and --preset fast medium, checked just in case...).

-Y switch: strange behaviour (Lame 3.96.1/3.97a10)

Reply #13
Beto, 3.90.3 vbr-new was no better on those samples. I also think that the fast mode can outdo the old mode on others.
wavpack -b2.9cs.5
lame --preset cd -f

-Y switch: strange behaviour (Lame 3.96.1/3.97a10)

Reply #14
Quote
Does that mean that --preset fast medium is buggy with 3.96.1? And if so, is it audible?

The reason I ask is because I have a lot of songs encoded with --preset fast medium and LAME 3.96.1 and I want to assess if a reencode is necessary.

thanks.
[a href="index.php?act=findpost&pid=307285"][{POST_SNAPBACK}][/a]

I think it is confirmed that 3.96.1 has a buggy -Y switch with vbr-new, so -V3 --vbr-new and below will have a flat 16 kHz lowpass. If it is audible depends on your HF hearing capability, so only you can decide.
Proverb for Paranoids: "If they can get you asking the wrong questions, they don't have to worry about answers."
-T. Pynchon (Gravity's Rainbow)

-Y switch: strange behaviour (Lame 3.96.1/3.97a10)

Reply #15
My intention is not to create noise so I think it's better to be more clear 

Personally I can't hear a difference between 3.96.1 --preset fast medium and original, but since this discussion is about a bug that involves --preset fast medium with 3.96.1 (and newer) I thought encodings might be affected in a negative manner with more frequency and could be spotted easily by ear trained people.

I understand from shadowking's post and guru's last tests on LAME that this is not the case.

-Y switch: strange behaviour (Lame 3.96.1/3.97a10)

Reply #16
Quote
I also obtain a flat lowpass at 16000 hertz with 3.97a10, -V4 --vbr-new -Y (and --preset fast medium, checked just in case...).
[a href="index.php?act=findpost&pid=307287"][{POST_SNAPBACK}][/a]

This has to be wrong. I just encoded a file with that encoder/setting and viewed it with Nero Wave Editor, which gave me exactly what I expected; A main 16Khz front with a lot of spikes up to 18Khz all the way through. Same with -V3, but more spikes.

/edit: 3.96.1 creates the flat 16khz lowpass. 3.97a10 has it fixed.

-Y switch: strange behaviour (Lame 3.96.1/3.97a10)

Reply #17
Weird... There are maybe various alpha 10 version, with some corrected and some other not. Are you sure that you've used --vbr-new?

-Y switch: strange behaviour (Lame 3.96.1/3.97a10)

Reply #18
Perhaps it is simply because of the content.
Some tracks might not exhibit many any high freqs once encoded, and the thresholds are different between the 2 vbr modes.


-Y switch: strange behaviour (Lame 3.96.1/3.97a10)

Reply #20
Quote
Gabriel must be right. Try with the sample I used, and you'll see what I mean:
[{POST_SNAPBACK}][/a]

OK, I tried it with your file and also with another track  which I know has really heavy HF content (Nouvelle Vague - I Just Can't Get Enough) and both of them showed spikes above 16kHz with --preset fast medium. With less extreme tracks, however, it really looks like a lowpass. I encoded my track also to --preset medium, and it shows a lot more spikes. I'd estimate that --preset medium encodes at least 5 times as much HF content for this track, despite 8kbps lower bitrate. I'll put the screenshots in the upload section (see [a href="http://www.hydrogenaudio.org/forums/index.php?showtopic=34944&view=findpost&p=307560]here[/url])

So what do we conclude? Are both modes working OK (i.e. "normal" variation) or could either one be too little or too much sensitive with regard to HF content?
Proverb for Paranoids: "If they can get you asking the wrong questions, they don't have to worry about answers."
-T. Pynchon (Gravity's Rainbow)

-Y switch: strange behaviour (Lame 3.96.1/3.97a10)

Reply #21
It doesnt look bad to me. Theres no solid cut off in either graph, and the frequency limiting doesnt appear as sporadic - which I was wary of. I can see fast mode is encoding less high frequencies than slow mode, but still a fair amount past 16K - and no sharp transition.

The spikes all the way up to 22Khz are curious - they might be artifacts of the spectrogram generator.

Edit:
I suppose for people who specificaly want very high frequency content included, these graphs could indicate that vbr-new is unsuitable.
no conscience > no custom

-Y switch: strange behaviour (Lame 3.96.1/3.97a10)

Reply #22
Quote
The spikes all the way up to 22Khz are curious - they might be artifacts of the spectrogram generator.

With -V3 and -V4 --vbr-new I also get those 22khz spikes (in Adobe Aud 1.5). I see this on overcompressed, loud samples, where clipping has occured. When using --scale 0.9 or samples with no clipping, they don't appear.
Quote
Edit:
I suppose for people who specificaly want very high frequency content included, these graphs could indicate that vbr-new is unsuitable.
[a href="index.php?act=findpost&pid=307590"][{POST_SNAPBACK}][/a]

Only -V3 and below. --vbr-new -V2 includes a lot of HF content, and has no 22Khz spikes!

-Y switch: strange behaviour (Lame 3.96.1/3.97a10)

Reply #23
Quote
Quote
The spikes all the way up to 22Khz are curious - they might be artifacts of the spectrogram generator.

With -V3 and -V4 --vbr-new I also get those 22khz spikes (in Adobe Aud 1.5). I see this on overcompressed, loud samples, where clipping has occured. When using --scale 0.9 or samples with no clipping, they don't appear.
Quote
Edit:
I suppose for people who specificaly want very high frequency content included, these graphs could indicate that vbr-new is unsuitable.
[a href="index.php?act=findpost&pid=307590"][{POST_SNAPBACK}][/a]

Only -V3 and below. --vbr-new -V2 includes a lot of HF content, and has no 22Khz spikes!
[a href="index.php?act=findpost&pid=307603"][{POST_SNAPBACK}][/a]

Yeah, that's because V2 and above don't use -Y 
About the spikes: The sample I used is indeed very loud (RG -9db) and suffers from clipping.
Proverb for Paranoids: "If they can get you asking the wrong questions, they don't have to worry about answers."
-T. Pynchon (Gravity's Rainbow)