x264 x265 Beamr 4 Beamr 5 performance test results

It has been two years since we published a comparison of the two leading HEVC software encoder SDKs; Beamr 5, and x265. In this article you will learn how Beamr’s AVC and HEVC software codec SDKs have widened the computing performance gap further over x264 and x265 for live broadcast quality streaming.

Why Performance Matters

With the performance of our AVC (Beamr 4) and HEVC (Beamr 5) software encoders improving several orders of magnitude over the 2017 results, it felt like the right time to refresh our benchmarks, this time with real-time operational data.

It’s no secret that x264 and x265 have benefited greatly, as open-source projects, from having thousands of developers working on the code. This is what makes x264 and x265 a very high bar to beat. Yet even with so many bright and talented engineers donating tens of thousands of development hours to the code base, the architectural constraints of how these encoders were built limit the performance on multicore processors as you will see in the data below.

Creative solutions have been developed which enable live encoding workflows to be built using open-source. But it’s no secret that they come with inherent flaws that include being overly compute intensive and encumbered with quality issues as a result of not being able to encode a full ABR stack, or even a single 4K profile, on a single machine.

The reason this matters is because the resolutions that video services deliver continues to increase. And as a result of exploding consumer demand for video, data consumption is consuming network bandwidth to the point that Cisco reports in 2022, 82% of Internet traffic will be video.

Cisco says in their Visual Networking Index that by 2022 SD resolution video will comprise just 23.4% of Internet video traffic, compared to the 60.2% of Internet video traffic that SD video consumed in 2017. What use to represent the middle-quality tier, 480p (SD), has now become the lowest rung of the ABR ladder for many video distributors.

1080p (HD) will makeup 56.2% of Internet video traffic by 2022, an increase from 36.1% in 2017. And if you thought the resolution expansion was going to end with HD, Cisco is claiming in 2022, 4K (UHD) will comprise 20.3% of all Internet-delivered video. 

Live video services are projected to expand 15x between 2017 and 2022, meaning within the next three years, 17.1% of all Internet video traffic will be comprised of live streams.

These trends demonstrate the industry’s need to prepare for this shift to higher resolution video and real-time delivery with software encoding solutions that can meet the requirement for live broadcast quality 4K.

Blazing Software Performance on Multicore Processors

The Beamr 5 software encoder utilizes an advanced thread management architecture. This represents a key aspect of how we can achieve such fantastic speed over x265 at the same quality level.

x265 works by creating software threads and adding them to a thread pool where each task must wait its turn. In contrast, Beamr 5 tracks all the serial dependencies involved with the video coding tasks it must perform, and it creates small micro-tasks which are efficiently distributed across all of the CPU cores in the system. This allows the Beamr codec to utilize each available core at almost 100% capacity. 

All tasks added to the Beamr codec thread pool may be executed immediately so that no hardware thread is wasted on tasks where the data is not yet available. Interestingly, under certain conditions, x265 can appear to have higher CPU utilization. But, this utilization includes software threads which are not doing any useful work. This means they are “active” but not processing data that is required for the encoding process.

Adding to Beamr encoders thread efficiency, we have implemented patented algorithms for more effective and efficient video encoding, including a fast motion estimation process and a heuristic early-termination algorithm which enables the encoder to reach a targeted quality using fewer compute resources (cycles). Furthermore, Beamr encoders utilize the latest AVX-512 SIMD instruction set for squeezing even more performance out of advanced CPUs.

The end result of the numerous optimizations found in the Beamr 4 (AVC) and Beamr 5 (HEVC) software encoders is that they are able to operate nearly twice as fast as x264 and x265 at the same quality, and with similar settings and tools utilization. 

Video streaming services can benefit from this performance advantage in many ways, such as higher density (more channels per server) which reduces operational costs. To illustrate what this performance advantage can do for you- consider that at the top-end, Beamr 5 is able to encode 4K, 10-bit video at 60 FPS in real-time using just 9 Intel Xeon Scalable cores where x265 is unable to achieve this level of performance with any number of computing cores (at least on a single machine). And, as a result of being twice as efficient, Beamr 4 and Beamr 5 can deliver higher quality at the same computing envelope as x264 and x265.


The Test Results

For our test to be as real-world as possible, we devised two methodologies. In the first, we measured the compute performance of an HEVC ABR stack operating both Beamr 5 and x265 at live speed. And for the second test, our team measured the number of simultaneous live streams at 1080p, comparing Beamr 4 with x264, and Beamr 5 with x265; and for 4K comparing Beamr 5 with x265. All tests were run on a single machine.

Live HEVC ABR Stack: Number of ABR Profiles (Channels)

This test was designed to find the maximum number of full ABR channels which can be encoded live by Beamr 5 and x265 on an AWS EC2 c5.24xlarge instance.

Each AVC channel comprises 4 layers of 8-bit 60 FPS video starting from 1080p, and the HEVC channel comprises either 4 layers of 10-bit 60 FPS video (starting from 1080p), or 5 layers of 10-bit 60 FPS video (starting from 4K).

Live HEVC ABR Stack Test – CONFIGURATION

  • Platform: 
    • AWS EC2 c5.24xlarge instance
    • Intel Xeon Scaleable Cascade Lake @ 3.6 GHz
    • 48 cores, 96 threads
  • Presets: 
    • Beamr 5: INSANELY_FAST
    • x265: ultrafast
  • Content: Netflix 10-bit 4Kp60 sample clips (DinnerScene and PierSeaside)
  • Encoded Frame Rate (all layers): 60 FPS
  • Encoded Bit Depth (all layers): 10-bit
  • Encoded Resolutions and Bitrates: 
    • 4Kp60@18000 Kbps (only in 4K ABR stack)
    • 1080p60@3750 Kbps
    • 720p60@2500 Kbps
    • 576p60@1250 Kbps
    • 360p@625 Kbps

Live HEVC ABR Stack Test – RESULTS

HEVC Live Stacks Beamr 5 vs x265

NOTES:

(1) When encoding 2 full ABR stacks with Beamr 5, 25% of the CPU is unused and available for other tasks.

(2) x265 cannot encode even a single 4K ABR stack channel at 60 FPS. The maximum FPS for the 4K layer of a single 4K ABR stack channel using x265 is 35 FPS.


Live AVC & HEVC Single-Resolution: Number of Channels (1080p & 4K)

In this test, we are trying to discover the maximum number of single-resolution 4K and HD channels that can be encoded live by Beamr 4 and Beamr 5 as compared with x264 and x265, on a c5.24xlarge instance. As with the Live ABR Channels test, the quality between the two encoders as measured by PSNR, SSIM and VMAF was always found to be equal, and in some cases better with Beamr 4 and Beamr 5 (see the “Quality Results” section below).

Live AVC Beamr 4 vs. x264 Channels Test – CONFIGURATION

  • Platform: 
    • AWS EC2 c5.24xlarge instance
    • Intel Xeon Scaleable Cascade Lake @ 3.6 GHz
    • 48 cores, 96 threads
  • Speeds / Presets: 
    • Beamr 4: speed 3
    • x264: preset medium
  • Content: Netflix 10-bit 4Kp60 sample clips (DinnerScene and PierSeaside)
  • Encoded Frame Rate (all channels): 60 FPS
  • Encoded Bit Depth (all channels): 8-bit
  • Channel Resolutions and Bitrates: 
    • 1080p60@5000 Kbps

Live AVC Beamr 4 vs. x264 Channels Test – RESULTS

Live HEVC Beamr 5 vs. x265 Channels Test – CONFIGURATION

  • Platform: 
    • AWS EC2 c5.24xlarge instance
    • Intel Xeon Scaleable Cascade Lake @ 3.6 GHz
    • 48 cores, 96 threads
  • Speeds / Presets: 
    • Beamr 5: INSANELY_FAST
    • x265: ultrafast
  • Content: Netflix 10-bit 4Kp60 sample clips (DinnerScene and PierSeaside)
  • Encoded Frame Rate (all channels): 60 FPS
  • Encoded Bit Depth (all channels): 10-bit
  • Channel Resolutions and Bitrates: 
    • 4K@18000 Kbps
    • 1080p60@3750 Kbps

Live HEVC Beamr 5 vs. x265 Channels Test – RESULTS

NOTES:

(1) x265 was unable to reach 60 FPS for a single 4K channel, achieving just 35 FPS at comparable quality.


Quality Comparisons (PSNR, SSIM, VMAF)

Beamr 5 vs. x265

NOTES:

As previously referenced, x265 was unable to reach 4Kp60 and thus PSNR, SSIM, and VMAF scores could not be calculated, hence the ‘N/A’ designation in the 3840×2160 cells.

Beamr 4 vs. x264


Source Clip Downloads

All source clips used in this comparison are publicly available at  https://media.xiph.org/video/derf.


Conclusion

Video engineers are universally focused on the video encoding pillars of computing efficiency (performance), bitrate efficiency, and quality. Even as technology has enabled each of these pillars to advance with new tool sets, it’s well known that there is still a tradeoff between each that is required.

On one hand, bitrate efficiency requires tools that sap performance, and on the other hand, to reach a performance (speed) target, tools which could positively affect quality cannot be used without harming the performance characteristics of the encoding pipeline. As a result, many video encoding practitioners have adapted to the reality of these tradeoffs and simply accept them for what they are. Now, there is a solution…

The impact of adopting Beamr 4 for AVC and Beamr 5 for HEVC transcends a TCO calculation. With Beamr’s high-performance software encoders, services can achieve bitrate efficiency and performance, all without sacrificing video quality. 

The use of Beamr 4 and Beamr 5 opens up improved UX with an increase in resolution or frame-rate which means it is now possible for everyone to stream higher quality video. As the competitive landscape for video delivery services continues to evolve, never has the need been greater for an AVC and HEVC codec implementation that can deliver the best of all three pillars: performance, bitrate efficiency, and quality. With the performance data presented above, it should be clear that Beamr 4 and Beamr 5 continue to be the codec implementations to beat.



Share