Guide to Adopting AV1 Encoding

Originally published at: Bitmovin's Guide to Adopting AV1 Encoding

Introduction

This post will provide some background information on video codecs and the pros and cons of the most common codecs used by streaming services. We’ll discuss why you should be taking advantage of newer codecs and the many benefits they can provide. Finally, we’ll provide a step-by-step guide through the factors and questions you should consider when evaluating or adding AV1 encoding to your workflow.

What are video codecs?

The word codec is a combination of the words coder and decoder. Video codecs are used to reduce or compress the size of video files for storage and transmission, because raw source files produced by professional studios or cameras use too much data to be delivered smoothly over the internet. For video streaming purposes, the master file or live source is encoded for transmission, then decoded for playback on the end-user device. This encoding typically involves lossy compression, meaning the overall file size is reduced, often significantly, with a tradeoff of slightly lower visual quality. How noticeable that quality reduction is and the amount of data compression possible depends on the codec and settings that were used.

What is the best video codec?

Like with many technical questions, the frustrating, but most accurate answer is “It depends.” Each codec has its own pros and cons in terms of cost, performance and support, so the best codec (or codecs) can differ based on your company’s goals, applications and business model. Let’s take a closer look at some of the high level pros and cons of the most common codecs used by streaming platforms.

H.264/AVC

👍 –  Almost universal playback compatibility with nearly 20 years in the field. 

👎 –  It’s almost 20 years old, and several newer codecs offer better compression and can produce higher quality video while using less data, providing a better viewing experience and reducing your long-term storage and delivery costs. 

H.265/HEVC

👍 –  MPEG’s successor to H.264/AVC can provide higher quality per bit and makes it possible to deliver HD,  4K and even 8K video to a wider audience, while using less bandwidth. H.265/HEVC is usually encoded with a higher bit depth than H.264/AVC, making high dynamic range (HDR) support possible, so most Dolby Vision streaming workflows use H.265/HEVC.

👎 – Royalty fees and complex licensing terms for H.265/HEVC have led some content creators and streaming services to avoid it. There are multiple patent pools, along with some individual companies that claim to own patents covering essential parts of the standard, creating uncertainty for end users around their liability and obligations.

VP9 

👍 – Google’s open source VP9 is a royalty-free alternative to H.265/HEVC with similar performance in terms of compression efficiency. Platforms like YouTube and Facebook use VP9 to offer higher resolution video than H.264/AVC and improve video quality over low bandwidth, which is especially important for viewing on mobile devices. 

👎 – VP9 is over 10 years old and while it is still widely used and supported, most of the current innovation and new development is focused on its successor, AV1.

AV1

👍 – AV1 offers the best compression performance of any of the codecs discussed here. On average it can achieve the same visual quality using ~50% less data than H.264/AVC and ~30% less data than H.265/HEVC and VP9. Those are significant savings that really add up over time and millions of views. YouTube and Netflix both use AV1 for their most popular HD and 4K content as a way to enable high-res viewing for people on slower connections, improving quality of experience and drastically reducing data usage, which lowers their egress and CDN costs.

👎 – Even though it’s a few years old, adoption of AV1 has been lagging behind initial expectations, mostly because of slower than expected rollout of playback and decoding support. Because of that, anyone encoding with AV1 will still need to provide backup H.264/AVC streams in the near future. However, recently launched products like the iPhone 15 Pro, Apple’s M3 desktop processor and the Meta Quest 3 headset all include AV1 decoding support, so hopefully the tide is turning and AV1 adoption will ramp up in the coming months.

Why should I use newer codecs?

In general, newer codecs provide better compression efficiency than their predecessors, using less bits to deliver the same level of quality. They can also support higher resolutions and wider color and contrast ranges than earlier generations. This has multiple benefits for streaming services and their viewers.

Better visual quality at lower bitrates

When delivering video to mobile phones, to viewers on shared, congested wifi or in areas with limited bandwidth, the tradeoff between quality and bitrate becomes especially apparent. This is where the compression performance of newer codecs can really stand out. Using a newer codec like AV1 can mean the difference between acceptable quality and a pixelated mess as you can see in the screenshot below from Facebook.

Improved quality of experience and less buffering for all viewers

It’s not just the low bitrate streams where newer codecs can improve quality of experience. The ability to deliver higher quality with less bits improves QoE across all adaptive bitrate renditions. At Demuxed 2023, Netflix reported that using AV1 not only reduced network bandwidth, but also lowered rebuffer rates and play start delay, while providing up to 38% reduction in quality drops compared to other codecs. They were also able to improve VMAF quality scores by up to 10 points with AV1. 

Higher resolutions and more advanced features

H.264/AVC can technically be used for HD and 4K encoding, but you typically need extremely high bitrates to achieve the quality viewers expect from HD and UHD content. These higher bitrates can lead to more rebuffering and QoE issues, not to mention higher prices for storage and delivery. Most H.264/AVC workflows are limited to 8-bit encoding and decoding, which means it can’t really be used for HDR. H.265/HEVC, VP9 and AV1 can all handle 4K and 8K resolutions and support 10-bit and higher encoding, making them a better choice for premium content tiers. Netflix reported that using AV1 led to a 5% increase in 4K streaming time, so it can make a meaningful difference for the viewing experience and how your platform is perceived by users. 

Long term cost savings

In addition to improving QoE, the better compression performance and lower bitrates required by newer codecs will also save you money over the lifetime of your video content. Even though the encoding is more complex and may cost a little more up front, the smaller file sizes can reduce your storage footprint and drastically cut your bandwidth on network egress and CDN delivery charges. For popular content receiving tens of thousands or millions of views, the overall savings can be substantial.

Should I use more than one codec?

This could potentially be another frustrating “It depends” question, but in most cases, the answer here is “Yes, you probably should”. Using H.264/AVC together with at least one newer codec ensures you have video that is backward compatible and available for everyone, while providing a higher quality viewing experience for those on newer devices with more advanced codec support. YouTube for example, encodes content in H.264/AVC, VP9 and AV1. Netflix uses H.264/AVC and AV1 for standard dynamic range content and H.265/HEVC for Dolby Vision. The right combination for your business will depend on your target viewing platforms, output quality, and business model. The step-by-step guide below will focus on AV1, but the same questions and steps could also be applied to other codecs.    

Step-by-step guide to adding AV1 encoding:

1. Determine how AV1 can help your business goals and viewer experience

Adding a new codec can be beneficial in many ways as discussed above, but it’s a big decision and should be made with deliberate intentions and goals in mind. What is it that you want to achieve by adding a new codec to your encoding stack? 

  • Quality improvement on mobile devices or areas with limited bandwidth? 
  • Long term reduction of storage, egress, and CDN delivery costs? 
  • Making premium 4K and HDR tiers available to a broader audience? 
  • Improving QoE and reducing buffering across your platform? 

AV1 can help in all of those areas, and you can fine tune your implementation to achieve your specific objectives.

2. Project Total Cost of Ownership (TCO), savings and revenue potential

AV1 is more complex to encode and can cost a little more in terms of computing power and encoding time. But the significant bandwidth savings it provides over H.264/AVC mean that in most cases, this initial cost will be more than offset by the longer term egress and CDN savings, giving you a lower TCO over the lifetime of each video. The actual break-even point will depend on your own contracts and delivery costs, so we created this calculator to help forecast where you might begin to see overall savings by adding AV1.

Besides lowering TCO for your video, AV1 can actually help generate revenue and retain subscribers. Its lower bitrate requirements for HD and 4K content mean that it can grow your total addressable market for higher quality upsell tiers. It can also help reduce subscriber churn by lowering rebuffering rates and providing a generally better quality of experience for your viewers. 

3. Utilize cloud-native encoding and analytics for fast, risk-free evaluation

Some on-premises encoders may require a pricey license upgrade to support AV1 encoding and in other cases, you’ll need to purchase a new appliance or hardware. You can avoid those high up-front costs that may stifle innovation by using a cloud encoding service that lets you pay on a usage basis. Even better, with Bitmovin’s cloud-native encoding, you can try it for free with our 30-day trial. With Bitmovin, you can also use your cloud credits on AWS, Azure or Google Cloud or use some of your contracted commitment to help fund your initial evaluation.

One of the knocks on AV1 has been that there is less playback support compared to older codecs, but there’s been steady improvement and some big announcements over the last year, so momentum is building. Our AV1 playback support guide details which SmartTVs, streaming sticks and consoles already support AV1, but you can actually go beyond rough projections and use Bitmovin’s Video Analytics to see how much of your own audience could already be taking advantage of AV1. This is also available to you in our free 30-day trial and is easy to add to most players, so you should definitely take full advantage of that as part of your evaluation. The numbers may surprise you!

4. Accelerate proof-of-concepts with content-aware, Per-Title Encoding

AV1 is more complex to configure than previous generations of codecs and many technicians and engineers have spent years developing expertise with H.264, so there may be some reluctance or lack of time to fully dive into the details of a new codec configuration. You can overcome that obstacle by taking advantage of a content-aware encoding service, like Bitmovin’s Per-Title Encoding. Each file is automatically analyzed for complexity and the ideal adaptive bit-rate encoding ladder is generated for each piece of content, with no advanced knowledge or configuration of AV1 required. This not only simplifies the process, it will save you on storage costs by eliminating unnecessary renditions from your adaptive bitrate ladder and ensure you’re making the most efficient use of data on the delivery and playback side.

5. Deploy with most popular content for early ROI 

One thing to keep in mind for AV1 deployment is that you don’t need to take an all-or-nothing approach. Some of the earliest adopters like YouTube and Netflix initially only encoded their most popular content with AV1, since that is where the delivery costs were highest and they could maximize their returns on the initial encoding investment. 

In this study released by Netflix, analysts found that 21% of content streamed in one month in early 2022 benefited from the most recent improvements in codec efficiency (Per-Title HEVC and AV1). Without those improvements, they estimated that total Netflix traffic globally would have been around 24% higher. That’s a pretty solid proof point that using Per-Title AV1 with even a portion of your most popular content can make a big difference for overall data usage and cost. As of October 2023, Netflix reported that over 30% their catalog has now been encoded with AV1, with more being backfilled daily, and AV1 encoding is enabled for all new videos ingested to their platform. That shows they’ve now seen the value and potential benefits of AV1 make it worth adopting even beyond the most viewed content.

Conclusion

In a crowded marketplace where viewers have many options, taking advantage of newer codecs can help streaming services stand out with a better quality of experience for their viewers, while saving themselves money in the background. Which codecs provide the most benefit will depend on each service provider’s goals, business model and target devices, but it’s clear that evolving beyond H.264 alone is necessary to provide best-in-class streaming experiences. In addition to better quality, adding newer codecs like AV1 can help relieve the financial burden of higher egress and CDN costs that come with increased popularity. Making an investment in upgrading codecs now will pay dividends for years to come.

Related Material

For more information about video encoding in general, our comprehensive streaming technology guide goes into greater detail about codecs, compression, and available encoding products and services. 

Check out our AV1 hub and data sheet for more information on its development, benchmarking and playback support. 

This Bitmovin community post explains how to configure multi-codec playback on the web.

Our github repo has code examples for implementing multi-codec streaming.

Have questions about getting started with AV1 encoding? Let us know here or get in touch.