What do you get for your test set resampled to 32kHz, processed with -2?
Does 32k resampling followed by ReplayGain (only negative values applied) help even more?
It makes sense to have a -3 along the lines you're proposing, but I suspect the above will be dramatically more efficient, and still artefact-free (though with a 16k LPF and, with RG, loud tracks becoming quieter).
Cheers,
David.
I tried it with revised -3 settings (see below) and got:Does 32k resampling followed by ReplayGain (only negative values applied) help even more?
It makes sense to have a -3 along the lines you're proposing, but I suspect the above will be dramatically more efficient, and still artefact-free (though with a 16k LPF and, with RG, loud tracks becoming quieter).
Cheers,
David.
WAV: 125.11MB;
FLAC: 69.36MB, 782kbps;
-1: 52.59MB, 593kbps;
-2 @ 44.1kHz: 45.10MB, 509kbps;
-2 @ 32.0kHz: 38.97MB, 440kbps;
-3 @ 44.1kHz: 38.49MB, 434kbps;
-3 @ 32.0kHz: 33.95MB, 383kbps.
[edit] I tried a couple of albums and the results were a bit of a surprise: FLAC: 773MB, 914kbps; -3 @ 44.1kHz: 321MB, 381kbps; -3 @ 32.0kHz: 313MB, 371kbps. The size difference is welcome, but the resampling has a time overhead and the 16kHz LPF. [/edit]
Target b) for -3: OK, so we should think about the details.
Just following you dialog here.. This seems the right basic choice, there has to be a benefit for offering a (little) bit of quality. IMO that means a significant lower bit rate for -3 (compared with -2).
(Would -skew of -12 -18 -24 (for -3 -2 -1) be too agressive?)
I am wondering about the clipping reduction method - at the moment, if it finds 1 or more sample which clips after rounding then it reduces bits_to_remove by one and tries again, until bits_to_remove=0 then it just stores the original values. Is 0 permissible clipping samples a bit too harsh? At the time thatthe iterative clipping was introduced, I put in an "allowable" variable, implying that a number of clipping (but rounded) samples may be permitted.
I suppose you mean consecutive samples of the maximum (or minimum) value? To me in this case 0, 1 or 2 would make sense, only already badly clipping music would be affected by other values.And yes, the dither function is obsolete as you no longer opt to lower the amplitude.
I also tried -3 [..] which yielded 420kbps [..] [edit]Maybe 400kbps for "real music" should be the target rather than approaching that for my problem set. [/edit]
Feedback, as always is requested and valued.
-3 settings tweaked;
-allowable parameter implemented to allow a number of clips per codec block (total per block per channel).
CODE
lossyWAV alpha v0.4.5 : WAV file bit depth reduction method by 2Bdecided.
Delphi implementation by Nick.C from a Matlab script, www.hydrogenaudio.org
Usage : lossyWAV <input wav file> <options>
Example : lossyWAV musicfile.wav
Quality Options:
-1 extreme quality [5xFFT] (-cbs 512 -nts -3.0 -skew 30 -snr 24
-spf 11124-11125-11225-11225-11236 -fft 11111)
-2 default quality [4xFFT] (-cbs 512 -nts -1.5 -skew 24 -snr 18
-spf 11235-11236-11336-12348-1234D -fft 11101)
-3 compact quality [3xFFT] (-cbs 512 -nts -0.5 -skew 24 -snr 18
-spf 22236-22237-22347-22358-2234E -fft 01010)
-o <folder> destination folder for the output file
-force forcibly over-write output file if it exists; default=off
Advanced / System Options:
-nts <n> set noise_threshold_shift to n dB (-18dB<=n<=0dB)
(reduces overall bits to remove by 1 bit for every 6.0206dB)
-snr <n> set minimum average signal to added noise ratio to n dB;
(0dB<=n<=48dB)
-skew <n> skew fft analysis results by n dB (0db<=n<=48db) in the
frequency range 20Hz to 3.45kHz
-cbs <n> set codec block size to n samples (512<=n<=4608, n mod 32=0)
-fft <5xbin> select fft lengths to use in analysis, using binary switching,
from 64, 128, 256, 512 & 1024 samples, e.g. 01001 = 128,1024
-overlap enable conservative fft overlap method; default=off
-spf <5x5hex> manually input the 5 spreading functions as 5 x 5 characters;
These correspond to FFTs of 64, 128, 256, 512 & 1024 samples;
e.g. 44444-44444-44444-44444-44444 (Characters must be one of
1 to 9 and A to F (zero excluded).
-clipping disable clipping prevention by iteration; default=off
-allowable select allowable number of clipping samples per codec block
before iterative clipping reduction; (0<=n<=64, default=0).
-dither dither output using triangular dither; default=off
-quiet significantly reduce screen output
-nowarn suppress lossyWAV warnings
-detail enable detailled output mode
-below set process priority to below normal.
-low set process priority to low.
Special thanks:
Dr. Jean Debord for the use of TPMAT036 uFFT & uTypes units for FFT analysis.
Halb27 @ www.hydrogenaudio.org for donation and maintenance of the wavIO unit.
Delphi implementation by Nick.C from a Matlab script, www.hydrogenaudio.org
Usage : lossyWAV <input wav file> <options>
Example : lossyWAV musicfile.wav
Quality Options:
-1 extreme quality [5xFFT] (-cbs 512 -nts -3.0 -skew 30 -snr 24
-spf 11124-11125-11225-11225-11236 -fft 11111)
-2 default quality [4xFFT] (-cbs 512 -nts -1.5 -skew 24 -snr 18
-spf 11235-11236-11336-12348-1234D -fft 11101)
-3 compact quality [3xFFT] (-cbs 512 -nts -0.5 -skew 24 -snr 18
-spf 22236-22237-22347-22358-2234E -fft 01010)
-o <folder> destination folder for the output file
-force forcibly over-write output file if it exists; default=off
Advanced / System Options:
-nts <n> set noise_threshold_shift to n dB (-18dB<=n<=0dB)
(reduces overall bits to remove by 1 bit for every 6.0206dB)
-snr <n> set minimum average signal to added noise ratio to n dB;
(0dB<=n<=48dB)
-skew <n> skew fft analysis results by n dB (0db<=n<=48db) in the
frequency range 20Hz to 3.45kHz
-cbs <n> set codec block size to n samples (512<=n<=4608, n mod 32=0)
-fft <5xbin> select fft lengths to use in analysis, using binary switching,
from 64, 128, 256, 512 & 1024 samples, e.g. 01001 = 128,1024
-overlap enable conservative fft overlap method; default=off
-spf <5x5hex> manually input the 5 spreading functions as 5 x 5 characters;
These correspond to FFTs of 64, 128, 256, 512 & 1024 samples;
e.g. 44444-44444-44444-44444-44444 (Characters must be one of
1 to 9 and A to F (zero excluded).
-clipping disable clipping prevention by iteration; default=off
-allowable select allowable number of clipping samples per codec block
before iterative clipping reduction; (0<=n<=64, default=0).
-dither dither output using triangular dither; default=off
-quiet significantly reduce screen output
-nowarn suppress lossyWAV warnings
-detail enable detailled output mode
-below set process priority to below normal.
-low set process priority to low.
Special thanks:
Dr. Jean Debord for the use of TPMAT036 uFFT & uTypes units for FFT analysis.
Halb27 @ www.hydrogenaudio.org for donation and maintenance of the wavIO unit.
