WavPack
Developer(s) | David Bryant |
---|---|
Stable release | 5.7.0[1]
/ 1 March 2024 |
Repository | |
Cross-platform | |
Type | Audio codec Container |
License | BSD license |
Website | wavpack.com |
Filename extension |
.wv (for both lossless and hybrid files), .wvc (correction file for hybrid files only) |
---|---|
Internet media type |
audio/x-wavpack (.wv), audio/x-wavpack-correction (.wvc) |
Magic number | wvpk |
Type of format | Lossless audio |
Contained by | Matroska (not required) |
Open format? | Yes |
Free format? | Yes |
WavPack is a
Features
WavPack compression can compress (and losslessly restore) 8, 16, 24, and 32-bit
Hybrid mode
WavPack also incorporates a "hybrid" mode, which still provides the features of lossless compression, but creates two files: a relatively small, high-quality, lossy file (.wv) that can be used by itself; and a "correction" file (.wvc) that, when combined with the lossy file, provides full lossless restoration. This allows the use of lossy and lossless codecs together. The lossy algorithm is similar to
Hybrid mode can handle floating-point data, but only when "exception" values like infinities or NaNs are not present. It cannot handle DSD because there is no lossy algorithm for DSD.[2]
A similar "hybrid" feature is also offered by
Summary
- BSD-like license
- Multiplatform
- Error robustness
- Fast encoding
- Higher compression ratios than other widely used (FLAC/ALAC) open-source lossless audio codecs
- Streaming support
- Supports multichannel audio and high resolutions
- Native support in WavPack 5.x for compressing Direct Stream Digital without converting the source file to PCM.
- Hybrid/lossy mode
- Hardware support (provided by Rockbox firmware)
- Metadata support (APEtags; APE tag is the preferred format)
- Supports RIFFchunks
- Compatible with ReplayGain
- Ability to create self-extracting files for the Win32 platform
- Supports 32-bit floating-point streams
- Supports embedded CUE sheets
- Includes MD5 hashes for quick integrity checking
- Can encode in both symmetrical and asymmetrical (slower encoding to speed up decoding) modes
History
David Bryant started development on WavPack in mid-1998 with the release of version 1.0 (1998-08-15). This first version compressed and decompressed audio losslessly, and it already featured one of the best efficiency vs. speed ratios among lossless encoders.[5]
Very soon after the release of version 1.0, v. 2.0 (2 September 1998) was released, featuring lossy encoding (using only quantization of prediction residue for data reduction – no psychoacoustic masking model was applied to the stream).
In 1999, version 3.0 (12 September 1999) was released, with a new "fast mode" (albeit with reduced compression ratio), compression of raw (headerless) PCM audio files, and error detection using a 32-bit cyclic redundancy check.
A feature added in late 3.x versions is the "hybrid" mode where the encoder generates a lossy file and a correction file such that both can be decompressed back to a PCM stream that has same quality as the original.[6]
In WavPack 4, a new file format structure is introduced. A "roadmap" is also published by the author with 4.40, containing possible hints on future development.[7] WavPack 5 introduced support for compressing DSD.
Support
Software
Some software supports the format natively (like DeaDBeeF, foobar2000,[8] and Jack! The Knife), while others require plugins. The official WavPack website offers plugins for Winamp, Nero Burning ROM, MediaChest 2.1, and several other applications, as well as a DirectShow filter.[9] dBpoweramp CD-Ripper,[10] by the author of foobar2000, as well as foobar2000[11] itself, and Asunder allow ripping Audio CDs directly into Wavpack files.
Linux support is available with a native port.
FFmpeg has a native WavPack encoder, which may be combined with software like GNU parallel to use multiple CPU cores to quickly transcode other lossless formats into WavPack, and from WavPack to any format that FFmpeg supports, without the need for additional software. However, FFMpeg's encoder is somewhat limited.
As of 2023, FFmpeg's WavPack encoder has some considerable limitations. It can only produce version 4 bitstreams, which do not support fast verification for file integrity checks, or more than 16 channels. It will also discard RIFF chunks and may not behave predictably with 24-bit input. It also defaults to less than optimal compression to achieve faster encoding. Due to lack of support for Hybrid mode, FFmpeg-based playback software will fail to consider the .wvc correction file if there is one present, and will play or transcode only the lossy section. (However, this is not the usual mode of operation for WavPack.) As native Wavpack support for Direct Stream Digital was added in version 5 of the reference encoder, FFmpeg WavPack also is limited to encoding PCM input.[12]
Hardware
Native support:
- Cowon A3 PMP supports WavPack out of the box.[citation needed]
Non-native support:
- Apple iPod range of music players do not support WavPack out of the box, but can through open-source Rockbox firmware.
- iRiver H100 series, through open-source Rockbox firmware.
- iRiver H300 series, through open-source Rockbox firmware.[13]
- Android smartphones and tablets with the installation of third-party media-player software.
- ChromeOS devices using media-player software installed in the Linux subsystem or the Android Play Store.
The WavPack website also includes a plugin that allows support for the format on the Roku PhotoBridge HD Archived 2005-07-08 at the Wayback Machine.[9]
Technology
To ensure high-speed operation, WavPack uses a predictor that is implemented entirely in integer math.[14] In its "fast" mode the prediction is simply the arithmetic extrapolation of the previous two samples. For example, if the previous two samples were −10 and 20, then the prediction would be 50. For the default mode a simple adaptive factor is added to weigh the influence of the earlier sample on the prediction. In the example above the resulting prediction could then vary between 20 for no influence to 50 for full influence. This weight factor is constantly updated based on the audio data's changing spectral characteristics.
The prediction generated is then subtracted from the actual sample to be encoded to generate the error value. In mono mode this value is sent directly to the coder. However, stereo signals tend to have some correlation between the two channels that can be further exploited. Therefore, two error values are calculated that represent the difference and average of the left and right error values. In the "fast" mode of operation these two new values are simply sent to the coder instead of the left and right values. In the default mode, the difference value is always sent to the coder along with one of the other three values (average, left, or right). An adaptive algorithm continuously determines the most efficient of the three to send based on the changing balance of the channels.
Instead of
This coding scheme is used to implement the "lossy" mode of WavPack. In the "fast" mode the output of the non-adaptive decorrelator is simply rounded to the nearest codable value for the specified number of bits. In the default mode the adaptive decorrelator is used (which reduces the average noise about 1 dB), and both the current and the next sample are considered in choosing the better of the two available codes (which reduces noise another 1 dB).
No
WavPack source code is portable and has been compiled on several
A cut-down version of WavPack was developed for the Texas Instruments TMS320 series Digital Signal Processor. This was aimed predominantly at encouraging manufacturers to incorporate WavPack compression (and de-compression) into portable memory audio recorders. This version supported features that were applicable only to embedded applications (stream compression in real-time, selectable compression rate) and dropped off features that only applied to full computer systems (self extraction, high compression modes, 32-bit floats). The TMS320 series DSPs are native integer devices, and support WavPack well. Some "special" features of the full WavPack software were included (ability to generate a correction "file" (stream), for example), and others were excluded. The port was based on version 4.
WavPack support was added to WinZip starting with version 11.0 beta, released in October 2006.[16] This extension to the ZIP file format was included by PKWARE, the maintainers of the format, in the official APPNOTE.TXT description file starting with version 6.3.2, released on 28 September 2007.[17]
See also
- Comparison of audio formats
- MPEG-4 SLS
- FLAC
- TTA
- Monkey's Audio
- ALAC
- Meridian Lossless Packing
References
- ^ "WavPack 5.7.0 Release". 1 March 2024. Retrieved 2 March 2024.
- ^ a b "WavPack User Documentation". www.wavpack.com.
- ^ Heijden, Hans (11 July 2006). "Compression and speed of lossless audio formats". Archived from the original on 3 July 2009. Retrieved 17 July 2009.
- ^ Bryant, David. "7.11 WavPack". In Solomon, David (ed.). Data Compression: The Complete Reference (PDF). p. 773.
- ^ Speek (7 February 2005). "Performance comparison of lossless audio compressors". Archived from the original on 25 November 2010. Retrieved 17 July 2009.
- ^ "WavPack Audio Compression".
- ^ "WavPack 4.40 released".
- ^ "foobar2000". foobar2000.org. Retrieved 2019-11-19.
- ^ a b "WavPack downloads". www.wavpack.com.
- ^ "dBpoweramp Codec Central". www.dbpoweramp.com. Retrieved 2019-11-19.
- ^ "foobar2000: Free Encoder Pack". www.foobar2000.org. Retrieved 2019-11-19.
- ^ "WavPack - Hydrogenaudio Knowledgebase".
- ^ "SoundCodecs < Main < Wiki". www.rockbox.org.
- ^ Bryant, David (21 March 2007). "Forum comment by developer". Retrieved 17 July 2009.
- ).
- ^ "WinZip – Additional Compression Methods Specification". WinZip International LLC. 15 November 2006. Retrieved 6 January 2008.
- ^ "APPNOTE.TXT – .ZIP File Format Specification". PKWARE Inc. 28 September 2007. Retrieved 6 January 2008.