Most conversations about live stream quality automatically jump to the visual aspects. We talk about crisp images without any buffering or lag. Although it is often forgotten, audio is an equally important component of the viewer experience.
In order to maintain the quality of your live stream’s audio, you need to make sure that you are using the best audio codec setting when encoding the file.
This article will review the basics and help you solidify your knowledge of the best audio codec settings for online video streaming. We’ll go over what exactly an audio codec is, in addition to some common audio codecs. We will also discuss some other audio settings including audio bitrate, channels, and so on.
Equipped with this information, you’ll be able to make an informed decision about which audio codec to use for streaming live video.
Let’s get started.
The term codec is a portmanteau that combines the words “coder” and “decoder.” A codec is a standard or tool for encoding and decoding multimedia files.
“RAW” or uncompressed audio files are recorded using techniques that capture as much data as possible. This provides very high quality but results in very large file sizes that aren’t practical for live streaming.
To make audio files smaller and easier to distribute, we use a codec.
The first thing a codec does is encode an audio file. This encoding involves tossing out extra information to reduce file sizes while maintaining as much quality as possible. This process involves a sequence of complex mathematical functions, but you can read a basic overview here.
The second role of a codec is decoding, which is essentially playing back an audio file which has previously been encoded. To make a complex process very simple, this means reversing the math done during the encoding step.
In short, an audio codec is a protocol for compressing digital audio to save space and for playing back with the video.
There is a wide range of audio codecs available today. However, not all audio codecs are equally supported.
Some devices may support one audio codec, but not another. Some provide better quality, while others focus on compression above all else.
These are important considerations when it comes to deciding on the best audio codec for a given situation. Let’s go over a few of the most common and best audio codecs.
The most well-known audio format is probably MP3, which is technically called MPEG-2 Audio Layer III.
Originally introduced in the 1990s, MP3 revolutionized digital audio. Files were much smaller than the previous formats, allowing them to be streamed and downloaded over the internet.
MP3 also helped push the era of portable digital music past the CD era by enabling iPods and other early “MP3 players.” It is still widely used today.
Developed a few years after MP3, AAC built on the success of that format but increased compression efficiency.
AAC generally provides better audio quality at the same bitrate as MP3 or comparable quality at lower bitrates.
AAC has been upgraded several times. The latest version of the standard is HE-AAC. It is a closed source format but is probably the most widely used audio codec on the internet today. It is supported by most video streaming platforms.
WAV, which is short for “Waveform Audio File Format,” was originally released more than 25 years ago.
It is known to be primarily used on Windows computers to store uncompressed audio in the LPCM format.
AIFF is a Mac format that’s similar to WAV. It stores uncompressed audio using the PCM (Pulse-Code Modulation).
Like WAV, AIFF files are very large—around 10 MB for one minute of a standard audio recording.
Another codec on the market, albeit one that is becoming less common, is WMA—Windows Media Audio. This codec was developed as an alternative to MP3 but has become somewhat of a niche product.
The final audio codec we’ll take a look at is Opus. Opus isn’t in wide use yet, but it’s considered a next-generation codec. It provides higher audio quality at all bitrates compared to every other codec listed here. Opus also has the added advantage of being royalty-free and open source.
Both iOS and Android now natively support Opus playback. We’ll likely see Opus getting wider use in the future.
We believe that AAC is the best audio codec for most situations. AAC is supported by a wide range of devices and software platforms, including iOS, Android, macOS, Windows, and Linux. Other devices such as Smart TVs and set-top boxes also support AAC.
Besides wide support, AAC also has the advantage of better audio quality compared to MP3. Blind listening tests generally show that AAC is the best codec available for general use.
This may change in the future as Opus becomes more broadly supported. However, hardware and software changes move slowly. That day is likely still a few years away.
For internet video, AAC is the best audio codec for live streaming as well as video on demand. This is generally configured via settings in your hardware or software encoder.
Bitrate refers to the amount of data contained in a digital media file per second of that media. Typically measured in Kbps (Kilobits per second), the audio bitrate can often be a stand-in for quality.
All else being equal, an AAC audio file that’s encoded at a bitrate of 192 Kbps will sound better than one encoded at 64 Kbps.
Our recommended audio bitrates for video, when using AAC, our recommendation for the best audio codec, are as follows:
Aside from codecs, there are a number of other settings that are important for the audio portion of any live stream or video on demand.
We’re going to briefly cover channels, audio sample rates, and video codecs.
You may also notice a setting for audio channels in your encoder settings. There will be two settings here: stereo, and mono. Mono refers to “one,” a setting that should be used only for low-quality video. Using mono reduces bitrate.
Generally, you should use stereo audio for all video recordings and broadcasts at 480p and above. This will provide a superior listening experience.
The sample rate is another setting related to audio quality. It simply refers to the number of audio measurements taken per second with a given recording. More samples per second will record a fuller, richer palette of tones, but will result in more data.
Generally, we recommend that you use 44100 Khz as the audio sample rate for all live streaming and online video. This is the standard for most audio equipment and recordings and will function perfectly.
A live stream or online video requires more than the best audio codec settings. Obviously, video is crucial, as well.
That’s why it’s important to understand video codecs as well as audio codecs. We recommend using an H.264 video codec.
To learn more about the best video codec for HTML5 live streaming, this post’s video codec counterpart.
Although it is very important for live streaming, audio can be a confusing topic. We’re confident that once you begin to understand the principles, it will all come together.
We hope that this post has given you a better understanding of how audio codecs, audio bitrate, and all of the other pieces of audio compression and transmission work together to provide a wonderful viewing experience.
Dacast helps a wide range of businesses get started with live streaming. If you’d like to try out our services, you can check out how our live streaming platform could boost your business with our 30-day free trial (no credit card required). We’d love to help you meet your streaming goals today!
Thanks for reading! We love to hear from our readers, so if you have any questions or experiences to share, let us know in the comments! For regular tips on live streaming, feel free to join our LinkedIn group.
Stay up to date with our latest features and product releases