IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
to dither or not in WaveGain
cbope
post Nov 26 2003, 19:02
Post #1





Group: Members (Donating)
Posts: 158
Joined: 6-May 03
From: Helsinki, FI
Member No.: 6424



I am re-ripping all my CD's in AAC/192 to play on my iPod. Apple's idea of Replay Gain (Sound Check) is screwed, and I don't trust ripping accuracy in iTunes. So I'm ripping using PlexTools and then using WaveGain (with Speek's excellent frontend) on the WAV files in album mode, before dropping the WAV's into iTunes for encoding.

In the WaveGain frontend, there is an option for dithering, which is currently disabled. Should I enable dithering when I WaveGain, and if so what setting should I use? Will it make an audible difference when playing back the tracks on an iPod using Sennheiser MX300 earbuds, or is it a waste of time?

The AAC tracks are only used on my iPod, all my home listening (through my PC home entertainment system) is from MPC insane encoding.
Go to the top of the page
+Quote Post
dev0
post Nov 26 2003, 19:33
Post #2





Group: Developer
Posts: 1679
Joined: 23-December 01
From: Germany
Member No.: 731



The "WaveGain vs. MP3Gain" thread should answer all your questions and more.

I'll add it to the FAQ soon.


--------------------
"To understand me, you'll have to swallow a world." Or maybe your words.
Go to the top of the page
+Quote Post
cbope
post Nov 27 2003, 17:45
Post #3





Group: Members (Donating)
Posts: 158
Joined: 6-May 03
From: Helsinki, FI
Member No.: 6424



OK, I read through the entire 5 pages of lengthy discussion, but I still don't have a clear answer to my question regarding dithering during WaveGaining. It seems most of the discussion was in relation to the affect on bitrate and filesize and sfb21 in MP3 files.

I'l re-read it all again today and see if I can find the right grain of sand...
Go to the top of the page
+Quote Post
Xenno
post Nov 27 2003, 18:07
Post #4





Group: Members
Posts: 393
Joined: 23-July 02
From: Blue Grass, IA
Member No.: 2760



Here's another one...

http://www.hydrogenaudio.org/forums/index....5&hl=dithering#

xen-uno


--------------------
No one can be told what Ogg Vorbis is...you have to hear it for yourself
- Morpheus
Go to the top of the page
+Quote Post
cbope
post Nov 27 2003, 22:35
Post #5





Group: Members (Donating)
Posts: 158
Joined: 6-May 03
From: Helsinki, FI
Member No.: 6424



OK... <WARNING> I did some very subjective listening tests using my iPod. First, I decoded two FLAC tracks to WAV that I know very well and are also very well recorded (Rush - YYZ and Limelight). Next, I WaveGained the files using:

- 16 bit, no dither
- 16 bit, dither, no noise shaping
- 16 bit, dither, light noise shaping

I then encoded the resulting six WAVs in iTunes 4.1.1.54 to AAC, 192kbps. I created a playlist and dumped the files to my iPod. I listened using Sennheiser MX300 earbuds, since that is what I use everyday with the iPod.

I have to say the difference between no dither and dither, with or without noise shaping, is quite noticeable. Especially when listening to the "bells" at the start of YYZ. With dithering, they sounded clearer and more open than without dither. The guitars in Limelight sounded better, hard to describe, but definitely better. I could not really hear any difference between dither without noise shaping and with light noise shaping. Dynamics also seemed slightly improved on the dithered tracks.

I may load some of the test tracks into Cool Edit and take a look, but I'm pretty tired at the moment, so not tonight. I would also like to do an ABX test in the near future. I will difinitely use dither when WaveGaining my tracks prior to AAC encoding.

OK, end of my violation of the TOS for tonight... wink.gif
Go to the top of the page
+Quote Post
ScorLibran
post Nov 27 2003, 23:59
Post #6





Group: Banned
Posts: 769
Joined: 1-July 03
Member No.: 7495



QUOTE (cbope @ Nov 27 2003, 04:35 PM)
I have to say the difference between no dither and dither, with or without noise shaping, is quite noticeable. Especially when listening to the "bells" at the start of YYZ. With dithering, they sounded clearer and more open than without dither. The guitars in Limelight sounded better, hard to describe, but definitely better. I could not really hear any difference between dither without noise shaping and with light noise shaping. Dynamics also seemed slightly improved on the dithered tracks.

I've alway used dither w/ medium noise-shaping. I never did ABX testing or even subjective comparisons, though, but I've always been curious to know what such results would be. And I haven't seen a sound quality comparison between the dither/no-dither/NS-modes, either. The thread that dev0 linked is a great resource for the analysis of exactly how "lossy" WaveGain is, how it's treated by using dither, and it's relationship with SFB21 and --scale in LAME.

But I'd like to know as well if dither with medium noise shaping is what should be used. I think it's the concensus that dither is good when modifying gain, but which noise-shaping to use I've never seen an answer for specifically. And I think I have a decent understanding of dither, but noise-shaping I know nothing about.

If no one else posts ABX results using each of the noise-shaping modes, I'll try to find the time to do it myself. (I'll have to struggle to find the time before the end of the year. though.)
Go to the top of the page
+Quote Post
2Bdecided
post Nov 28 2003, 11:27
Post #7


ReplayGain developer


Group: Developer
Posts: 5059
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



It can be unhelpful to use noise-shaped dither when you're going to lossy encode the file. The extra high frequency noise can waste bits. (Speeking from a theoretical stand-point, rather than practical experience!).

Normal dither, at the correct level, is a good choice.

Cheers,
David.
Go to the top of the page
+Quote Post
ScorLibran
post Nov 28 2003, 12:12
Post #8





Group: Banned
Posts: 769
Joined: 1-July 03
Member No.: 7495



QUOTE (2Bdecided @ Nov 28 2003, 05:27 AM)
It can be unhelpful to use noise-shaped dither when you're going to lossy encode the file. The extra high frequency noise can waste bits. (Speeking from a theoretical stand-point, rather than practical experience!).

Normal dither, at the correct level, is a good choice.

Thanks for the reply, David.

How about if I'm encoding to FLAC?

How will the different types of noise-shaping affect sound quality, or would any differences likely be inaudible?

And would noise-shaped dither significantly affect bitrates for lossless encoding compared to normal (no-NS) dither? (I could actually test this one myself, but it'll be later today......fading away......must....sleep...)
Go to the top of the page
+Quote Post
2Bdecided
post Nov 28 2003, 14:14
Post #9


ReplayGain developer


Group: Developer
Posts: 5059
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



In theory, noise shaped dither will give you a lower noise floor than flat dither, so it's a good thing for lossless.

Not sure about the lossless bitrate - it could go either way - try it and see!


Re: lossy...

I've just remembered the contents of those threads, and why they do answer the question: With lossy, it's better to use wavgain to calculate the gain change value, but use --scale in the encoder (if the encoder --scales using floating point) to apply the gain change. No dither (noise), and no rounding (distortion). Best of both worlds! Use 24-bit decoding (then dither if you have a 16-bit sound card) on playback to maintain the dynamic range (if the lossy codec maintained it!).

Cheers,
David.
Go to the top of the page
+Quote Post
KikeG
post Nov 28 2003, 15:07
Post #10


WinABX developer


Group: Developer
Posts: 1578
Joined: 1-October 01
Member No.: 137



QUOTE (cbope @ Nov 27 2003, 10:35 PM)
Next, I WaveGained the files using:

- 16 bit, no dither
- 16 bit, dither, no noise shaping
- 16 bit, dither, light noise shaping

...

I have to say the difference between no dither and dither, with or without noise shaping, is quite noticeable.

It's quite possible that this was just placebo effect. Dither in 16-bit audio makes a tiny difference in practice, hardly noticeable under usual listening conditions. In order to be sure, you can use fileABX utility ( http://www.kikeg.arrakis.es/fileabx ) in order to generate blind copies of the files with and without dither, and try to identify them (pass an ABX test) with your iPod.
Go to the top of the page
+Quote Post
cbope
post Nov 28 2003, 19:59
Post #11





Group: Members (Donating)
Posts: 158
Joined: 6-May 03
From: Helsinki, FI
Member No.: 6424



KikeG

Yes, I know it is very possible it is placebo, which is why I mentioned I'd like to ABX test. I just don't know when I'll have the time in the near future. Real Life ™, you know.

2Bdecided

I understand what you are saying about the high frequency noise increasing the demand for bits in the upper frequencies. But, I noticed a strange thing when I checked the file sizes of all the test tracks; the 3 versions of each track were identical in size after encoding in AAC. Strange, I had expected to have some variation in file size. I'll have to re-run the test and generate some new test files, since I deleted them already. It's what I get for working while I was so tired...
Go to the top of the page
+Quote Post
Destroid
post Nov 28 2003, 22:22
Post #12





Group: Members
Posts: 545
Joined: 4-June 02
Member No.: 2220



QUOTE (cbope @ Nov 28 2003, 06:59 PM)
But, I noticed a strange thing when I checked the file sizes of all the test tracks; the 3 versions of each track were identical in size after encoding in AAC. Strange, I had expected to have some variation in file size.

I think that would be expected with CBR (in reference to your first post about AAC/192)


--------------------
"Something bothering you, Mister Spock?"
Go to the top of the page
+Quote Post
ScorLibran
post Nov 29 2003, 01:21
Post #13





Group: Banned
Posts: 769
Joined: 1-July 03
Member No.: 7495



The Effects of WaveGain with Dither/Noise Shaping on Compression Efficiency with FLAC

--- Software and Settings Used

Exact Audio Copy v0.95prebeta3 (secure mode)
WaveGain v1.0.3 (89.0dB nominal, dither on, 16-bit signed PCM, album gain)
FLAC v1.1.0 (compression level: 8, defaults for all other settings)
Tag&Rename v3.0(final) (to show nominal bitrates of FLAC files for reference)

--- Test Subject

The Beatles ~ Rubber Soul (1965)

Recommended Album Gain: -3.25dB (Scale: 0.6879)

I did WaveGain in each group on all 14 tracks on the album, but I only subsequently encoded the first 5 tracks into FLAC from each results set in the interest of brevity. Note that dither was used in all WaveGained test groups.

--- Resulting File Sizes

Original WAV Files
25,886KB --- 01 Drive My Car.wav
21,607KB --- 02 Norwegian Wood (This Bird Has Flown).wav
34,902KB --- 03 You Won't See Me.wav
28,305KB --- 04 Nowhere Man.wav
24,003KB --- 05 Think For Yourself.wav

(..and of course, the filesizes of WaveGained files using different noise-shaping were all the same as the original WAVs.)

FLAC Compression without WaveGain
Filesize --- Compression Ratio --- Nominal Bitrate --- Track
15,504KB --- 59.893% --- 846kbps --- 01 Drive My Car.flac
12,583KB --- 58.236% --- 824kbps --- 02 Norwegian Wood (This Bird Has Flown).flac
34,902KB --- 62.618% --- 886kbps --- 03 You Won't See Me.flac
28,305KB --- 61.569% --- 870kbps --- 04 Nowhere Man.flac
24,003KB --- 62.750% --- 887kbps --- 05 Think For Yourself.flac
Average Bitrate of All Five tracks: 862.6kbps
Average Compression Rate of All Five Tracks: 61.013%

FLAC Compression after WaveGain (Dither, No Noise-Shaping)
Filesize --- Compression Ratio --- Nominal Bitrate --- Track
14,732KB --- 56.911% --- 804kbps --- 01 Drive My Car.flac
11,913KB --- 55.135% --- 780kbps --- 02 Norwegian Wood (This Bird Has Flown).flac
20,779KB --- 59.535% --- 842kbps --- 03 You Won't See Me.flac
16,529KB --- 58.396% --- 825kbps --- 04 Nowhere Man.flac
14,293KB --- 59.547% --- 842kbps --- 05 Think For Yourself.flac
Average Bitrate of All Five tracks: 818.6kbps
Average Compression Rate of All Five Tracks: 57.905%

FLAC Compression after WaveGain (Dither, Light Noise-Shaping)
Filesize --- Compression Ratio --- Nominal Bitrate --- Track
14,765KB --- 57.039% --- 806kbps --- 01 Drive My Car.flac
11,932KB --- 55.223% --- 781kbps --- 02 Norwegian Wood (This Bird Has Flown).flac
20,813KB --- 59.633% --- 844kbps --- 03 You Won't See Me.flac
16,549KB --- 58.467% --- 826kbps --- 04 Nowhere Man.flac
14,306KB --- 59.601% --- 843kbps --- 05 Think For Yourself.flac
Average Bitrate of All Five tracks: 820.0kbps
Average Compression Rate of All Five Tracks: 57.993%

FLAC Compression after WaveGain (Dither, Medium Noise-Shaping)
Filesize --- Compression Ratio --- Nominal Bitrate --- Track
14,872KB --- 57.452% --- 812kbps --- 01 Drive My Car.flac
12,004KB --- 55.556% --- 786kbps --- 02 Norwegian Wood (This Bird Has Flown).flac
20,917KB --- 59.931% --- 848kbps --- 03 You Won't See Me.flac
16,630KB --- 58.753% --- 830kbps --- 04 Nowhere Man.flac
14,355KB --- 59.805% --- 846kbps --- 05 Think For Yourself.flac
Average Bitrate of All Five tracks: 824.4kbps
Average Compression Rate of All Five Tracks: 58.299%

FLAC Compression after WaveGain (Dither, Heavy Noise-Shaping)
Filesize --- Compression Ratio --- Nominal Bitrate --- Track
15,383KB --- 59.426% --- 840kbps --- 01 Drive My Car.flac
12,428KB --- 57.518% --- 814kbps --- 02 Norwegian Wood (This Bird Has Flown).flac
21,517KB --- 61.650% --- 872kbps --- 03 You Won't See Me.flac
17,196KB --- 60.750% --- 858kbps --- 04 Nowhere Man.flac
14,748KB --- 61.442% --- 869kbps --- 05 Think For Yourself.flac
Average Bitrate of All Five tracks: 850.6kbps
Average Compression Rate of All Five Tracks: 60.157%

--- Comparative Analysis

Comparing the baseline of FLAC compression (-8) without using WaveGain at all to...
> WaveGain with Dither, No Noise-Shaping = -44.0kbps (nominal), -3.108% compression ratio
> WaveGain with Dither, Light Noise-Shaping = -42.6kbps (nominal), -3.020% compression ratio
> WaveGain with Dither, Medium Noise-Shaping = -38.2kbps (nominal), -2.714% compression ratio
> WaveGain with Dither, Heavy Noise-Shaping = -12.0kbps (nominal), -0.856% compression ratio

Regarding sound quality variances, I have not done ABX testing of these outputs, but no audible problems "jumped out at me" with casual listening of all the encoded tracks.

The difference in compression ratios between no-NS, light-NS and medium-NS seem marginal (<0.5%), but the step between using medium-NS and heavy-NS is more significant, with a difference in compression rate of close to 2%. Hence, if the use of noise-shaped dither with WaveGain prior to lossless compression is recommended, and there are not audible sound quality differences between light, medium and heavy noise-shaping, then dither with light noise-shaping can be considered the most efficient WaveGain mode to use for maximum compression using FLAC with the music tested. I would think these results would carry over to any not-overly-compressed older rock&roll masterings. Efficiency of noise-shaped dither on newer and more harshly compressed rock music, or on other music types would likely have to be determined seperately.

I've always personally used WaveGain with dither and medium noise-shaping, so rather than re-ripping/encoding what I've already done, and since the difference in compression efficiency between light and medium is only marginal, I think I'll just stick with medium noise-shaping for my own use.

Now, if anyone else can post (ABX) test results of a sound quality analysis, then perhaps we could associate those results with these compression efficiency results to determine a "recommended noise-shaping method" to use with WaveGain, based on certain music types anyway. I can do a sound quality test myself, but it may be a while before I have enough time (and before I can get rid of the migraine I've had for days now). Plus my ears are not well artifact-trained, so someone with "better ears" than mine should do a sound quality test anyway.
Go to the top of the page
+Quote Post
2Bdecided
post Dec 1 2003, 11:42
Post #14


ReplayGain developer


Group: Developer
Posts: 5059
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



ScorLibran,

it's great that you tested this properly!


There's just one more thing to say, about that particular album. The original doesn't have noise shaping (and is from analogue masters) so its noise, at best, is ~90dB down from digital full scale, and will actually be much higher than this.

The album gain of -3.5dB would not lose any information from such an album (even without dithering, except during any digital fades, if present), and dithering would not really "add" perceptable noise, because the dither noise would be swamped by the noise on the recording.

So, in terms of quality, I can't imagine there would be any difference between the options.


Where noise shaped dither may (theoretically) be useful is where the original recording has a low noise floor (e.g. it is a digital recording, and/or it uses noise shaped dither) and/or the ReplayGain value is very negative.

If the noise floor of the original recording will be pushed below the noise floor of the replay gained version, using noise shaping can keep the noise floor after wavgain below the noise floor before wavgain. In practice, it's rare to find a CD with such a low noise floor, and it typically wouldn't have a very negative ReplayGain value anyway.

What I'm trying to say is that it's not really an issue with pop music!

Cheers,
David.
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: 24th July 2014 - 13:10