Standard audio file formats
Web developers will consider the format of the media files that are to be used on the website.
WAV and MP3 are two common standard file formats used to store audio.
These formats should be understood in terms of:
- compression
- quality
- sampling rate (number of times sound is captured per second)
- file size
WAV | MP3 | |
Compression | Uncompressed (almost always) or make use of lossless compression (LCPM encoding) | Compressed lossy format - makes use of perceptual encoding |
Quality | Quality consistent with the original sound | Depends upon level of lossy compression applied. (It is often difficult for humans to notice the difference between most WAV and MP3 files) |
File Size | Restricted to no more than 4GiB | No defined limit |
Sampling rate () | 44.1KHz 鈥 48KHz | 44.1KHz 鈥 48 KHz |
Compression | |
WAV | Uncompressed (almost always) or make use of lossless compression (LCPM encoding) |
MP3 | Compressed lossy format - makes use of perceptual encoding |
Quality | |
WAV | Quality consistent with the original sound |
MP3 | Depends upon level of lossy compression applied. (It is often difficult for humans to notice the difference between most WAV and MP3 files) |
File Size | |
WAV | Restricted to no more than 4GiB |
MP3 | No defined limit |
Sampling rate () | |
WAV | 44.1KHz 鈥 48KHz |
MP3 | 44.1KHz 鈥 48 KHz |
As MP3 utilises lossy compression, the same audio stream would result in a smaller file size as an MP3 than it would if captured as a WAV file.
Both formats generally capture sound at 44.1KHz per second. It is possible to reduce the sampling rate, in which case the overall file size would be reduced. However, reducing the sampling rate would also reduce the overall quality of the sound as less data is captured per second.