How Video Encoder Computing Efficiency Can Impact Streaming Service Quality
Until public clouds and ubiquitous computing turned software-based video operations mainstream, the process of video encoding was performed with purpose-built hardware.
And then, software ate the hardware...
Marc Andreessen, the co-founder of Netscape and a16z the famed venture capital firm with investments in Foursquare, Skype, Twitter, box, Lyft, Airbnb, and other equally disruptive companies, penned an article for the Wall Street Journal in 2011 titled "Why Software Is Eating The World." A version of this post can be found on the a16z.com website here.
"Six decades into the computer revolution, four decades since the invention of the microprocessor, and two decades into the rise of the modern Internet, all of the technology required to transform industries through software finally works and can be widely delivered at global scale." Marc Andreessen
In following with Marc Andreessen's prophecy, today, software-based video encoders have almost entirely subsumed video encoding hardware. With software applications freed from purpose-built hardware and able to run on ubiquitous computing platforms like Intel and AMD based x86 machines, in the data-center and virtual environments, it is completely accurate to say that "software is eating (or more appropriately, has eaten) the world."
But what does this mean for a technology or video operations executive?
Computer software is the bedrock of every function and department in the enterprise; accordingly, software video encoding is essential to video streaming service operations. Software video encoders can scale without requiring a linear increase in physical space and utilities, unlike hardware. And software can be moved around the network and even entire data-centers in near real-time to meet capacity overruns or temporary surges. Software is much more flexible than hardware.
When dealing with software-based video encoding, the three pillars that every video encoding engineer must address are bitrate efficiency, quality preservation, and computing performance.
It's possible to optimize a video codec implementation and video encoder for two but rarely three of the pillars. Most video encoding operations thus focus on quality and bitrate performance, leaving the compute efficiency vector open as a sort of wild card. But as you will see, this is no longer a competitive approach.
The next frontier is software computing performance.
Bitrate efficiency with high video quality requires resource-intensive tools, which will lead to slow operational speed or a significant increase in CPU overhead. For a live encoding application where the encoder must operate at high speed to reach 60 frames-per-second (FPS), a compromise in bitrate efficiency or absolute quality is often required.
Codec complexity, such as that required by HEVC, AV1, and the forthcoming VVC, is outpacing bitrate efficiency advancements and this has created the need for video encoder performance optimization. Put another way, speed matters. Traditionally, this is not an area that video encoding practitioners and image scientists have needed to be concerned with, but that is no longer the case.
Figure 1 illustrates the advantages of a software encoding implementation, which, when all attributes are normalized, such as FPS and objective quality metrics, can do twice as much work on the exact same AWS EC2 C5.18xlarge instance.
In this example, the open-source encoders x264 and x265 are compared to Beamr's AVC and HEVC encoders, Beamr 4, and Beamr 5.
For services needing to encode live 4Kp60, one can see that it is possible with Beamr 5 but not with x265. Beamr 5 set to the x264 equivalent 'ultrafast' mode can encode four individual streams on a single AWS EC2 C5.18xlarge instance while x265 operating in 'ultrafast' cannot reach 60 FPS at 4K. As you can see in this poignant example, codec performance is directly related to the quality of service as a result of fewer machines and less complicated encoding frameworks required.
For those services who are mostly concerned with VOD and H.264, the right half of the Figure 1 graphic shows the performance advantage of a performance optimized codec implementation that is set up to produce very high quality with a high bitrate efficiency. Here one can see up to a 2x advantage with Beamr 4 compared to x264.
Video encoding compute resources cost real money.
OPEX is considered carefully by every video distributor. But suppose entertainment experiences like live 4K streaming cannot be delivered reliably as a result of a mismatch between the video operations capability and the expectation of the consumer. Remembering that many mobile devices sold today are capable of 1440p if not 4K display. And consumers are wanting content that matches the resolution and quality of the devices they carry in their pockets.
Because of performance limitations with how the open-source encoder x265 utilizes compute cores, it is not possible to encode a live 4Kp60 video stream on a single machine. This doesn't mean that live 4K encoding in software isn't possible. But it does say that to deliver the quality of video experience consumers expect, video distributors will need to evaluate commercial solutions that have been performance optimized for high core counts and multi-threaded processors such as those available from AMD and Intel.
The need for software to be optimized for higher core counts was recently highlighted by AMD CTO Mark Papermaster in an interview with Tom's Hardware.
Video distributors wanting to use software for the flexibility and virtualization options they provide will encounter overly complicated engineering hurdles unless they select encoding engines where multi-processor scaling is native to the architecture of the software encoder.
Here is an article that shows the speed advantage of Beamr 5 over x265.
Things to think about concerning computing efficiency and performance:
- Don't chase the next more advanced codec without considering first the complexity/efficiency quotient. Dave Ronca, who led the encoding team at Netflix for ten years and recently left to join Facebook in a similar capacity, recently published an excellent article on the subject of codec complexity titled, "Encoder Complexity Hits the Wall." Though it's tempting to think this is only an issue for video streamers with tens or hundreds of millions of subscribers, the same trade-off considerations must be considered regardless of the size of your operations. A 30% bitrate savings for a 1 Mbps 480p H.264 profile will return a 300 Kbps bandwidth savings. While a 30% savings at 1080p (H.264), which is encoded at 3.5 Mbps, will give more than triple the return, at a 1 Mbps savings. The point is, we must carefully and methodically consider where we are spending our compute resources to get the maximum ROI possible.
- A commercial software solution will be built by a dedicated codec engineering team that can balance the requirements of bitrate efficiency, quality, and compute performance. This is in stark contrast to open-source projects where contributors have separate and individual priorities and agendas. Exactly why the architecture of x264 and x265 cannot scale. It was built to achieve a different set of tradeoffs.
- Insist internal teams and consultants conduct compute performance benchmarking on all software encoding solutions under consideration. The three vectors to measure are absolute speed (FPS), individual stream density when FPS is held constant, and the total number of channels that can be created on a single server using a nominal ABR stack such as 4K, 1080p, 720p, 480p, and 360p. All encoders must produce comparable video quality throughout all tests.
The next time your technical team plans a video encoder shoot out, make sure to ask what their test plan is for benchmarking the compute efficiency (performance) of each solution. With so much upheaval in the distribution model and go-to-market business plans for streaming entertainment video services, it may be tempting to push down the priority stack selection of new, more efficient software video encoders. However, forfeiting this work could have a genuine impact on a service's competitiveness and ability to scale to meet future entertainment service requirements. With software eating the video encoding function, compute performance is now the oxygen needed to thrive and win against an increasingly competitive and crowded direct-to-consumer (D2C) marketplace.
You can try out Beamr's software video encoders today and get up to 100 hours of free HEVC and H.264 video transcoding every month. CLICK HERE
Author:
Mark Donnigan is Vice President of Marketing for Beamr, a high-performance video encoding technology company.
This article was originally published in the Fall 2019 OTT Executive Magazine and has been revised from the original published version.
Computer Science Senior Instructor at Florida Polytechnic University
5 年Mark, Is Beamr a software as a service offering or code that runs on java or some other framework. I found it difficult to discern from the website.?