WAV

From Audacity Wiki
Jump to: navigation, search
WAV (WAVeform audio format) is a Microsoft/IBM audio file container format. It is the main format used on Windows systems for storing uncompressed, lossless audio.
WAV should not be confused with WavPack which is a compressed but lossless format with an optional "hybrid mode" that combines a compressed lossy file with a "correction file" to produce a compressed lossless file. WavPack is not currently supported by Audacity.


Contents

Description

WAV is a variant of the RIFF bitstream format method for storing data in "chunks". It is thus similar to both the IFF and AIFF formats used on Amiga and Apple Macintosh computers respectively.

WAVs and AIFFs are in general equally compatible with either Windows and Macintosh operating systems. WAV files always have little-endian byte order whereas the original AIFF format was big-endian until Apple modified it for use on their OS X operating system.

While the RIFF format can act as a container for various audio compression codecs, more typically it contains uncompressed pulse-code modulation (PCM ) audio that retains all the samples of the original signal, and is thus known as "lossless". PCM is the format standard of audio CDs, conveying two channels with a sample rate of 44,100 Hz (samples per second), and a bit depth of 16 bits per sample.

This "audio CD" standard consumes approximately 10 MB of disk space on a computer for each minute of audio. In comparison, some modern formats such as FLAC which are compressed but still lossless, take about 4 MB of space per minute for a comparable file. A compressed, lossy format like MP3 takes much less space. An MP3 exported from Audacity at its default 128 kbps bit rate uses about 1 MB of space per minute for either a mono or stereo file.

The bit rate of MP3 can be compared with the much higher rates used in WAV and AIFF. Bit rate for WAV and AIFF is calculated thus:

(sample rate) * (bit depth) * (number of channels) = kbits per second


For example, 44 100 Hz, 16 bit stereo equates to (44 100 * 16 * 2) = 1411 kbps.


Popularity

Uncompressed WAV files are quite large in size, so as file sharing over the internet has become popular, the WAV format has declined in popularity. However, it is still a commonly used, relatively "pure" file type, suitable for retaining "first generation" archived files of high quality, or use on a system where high fidelity sound is required and disk space is not restricted.


Compressed WAVs from portable recorders

WAV and AIFF files containing PCM audio can be edited and manipulated with relative ease using computer software, because no decompression or compression needs to be done as part of the processing.

On the other hand WAV files typically used in portable recorders with limited memory and/or disk space are often some kind of compressed ADPCM file inside a WAV container. Many software programs including Audacity can have problems with these sort of WAV files. If you import a WAV file from such a recorder into Audacity and it says it cannot recognise the file format, the easiest general solution is to convert the file to a standard PCM WAV in other software. You can convert to standard WAV in SuperPlayer for Windows, FFMPEGX on a Mac, or mplayer on Linux.

Alternatives:

  • Use current Audacity and add the optional FFmpeg library to your computer. Note: The first time you import a WAV file from a portable recorder, be sure to click File > Import > Audio and choose "FFmpeg-compatible files" in the file type dropdown. Thereafter, Audacity will automatically use FFmpeg to import files, allowing you to drag the portable recorder files into Audacity if you prefer that method.
  • iTunes users can convert the file to WAV by right-clicking or control-clicking over the file in iTunes and using the "Convert to" option on the context menu. If this does not show WAV, set the conversion format to WAV in iTunes Preferences (click the "General" tab, then the "Import Settings" button, then choose "WAV Encoder" in the "Import Using" dropdown). If you have iTunes 7, the setting to change is on the small "Importing" tab inside the "Advanced" tab.


Working with WAV or AIFF in Audacity

When importing WAV or AIFF files into Audacity, the default behaviour is for Audacity to read the audio data direct from the disk rather than making a copy of it. This is done for speed and disk space considerations. However it does mean that unless you change Preferences so as to copy in the data, you need to keep the original WAV or AIFF file accessible in the same location it was in when you imported it. For more explanation, see this section of our File Management Tips.

Additionally, if you choose to read the WAV or AIFF data direct from disk, you can't (except in current Audacity, or in legcy 1.3.2 and later) overwrite that WAV or AIFF file by exporting to the same file name and location. For more explanation, see this section of File Management Tips.


Metadata

In current Audacity you can edit the metadata for WAV files as you would any other file. The data is exported in a RIFF INFO chunk in the file. However, not all player programs are able to read this RIFF chunk data. The following fields only are supported in Audacity:

Artist (IART)
Title (INAM) - called "Track Title" in Metadata Editor
Date Created (ICRD) - called "Year" in Metadata Editor
Comments (ICMT)
Copyright (ICOP)
Software (ISFT)

Genre (IGNR) is not supported by Audacity (although it is a valid RIFF INFO field) because the libsndfile library we use for WAV import/export does not support it. Custom tags (other than "Copyright" and "Software") are not supported.

Many audio editors, players and tag writing applications that support WAV metadata use a de facto "standard" promoted by Broadcast Software International. This includes an IALB INFO tag for "Album" which is missing from the RIFF standard (although the IPRD RIFF tag is sometimes used for "Album"). Other applications reading or writing WAV files may use the ID3 tags commonly found in MP3 files in addition to tags specified in the RIFF standard or by BSI. You can view a comparison of BSI and ID3 tags here.

Moving WAV tagging from libndfile to taglib (or possibly supporting INFO and ID3 tags using both libraries) seems to be the way to fix the lack of Audacity metadata in WAV files.


Broadcast WAVE Format

Broadcast WAVE format (BWF) is an extension of the WAV format to support additional broadcast-related metadata. This includes (in a BEXT chunk):

This makes it possible to exchange audio between different computers and to archive and synchronize the audio files. BWF also specifies selected standard RIFF tags in the INFO chunk (IARL, ICMT, ICOP, ICRD and INAM) and can support other additional extension chunks in the WAV file.

Although current Audacity can safely import BWF files, it cannot yet read or export the specialist metadata in the BEXT chunk. Audacity can only read and write the six RIFF INFO tags that Audacity already supports.

Personal tools