Difference between revisions of "LossyWAV"

From Hydrogenaudio Knowledgebase
Jump to: navigation, search
Line 1: Line 1:
lossyWAV is a lossy pre-processor for audio. It reduces bit depth of the input signal, which, when used in conjunction with certain lossless codecs, reduces the bitrate significantly compared to unpreprocessed compression. lossyWAV's primary goal is too maintain [[transparency]] with a high degree of confidence when encoding any audio data.
+
{{Codec Infobox
 +
| name = lossyWAV
 +
| logo =
 +
| type = lossy
 +
| purpose = lossy pre-processor
 +
| maintainer = [http://www.hydrogenaudio.org/forums/index.php?showuser=42400 Nick.C]
 +
| recommended_encoder = lossyWAV
 +
| recommended_text = latest
 +
| website = [http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Hydrogenaudio]
 +
}}
 +
 
 +
lossyWAV is a lossy pre-processor for audio. It reduces bit depth of the input signal, which, when used in conjunction with certain lossless codecs, reduces the bitrate significantly compared to unpreprocessed compression. lossyWAV's primary goal is to maintain [[transparency]] with a high degree of confidence when encoding any audio data.
  
 
==History==
 
==History==
Line 13: Line 24:
 
*-2: General usage; a compromise between -1 and -3.
 
*-2: General usage; a compromise between -1 and -3.
 
*-3: High quality preset for usage on a FLAC or wavPack enabled DAP.[http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=56129&view=findpost&p=531316]
 
*-3: High quality preset for usage on a FLAC or wavPack enabled DAP.[http://www.hydrogenaudio.org/forums/index.php?s=&showtopic=56129&view=findpost&p=531316]
 +
 +
==Supported input formats==
 +
*[[WAV]]: 16, 24-bit; ≥32KHz [[Pulse Code Modulation|PCM]].
  
 
==Known supported codecs and optimal settings==
 
==Known supported codecs and optimal settings==
 
{| class="wikitable" style="text-align:center"
 
{| class="wikitable" style="text-align:center"
|+ The table's caption
+
|+ '''Recommended settings'''
 
|-
 
|-
!Codec || lossyWAV parameters || Encoder parameters
+
!Codec
 +
!lossyWAV parameters
 +
!Encoder parameters
 
|-
 
|-
 
![[Free Lossless Audio Codec|FLAC]]
 
![[Free Lossless Audio Codec|FLAC]]
Line 105: Line 121:
  
 
==Frequently asked questions==
 
==Frequently asked questions==
*'''Question:''' Is it VBR?
+
*'''Question:''' Is it [[Variable Bitrate|VBR]]?
 
*'''Short answer:''' Yes.
 
*'''Short answer:''' Yes.
  
*'''Question:''' Is it transparent?
+
*'''Question:''' Is it [[transparent]]?
 
*'''Short answer:''' Almost certainly.
 
*'''Short answer:''' Almost certainly.
  
*'''Question:''' Is it lossless?
+
*'''Question:''' Is it [[lossless]]?
 
*'''Short answer:''' No.
 
*'''Short answer:''' No.
  
 
*'''Question:''' Why should I use this?
 
*'''Question:''' Why should I use this?
*'''Short answer:''' High quality, extremely low chance of audible artefacts, reasonable bitrates.
+
*'''Answer:'''
 +
:*high quality
 +
:*extremely low chance of audible [[artifact|artefacts]]
 +
:*reasonable [[bitrate]]s
 +
:*usable with unmodified, established lossless formats.
  
 
==External links==
 
==External links==
 
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Current development thread]
 
*[http://www.hydrogenaudio.org/forums/index.php?showtopic=56129 Current development thread]

Revision as of 12:36, 27 November 2007

lossyWAV is a lossy pre-processor for audio. It reduces bit depth of the input signal, which, when used in conjunction with certain lossless codecs, reduces the bitrate significantly compared to unpreprocessed compression. lossyWAV's primary goal is to maintain transparency with a high degree of confidence when encoding any audio data.

History

lossyFLAC was an experiment started by 2Bdecided with the aim of transparently reducing audio bit depth (making some lower bits zero), thereby taking advantage of FLAC's detection of consistently zeroed lower sample bits within each single frame, increasing coding efficiency.[1]

Nick.C ported the original MATLAB implementation to Delphi, and has since heavily developed and built upon the original methods of lossyWAV. Fine tuning has been performed with the help of halb27.

lossyWAV processed files are usually named with a double filename extension, to make them instantly identifiable. e.g. ".lossy.flac" would indicate an audio file which was processed using lossyWAV, and subsequently encoded using FLAC.[2]

Presets

  • -1: Disc space-saving alternative to lossless archiving for large audio collections.
  • -2: General usage; a compromise between -1 and -3.
  • -3: High quality preset for usage on a FLAC or wavPack enabled DAP.[3]

Supported input formats

  • WAV: 16, 24-bit; ≥32KHz PCM.

Known supported codecs and optimal settings

Recommended settings
Codec lossyWAV parameters Encoder parameters
FLAC -b 512
TAK
WavPack
WMA Lossless -wmalsl (equiv. to -cbs 2048)

Known unsupported codecs

lossyWAV application settings

lossyWAV beta v0.5.1 : 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 [4xFFT] (-cbs 512 -nts -2.0 -skew 36 -snr 21
              -spf 22224-22225-11235-11246-12358 -fft 11011)
-2            default quality [3xFFT] (-cbs 512 -nts +1.5 -skew 36 -snr 21
              -spf 22224-22235-22346-12347-12358 -fft 10101)
-3            compact quality [2xFFT] (-cbs 512 -nts +6.0 -skew 36 -snr 21
              -spf 22235-22236-22347-22358-2246C -fft 10001)

-o <folder>   destination folder for the output file
-nts <n>      set noise_threshold_shift to n dB (-18.0dB<=n<=+6.0dB)
              (-ve values reduce bits to remove, +ve values increase)
-force        forcibly over-write output file if it exists; default=off

Codec Options:

-wmalsl       optimise internal settings for WMA Lossless codec; default=off

Advanced / System Options:

-snr <n>      set minimum average signal to added noise ratio to n dB;
              (0.0dB<=n<=48.0dB) Increasing value reduces bits to remove.
-skew <n>     skew fft analysis results by n dB (0.0db<=n<=48.0db) 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. 22235-22236-22347-22358-2246C (Characters must be one of
              1 to 9 and A to F (zero excluded).
-allowable    select allowable number of clipping samples per codec block
              before iterative clipping reduction; (0<=n<=64, default=0).

-window       select windowing function n (0<=n<=6, default=0); 0=Hanning
              1=Bartlett-Hann; 2=Blackman; 3=Nuttall; 4=Blackman-Harris;
              5=Blackman-Nuttall; 6=Flat-Top.
-clipping     disable clipping prevention by iteration; default=off
-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:

David Robinson for the method itself and motivation to implement it in Delphi.
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.

Frequently asked questions

  • Question: Is it VBR?
  • Short answer: Yes.
  • Question: Is it transparent?
  • Short answer: Almost certainly.
  • Question: Is it lossless?
  • Short answer: No.
  • Question: Why should I use this?
  • Answer:
  • high quality
  • extremely low chance of audible artefacts
  • reasonable bitrates
  • usable with unmodified, established lossless formats.

External links