Audio comes in a wide range of formats and types, just like video and images. For a media server operator, knowing your way around the audio jungle is a real plus, potentially saving you time, effort and some sleepless nights. This blog looks at the three major audio categories, and gives media server programmers a hot tip on audio format!
Read on…
- Audio codecs and containers?
- Uncompressed audio formats
- Compressed audio formats with lossless compression
- Compressed audio formats with lossy compression
- Which audio format for media servers?
Audio codecs and containers?
Another aspect, as with video codecs and containers, is to distinguish between the coding format of the audio, the container of the audio data, and the audio codec. The codec handles the encoding and decoding of the raw (original) audio data and the encoded data is (most often) stored in a container file. Multimedia container formats such as Matroska (MKV) or Audio Video Interleave (AVI) by Microsoft support multiple types of audio and video.
So, let’s take a look at the various audio formats. They can be broken down into three main categories:
- Uncompressed audio formats
- Compressed audio formats with lossy compression
- Compressed audio formats with lossless compression
Uncompressed audio formats
This is what it sounds like (pun intended), where the audio is completely un-altered from its original state. It goes without saying that uncompressed files are quite large and will take up a lot of disk space. The most common uncompressed audio formats are WAV, AIFF, AU, PCM or BWF.
- BWF (Broadcast Wave Format) is mostly used in the broadcast industry and supports more meta-data to be stored in the file.
- WAV (Waveform Audio File Format is an audio file format developed by Microsoft and IBM. It typically contains uncompressed audio and uses the PCM (Pulse-Code Modulation) format. But beware: a WAV file does not automatically equal uncompressed audio.
- AIFF (Audio Interchange File Format) was developed by Apple and the audio data in most AIFF files is uncompressed PCM. AIFF-C or AIFC is the compressed version of AIFF.
- AU is the audio format developed by Sun Microsystems and was found on their NeXT systems and the early days of the web.
- PCM (Pulse-Code Modulation) defines the process used to convert analog audio into digital audio signals without compression. The now more-or-less deceased CD (Compact Disc) brought PCM to consumer audio applications when introduced in 1982.
Compressed audio formats with lossless compression
Lossless compression is a way to reduce (compress) the audio files without losing any information in the file. The original uncompressed data can be re-created from the compressed version. Since uncompressed files are very large, lossless compression is a way to reduce the file sizes.
Lossless compression formats include TTA, ATRAC Advanced Lossless, MPEG-4 SLS, MPEG-4 ALS, MPEG-4 DST, Windows Media Audio Lossless (WMA Lossless), and Shorten (SHN) – while the most common formats are:
- FLAC (Free Lossless Audio Codec) is an open format support for some meta-tags and album cover art. Audio compressed with FLAC can typically be reduced to between 50 and 70 percent of its original size.
- Monkey's Audio (filename extension .ape) was developed by Matthew T. Ashland and is slightly better to compress files than FLAC and WavPack, but it requires more processing power.
- WavPack (filename extension .wv) is a free and open-source audio compression format under the BSD license. In addition to the lossless compression, it has a “hybrid” where it creates two files: a high-quality, lossy file (.wv) that can be used stand-alone, and a "correction" file which, when combined with the lossy file, provides full lossless restoration.
- ALAC (Apple Lossless Audio Codec - filename extension .m4a) was developed by Apple. It is also known as Apple Lossless or Apple Lossless Encoder (ALE), and was initially a proprietary codec. Apple made the codec available open source and royalty-free in 2011.
COMPRESSED AUDIO FORMATS WITH LOSSY COMPRESSION
Lossy compression gives even smaller files than the lossless files, and this is achieved by removing some of the audio information and simplifying the data in the files. While the files become very small – also the audio quality is heavily impacted, depending on the level of compression.
MP3 is the most known file-format, along with ACC (Apples iTunes format) and Vorbis.Other formats are Opus, Musepack, ATRAC and Windows Media Audio Lossy (WMA lossy).
- MP3 (MPEG-1 Audio Layer III or MPEG-2 Audio Layer III) is a coding format for digital audio developed by MPEG (Moving Picture experts Group) and was released in 1993. It became the de facto standard for poorly compressed audio files in the days when people could download pirated CDs online from dubious websites. While you do not need to use maximum compression – a lot of people did.
- ACC (Advanced Audio Coding) was designed to be the successor of the MP3 format, and AAC in general achieves better sound quality than MP3 at the same bit rate. ACC was developed by Bell Labs, Fraunhofer Institute, Dolby Labs, Sony and Nokia. It is the default audio format for known products and services such as YouTube, iPhone, Nintendo consoles, iTunes and PlayStation.
WHICH AUDIO FORMAT FOR MEDIA SERVERS?
As far as I have found, all media servers support WAV files. While these files tend to get larger compared to the compressed files, audio files are generally very small compared to the video files played back by media servers. There should not really be any need to use compressed audio files with any media server. And we all like to keep things simple 😘 so – let´s WAV!
More blogs you might like:
Have you got what it takes to build your own media server?