Streaming Codecs for Video and Audio: What Broadcasters Need to Know in 2022
Table of Contents
There’s a lot that goes on behind the scenes in live streaming. As a professional broadcaster, you should have at least a basic understanding of the technology that brings your broadcasts to life.
Even if you’re not a video engineer, the topic of streaming codecs is important. Codecs affect your streaming equipment needs, compatibility, budgets, bandwidth needs, and more. Staying on the cusp of next-generation codecs can be the difference between fading into obscurity or being on the cutting edge.
Today, we’re going to cover everything you need to know about codecs. We will make sure you understand what is a codec in a video streaming process.
We’ll discuss what a codec is, why they are important, and how they work before diving into several of the most common audio and video codecs. We will help you figure out the best codec for streaming to fit your specific needs. We’ll also cover some associated topics, including wrappers and transport protocols.
Additionally, we’ll talk about the relationship between codecs and bandwidth. To wrap it up, we’ll share some of our recommended codec settings for online video and live streaming.
Are you ready to jump into the world of streaming codecs?
Please keep in mind that this post covers a topic that is subject to regular new developments. This post reflects the most accurate information as of June 2021.
Table of Contents:
- Streaming Codecs: The Basics
- Common Audio and Video Codecs
- Transport Protocol
- Codecs and Bandwidth
- Next-Generation Streaming Codecs
- Recommended Codec and Settings for Live Streaming
Streaming Codecs: The Basics
When you record a video, RAW digital video files are generated. RAW digital video files are composed of a series of still pictures. When these videos are played in succession at a high speed, you get a video.
Similarly, RAW digital audio is simply a collection of measurements of the magnitude of various tones. When played together, you get understandable audio.
This RAW data is incredibly rich in information. However, that also means it’s bulky and unwieldy. A video composed of thirty images per second quickly becomes extremely large. Professional-grade cameras that capture RAW video can easily create terabytes of data from a single day of shooting. The same is true of RAW audio recorders.
While this is valuable in certain industries, it’s a liability for online video and live streaming. Viewers’ internet connections, mobile devices, and home computers simply aren’t powerful and fast enough to process this data. Storage and bandwidth are expensive, and RAW files tear through it.
Codecs offer a solution to this file size and speed issue. The term codec stands for “coding/decoding.” Essentially, a codec is a mathematical process that reduces digital file sizes by “throwing out” or reducing unnecessary data. The complex part is doing this intelligently while retaining as much quality as possible. That is what codec video is.
Different codecs have different ways of doing this. One basic method that codecs use is to compare each frame to the previous frame. If data remains the same (for example, there’s a dark corner of the frame in both images), it can be tossed from the second frame. This is a simplified example, but it helps you understand how a codec works.
Over time, the methods have improved. However, codecs that compress video to smaller sizes while retaining more quality tend to require more processing power—both to encode and decode.
Common Audio and Video Codecs
As we mentioned, there are many different codecs available. There are a few main codec types that are commonly used for online audio and video.
Some common audio and video codecs include:
- H.264 is the most common video codec used today. It’s supported by every single device and is our recommended codec for online video and live streaming. For audio video codec, H.264 is the standard.
- VP9 is another video codec that’s developed by Google. It’s free, open-source, and provides better performance than H.264. However, it’s not widely supported for live streaming yet.
- AAC is the best audio codec available today. Developed in the late 1990s, AAC provides great audio quality at relatively low bitrates. AAC is also widely compatible with all sorts of devices.
- MP3 is the original codec that popularized internet sharing of media. It’s still widely used, but not for video streaming. AAC is more efficient and widely supported.
These are the four most popular codecs that are used for audio and video purposes.
Since H.264 is the most popular video codec for online video, it’s worth mentioning a key element of it: profiles. Profiles are different versions of the H.264 codec. There are many different H.264 profiles, but the most common are Baseline, Main, and High.
Baseline and Main were originally created for low-powered devices. However, today the High profile is an excellent choice for most live video broadcasts. High-profile H.264 is the best codec for streaming video live.
Let’s clear up one common confusion. The file extension at the end of a digital file often doesn’t tell you anything about the codec. Common filenames for media end in .mp4, .mov or .avi.
These are called “wrappers” or “container formats.” A wrapper allows a file to contain multiple different elements, such as subtitles and metadata. The container format you use isn’t particularly important for online videos.
If in doubt, use .mp4. It’s the most widely supported format in wide use today. mp4 is the best video format for web streaming, as it will work with most other tools necessary for video streaming.
As you can tell, internet video requires a series of technologies built on top of each other to solve new challenges. The transport protocol falls into this category.
Transport protocols are methods for streaming multimedia over the internet. They must be understood by both the sender and receiver in order to function.
There are two very common protocols in use today in the live stream industry. The first is the HLS streaming protocol, which is what we use at Dacast to deliver streams to viewers. HLS is widely compatible and provides good performance.
Protocols are regularly updated as technology advances, and MPEG-DASH is one that is on the rise.
Codecs and Bandwidth
As you’ve learned, codecs help compress files to make them easier to transmit over the internet. Internet speeds are increasing, but video files are getting bigger as well. 4K video is becoming more common, as are HDR and HFR. Each of these advances in video technology requires more space.
The size and quality of your video stream determine how much bandwidth you use. Higher bitrates (which correspond to higher quality) require more bandwidth to send.
You’ll need to ensure your internet connection is fast enough to stream at your desired bitrate. You may also want to ensure your viewers have a quality viewing experience by streaming in multiple bitrates at once. Multiple bitrates allow the quality of the video to adjust to fit your viewer’s internet speeds and device abilities.
Next-Generation Streaming Codecs
Your bandwidth usage is dependent on the codec you use. There is a variety of next-generation video and audio codecs in development today.
Let’s mention a few briefly.
1. HEVC, or H.265:
H.265 is the successor to H.264. It promises to deliver video with about double the quality/efficiency ratio of H.264. It is the future of streaming codec.
Another forthcoming codec to check out is AV1. This open-source alternative to H.265 provides better quality and maybe ubiquitous in a few more years. It is a strong contender to become a top video codec in years to come.
Opus is an up-and-coming audio codec. The Opus codec delivers better audio quality at every bitrate compared to other audio codecs. Opus codec is free and open-source and natively supported on iOS and Android.
Recommended Codec and Settings for Live Streaming
As we mentioned, codecs are an ever-changing technology, so the “recommended” codecs change relatively quickly.
For now, we recommend that most broadcasters use the H.264 codec for video and the AAC codec for audio. These are the best streaming codec for both live and on-demand video content delivery.
These recommendations will likely change in the future as codec technology develops, but as of right now, these are the best choices to reach the maximum possible audience with your OTT video.
For other encoder settings such as bitrate, resolution, sample rate, and so on, check out our blog post that covers recommended encoding settings.
Now that you’re up to date on everything you need to know about streaming codec, you’re one step closer to your first professional broadcast.
In this article, we’ve covered how codecs work, related technology, and the ideal codecs for use in online broadcasting today. We hope that the information we’ve shared gives you a bit more confidence in the more technical aspects of professional broadcasting and a better understanding of codec for video streaming.
If you are just getting into professional broadcasting, you’ll need a live streaming platform like Dacast to get started.
We invite you to give Dacast a try risk-free for 14 days. All you have to do is sign up, and you can start streaming in minutes. No credit card is required. Just click the link below to start streaming live in a matter of minutes!
Any questions, comments, or ideas? Let us know in the comments section, below! And for regular tips on live streaming and exclusive offers, feel free to join our LinkedIn group.
Thanks for reading, and as always, best of luck with your live streams!
Stay up to date with our latest features and product releases