Technology Blog: MainConcept

The True Cost of Open Source Codecs

Written by Geoff Gordon | Nov 19, 2020

Are open source codecs actually “free?"

When a multimedia developer maps out a new video workflow – the path their content takes from ingest, to distribution, to playback – they typically arrive at a decision point. Which compression technology should I use? What are the advantages and disadvantages, and if open source codecs are “no-cost” then why would I pay for others?

Have You Heard? Codecs Are Not Generic

The idea that codecs are generic is relatively common, based on the misconception that codecs are a commodity and there’s not much difference between them. Recently this notion was disputed in a codec comparison study conducted by Moscow State University, comparing H.265 from a number of providers, including the open source codec x265. Jan Ozer, acclaimed researcher and analyst summed this conclusion up nicely in his article titled, Codecs are not Generic. We think he says it best!

Jan Ozer: “When we discuss codecs we tend to speak in generalities like ‘HEVC is 40% more efficient than H.264,’ or that ‘AV1 delivers the same quality as HEVC at 70% the data rate.’ The problem with this approach is that it’s too imprecise. A great example of this is shown in Figure 1, a figure from the Moscow State University Codec Comparison 2019 Part III: 4K Content, Objective Evaluation.”

Source: MSU Codec Comparison Study

Jan Ozer: “In the chart, MSU compares all codecs using x264 as the benchmark at 100% of performance. The first HEVC codec, Intel’s SVT-HEVC, delivers the same quality as x264 at 93% the bitrate, while the best performing codec, MainConcept HEVC, delivers the same quality at 64% the bitrate. Both are HEVC, but depending upon how you do the math, MainConcept is about 31% more efficient than SVT-HEVC.”

Until recently, the notion of codecs being a commodity was also held by Endeavor Streaming, a large OTT streaming provider powering services such as WWE Network® and UFC Fight Pass®. The streaming company built their platform on x264, an open-source codec based on the H.264 compression standard.

When challenged, they realized the limitations of open source might be far greater than they originally thought.

“We had no problem with using open source in principle, but it quickly became a matter of dollars and cents,” said David Salmon, CTO of Endeavor Streaming. “We wanted to know if there was a better option.”

Endeavor Streaming had a few reasons to choose open source, as well as use the H.264 standard. First, their platform centered on adaptive bitrate streaming, or ABR, to ensure that users of any device can easily stream content despite differences in screen size and bandwidth. The H.264 standard is perhaps the most ubiquitous across devices, ensuring that content will be consumable by users across the globe.

The next reason was cost. When looking at providers of the H.264 standard, it seemed an obvious decision to use a “no-cost” codec rather than pay for a technology such as MainConcept®. As their platform grew, however, they quickly realized that open source has limitations.

Black Box Codecs are Just That – Rigid and Inflexible

Therein lies an often-unconsidered downside to open source – your ability to tune and optimize your workflow is limited. No two environments are alike, so neither should be the video compression technology they’re built upon. MainConcept is an example of an exceedingly flexible technology by nature. Customers such as Adobe, Autodesk, and Wowza are able to customize their MainConcept environments to achieve optimal results. Wowza was even able to tune the codec to achieve less than one frame worth of latency! In a situation where in-depth customization is necessary, open source often falls flat.

 

 

In the case of Endeavor Streaming, their biggest problem was the inefficiency of 2-pass encoding. There was no way to achieve the quality and bitrate targets set for MPEG-DASH and Apple HLS without running a second pass, and no way to customize x264 to break past this barrier.

“We realized that lengthy encoding times were costing us money,” said Salmon. “X264 required two-pass encoding to meet our quality and bitrate targets, and the additional pass was expensive.”

Where to Turn? Support Can Be Unreliable

When using open source codecs, you often forgo the ability to raise customer support claims and get the benefit of an expert professional services team. Instead, you rely on the wider community and advice from others online. Although advice from peers is a powerful tool, forum users will not be invested in your success the way a professional services team would be, and they hold none of the accountability. If you’re making a business-critical change, who would you rather rely on for help?

There is the option to work with third-party open-source vendors who offer maintenance, bug fixes, and other means of support. In this case, you get the benefit of a support team, but costs have the potential to spiral over time, especially if large amounts of customization are required. It can thus be difficult to accurately plan for future costs at the time of implementation.

Getting integration support directly from the codec vendor gives you more options to tune and customize, better up-front cost expectations, and often results in faster support response times.

Bitrate Precision Counts

A commonly raised problem with open source is the inability to meet target quality and bitrate settings in one encoder pass. This metric is often referred to as “bitrate adherence” and it’s a critical measure of efficiency. There’s a direct correlation between encoding time and server cost, so boosting performance means decreasing cost.

Back to the example of Endeavor Streaming⏤only when they ran a comparison against x264 did they realize the time and cost savings they’d left behind when choosing open source. Using a more flexible codec, specifically MainConcept AVC/H.264, they were able to optimize and overcome limitations. MainConcept has industry-leading bitrate adherence, meeting bitrate and quality targets with only a +/- 2% variation. This precision allowed Endeavor Streaming to run only single-pass encoding, boosting performance by over 2X.

“Frankly, we were shocked by the results, we didn’t expect to see such a dramatic improvement in performance,” said Salmon. “Not only does this make our platform faster, but the cost savings are significant⏤over 50%.”

Breaking Away From the “Commodity” Mindset

It’s important to consider the future needs of your video workflow and compression technology, and to not box yourself in early on. Although open source may save you costs up-front, the ability to pivot and turn at a later date can be worth far more. After all, it was the genius Stephen Hawking who once said, “intelligence is the ability to adapt to change.”

If you want to know what performance you might be missing, we suggest taking a free 2-hour consultation with the MainConcept Professional Services team. Or you can try any MainConcept codec for free. You have nothing to lose, and everything to gain.