A History of Streaming CODECS
[April 2019] We continue our series on streaming, with a bit of history, and some examples.
Unlike radio, streaming is only 20 years old.
I was directly involved in one of the first streaming sites, Worldclassrock.com. I was working as Chief Engineer for their two 103.1 FMs that ring Los Angeles when they were sold to Clear Channel, which then, a few months later merged with AM/FM Broadcasting itself. This gave them three too many FM stations in Los Angeles and my two were the first to go.
The good news was they decided to put the intellectual property online. This included online streaming – and since practically no one was doing streaming at the time, we literally “wrote the book” on streaming.
At that time (early 2000) we were limited to two CODECS (Coder/decoder) streaming possibilities: Realplayer and Windows Media.
Both were clunky and only worked from a command line. Nonetheless, we were able to set up a 64 kbps Windows Media HiFi stream, along with two Realplayer streams – a 32 kbps for 56k dial up and a 20 kbps mono stream that would still work with the 28.8 dial up modems still commonly in use at the time (DSL was just beginning to become available, mostly through COVAD).
These two were the earliest CODECS available and have both gone the way of the dodo bird. The next CODEC singlehandedly revolutionized both digital audio and streaming: MP3!
MP3 was the first codec that the Fraunhofer Institute released in 1992.
It was the first CODEC that actually sounded good. It was the codec of choice for Napster, providing decent stereo audio all the way down to 96 kbps. Fraunhofer also attempted to release MP3 PRO as well but it never did get close to MP3 in popularity.
MP3, though showing its age (Fraunhofer recently stopped taking royalties for MP3, essenti- 2 ally releasing it into the Public Domain), is still the most common CODEC out there. It can be natively played with just about every player program out there. MP3 also relegated Real and Windows Media to the scrap heap of history.
As an example, Amazon sells its digital music files as 256 kbps MP3s.
By 1997 it was obvious MP3 was showing its age, so Fraunhofer decided to release a new CODEC, which they called Advanced Audio Coding or simply AAC.
AAC indeed was advanced – it could provide comparable fidelity in about half the bandwidth of MP3. In fact, in listening tests conducted by the BBC, the first generation of AAC, AAL-LC (Low Complexity) produced a sound/audio quality that was indistinguishable from a CD in just a 128 kbps stream! It took a 256 kbps (or higher) bit rate to do that with MP3.
iTunes uses AAC-LC for all its music files.
AAC2, +, AND ++
Soon afterwards, Fraunhofer came out with its version 2 of AAC (AAC+).
This completely broke ranks with the older AAC because it contained something called Spectral Band Replication. What this essentially does is replicate audio frequencies over 5000 Hz by sending filter information to the player that allows it to filter a noise source in such a way that it is a replicate of the original audio. In this way less bandwidth is required.
AAC2 (AAC+) is designed to sound better than the original AAC at bit rates below 80 kbps. A further refined flavor of AAC+ (AAC++) is essentially AAC+ with what is called Joint Stereo Coding (JSC).
Joint stereo allows for improved audio quality at bit rates below 64 kbps, by limiting stereo separation to 22 dB. Using AAC++ can result in acceptable stereo audio quality at bit rates of 48 kbps or even lower. My LPFM station, WZML streams using AAC+ at 64 kbps bandwidth and listeners report excellent audio quality.
Open Source Codecs
Both MP3 and AAC were owned and licensed CODECs; commercial users had to pay a royalty to the Fraunhofer Institute to use them.
Next, the XIPh.org Foundation decided to try and create a license free, open source CODEC. Ogg Vorbis was the result. The Ogg part is the data container while the Vorbis part is the CODEC itself. OGG Vorbis results in excellent stereo audio at bit rates as low as 48 kbps and it, like AAC produces near CD quality at bit rates of 128 kbps and higher.
The music service Spotify uses Ogg Vorbis for its coding.
My LPFM station, WZML also uses a 128 kbps Ogg Vorbis stream to send the audio stream to our transmitter.
Two More Common Codecs
The final two encoders in common usage today are OPUS and FLAC.
FLAC is actually not a bit replaced CODEC per se. Instead it offers true CD (WAV) quality in half the bandwidth of a normal WAV stream. A WAV stream normally requires about 1.4 Megabits per second bandwidth while FLAC, by essentially ‘zipping’ the music can cut this bandwidth in half (768 kbps).
Finally, I left the best for last: OPUS is the best sounding CODEC hands down by far, and I also open source, but unlike the other CODECs, it does not offer imbedded Metadata (song title and artist information, etc.) yet. It is a freeware codec that is supposed to soon be offered by Skype. OPUS normally uses the OGG encapsulation also (OGG OPUS).
Streaming with Codecs
Shoutcast can distribute both MP3 and all flavors of AAC* . Icecast also can distribute these formats without a problem. Most phones and computers built in the last 5 years (WIN10, Android 4.0, and higher, and iOs 9) can natively play all these formats, so compatibility is not a problem.
Which CODEC should you use for streaming? For general usage I find AAC+ 64 kbsp to work well because it offers great stereo streaming capability with only 30 Megabytes consumed per hour of streaming.OGG Vorbis also can sound great at this bit rate – and is free.
Showing Off the Differences?
I have set up several streams for you to listen to compare the different qualities of these various CODECs.
With some of these I am also doing another trick to increase fidelity – using a lower sampling rate.
By using 32 kHz sampling on some of these streams, I limit my top frequency response to 16 kHz (plenty for FM) while also giving additional bits to the stream. The amount of additional bits is equal to 44.1/32 or 1.38 (38% more resolution) below 16 kHz.
Would you like to compare these streams?
- 64 kbps AAC+ at 32 kHz sampling: https://tinyurl.com/WZML2108-64kAAC. You will need to put this stream into a player like VLC. (also available on Tunein.com or Alexa by searching for ‘WZML”)
- 128 kbps MP3 stream , 32 kHz sampled (the URL says AAC but that is wrong): https://tinyurl.com/WZML-2019-AAC128
- 128 kbps Ogg Vorbis 32 kHz sampled: http://220.127.116.11:34854/stream
- 192 kbps AAC-LC ‘CD quality’ stream 44.1 kHz sampled: http://18.104.22.168:34854/stream
- 192 kbps OPUS ‘CD quality’ 48 kHz sampled stream: https://tinyurl.com/WZML-2019-OPUS
I hope that this article has been useful and helps you understand the ins and outs of streaming.
*Shoutcast 2.7 and higher require a license for AAC to distribute it.
– – –
Dana Puopolo is the Chief Engineer at Rowan University’s WGLS in Glassboro, NJ. You can reach Dana at email@example.com