This article offers a comparison between the performance and quality of the Beamr 5 HEVC software encoder, and the open-source x265 software encoder.
There should be no debate over which standard will be the next generation winner with Apple’s adoption of HEVC (H.265). As the leading HEVC commercial software encoder implementer, we see video distributors who were waiting on the sideline prior to Apple’s announcement jumping into evaluations now that Apple has released the public versions of iOS 11 and macOS High Sierra.
The criteria for determining the best HEVC implementation will vary across application and service type and the business model of the video service will influence the decision of which solution to use. Yet, there is one factor that should be at the top of the decision tree for software based video encoders, and that is the performance (speed) of the encoder.
If you operate the encoding function for a live streaming service, then the performance and speed of your encoder is already top of mind, and the benefits of a solution which is 2 times faster is understood. But for those who operate SVOD and VOD services, the need to measure performance may not be as obvious. Read on to discover the benefits of operating a software encoder that is 2x faster.
Why a speed “face off”?
There is an inherent tradeoff between speed and quality with video encoder’s. With unlimited computing resources, one simply needs to apply the appropriate CPU power to meet the quality objective being targeted. In the case that an encoder is slow and inefficient, provided it can deliver the desirable quality, one can always reach the quality target if sufficient computing power is available. But, in the real world, there are constraints that cannot be ignored- whether budget, power, or space in the rack, few services have the luxury of operating as if they have unlimited computing resources. Which is why CPU performance is as critical an evaluation vector as absolute quality.
With Beamr 5 you will experience the following operational benefits as a result of the encoding operation being up to two times faster than x265 (based on the settings applied).
- Up to half the server resources compared with x265
- 50% of the power utility draw compared with x265
- 50% less cooling and connectivity cost
- Half the rack space
Evaluating software video encoders.
First, let’s examine the correlation between speed and quality by taking a look at the world’s best HEVC software video encoder, Beamr 5, as compared to the free open source alternative, x265.
The complexity of video encoder evaluations is such that you must understand not only what video files were used for the input, but also the precise settings (configuration) used. For this speed and quality evaluation you will note that x265 offers ten (10) performance presets that do a reasonable job of balancing the encoder’s speed and efficiency. Beamr 5 has a similar parameter named ‘enc_speed’ where there are a total of sixteen (16) levels available.
Out of the box Beamr 5 offers more granularity in its speed selection than x265, allowing for easier and more precise tuning across a wider range of computing platforms and architectures. However, to ensure an “apples to apples” comparison, other than matching the speed preset of each encoder, all other default parameters were left unchanged.
We want you to experience Beamr 5’s speed and quality first hand which is why we’ve provided the x265 settings that were used for each test. Readers are encouraged to duplicate the same tests, and we have provided download links for all files so that you can run your own independent analysis. Don’t believe our results? You can check them yourself.
As a commercial vendor working with the largest OTT and broadcast customers in the world, we design our products to be maximally usable by any video encoding engineer operating a video service. For the analysis we used x265 ‘veryslow’, ‘medium’, and ‘ultrafast’ settings since this test was designed to mirror real world use cases and not theoretical targets of either extreme speed or quality.
At Beamr we are all about the numbers, but as all video encoding engineers say, the eyes never lie. After you review the data in the charts below, please download the corresponding files so you can see for yourself Beamr 5’s superior quality.
We start with comparing the highest video quality modes of both encoders, akin to what an SVOD service may use, and move to slightly reduced video quality, but with faster performance needed for real-time (live) applications. Here we can demonstrate that Beamr 5 ‘enc_speed 0’ is much faster than the ‘veryslow’ x265 preset, while at the same time Beamr 5 produces better overall video quality.
The original source files can be downloaded from https://media.xiph.org/video/derf/, and converted from .y4m to yuv using the following FFmpeg command:
$./ffmpeg.exe -i Netflix_BarScene_4096x2160_60fps_10bit_420.y4m -f rawvideo -pix_fmt yuv420p Netflix_BarScene_4096x2160_60fps_8bit_420.yuv
All Beamr 5 and x265 encoded files may be download from the links in the following tables or by click here. (all files were encoded in 4K resolution)
To aid in your subjective visual evaluation we suggest that you use a video comparison tool that is capable of rendering two videos in sync on the same screen. If you do not have a copy of Beamr View (formerly VCT), you may request a copy here. Beamr provides a limited license to our PC and Mac HEVC and H.264 software viewing tool FREE of charge to qualified video distribution services, content owners, and video platforms.
Test machine spec used for all clips: Amazon EC2 c3.4xlarge instance, Intel Xeon E5-2680 v2 @ 2.8GHz (16 threads), 30GB RAM, 160GB SSD.
Encoder versions: x265 version 2.5 release candidate 7/13/2017, Beamr 5 version 4.0
Highest Quality VOD Settings Comparison.
The following chart provides a comparison of CPU performance at the maximum encoding quality with x265 configured at the ‘veryslow’ setting and Beamr 5 working at speed 0. The following chart shows the ability of Beamr 5 to produce higher video quality with much greater speed than x265. All other configuration settings were unchanged, except those required to align both codecs in keyframe interval, rate control limitations, and appropriate multithreading settings.
Table 1: Highest Quality (VOD) Configuration.
These are the settings used to test the highest quality presets (Beamr 5 enc_speed 0, x265 preset ‘veryslow’)
Command line example for x265 Highest Quality VOD setting:
$./x265 – –input BarScene.yuv – –input-res 4096×2160 – –frames 1200 – –fps 60 – –preset veryslow – –keyint 90 – –pools 16 – –bitrate 7000 – –vbv-maxrate 14000 – –vbv-bufsize 112000 – –hrd –o x.265
Table 2: Comparing highest quality (VOD) settings – Beamr 5 vs. x265.
Screen capture 1: Highest quality (VOD) settings Beamr 5 vs. x265.
4K resolution video ‘Aerial’ frame 228, left side is Beamr 5, right side is x265. Beamr 5 is 83% faster than x265 with slightly better quality.
Screen capture 2: Highest quality (VOD) settings Beamr 5 vs. x265.
4K resolution video ‘Ritual Dance’ frame 166, left side is Beamr 5, right side is x265. Beamr 5 is 71% faster than x265 with noticeably better quality.
Screen capture 3: Highest quality (VOD) settings Beamr 5 vs. x265.
4K resolution video ‘Driving POV’ frame 234, left side is Beamr 5, right side is x265. Beamr 5 is almost twice as fast as x265 at 98% with demonstrably better video quality.
Comparing High Quality Settings.
With x265 set to the ‘medium’ preset and Beamr 5 ‘enc_speed’ set to 3, we observed that Beamr 5 maintained a 15% to 50% speed advantage over x265 while Beamr 5 consistently produced better quality. As with all other tests, configuration settings were unchanged, except those required to align both codecs in keyframe interval, rate control limitations, and appropriate multithreading settings.
Table 3: High Quality Preset Configuration.
Command line example for x265 High Quality setting:
$./x265 – –input BarScene.yuv – –input-res 4096×2160 – –frames 1200 – –fps 60 – –preset medium – –keyint 90 – –pools 16 – –bitrate 7000 – –vbv-maxrate 14000 – –vbv-bufsize 112000 –hrd –o x.265
Table 4: High Quality Preset Performance Beamr 5 vs. x265.
Screen capture 4: High quality settings Beamr 5 vs. x265.
4K resolution video ‘Wind and Nature’ frame 518, left side is Beamr 5, right side is x265. Beamr 5 is 50% faster with a slight edge on video quality over x265.
Screen capture 5: High quality settings Beamr 5 vs. x265.
4K resolution video ‘Ritual Dance’ frame 565, left side is Beamr 5, right side is x265. Beamr 5 is 50% faster than x265 and Beamr 5 has a definite edge on video quality.
Screen capture 6: High quality settings Beamr 5 vs. x265.
4K resolution video ‘Pier Seaside’ frame 18, left side is Beamr 5, right side is x265. Beamr 5 is 43% faster than x265 and Beamr 5 has noticeably better video quality.
Comparing Live Settings.
Let’s examine how x265 and Beamr 5 fair when used for live encoding of 4K resolution video. When we set Beamr 5 to an equal speed configuration of x265 ‘ultrafast’, Beamr 5 was found to be faster while producing the same or better video quality.
Table 5: Live Preset Configuration.
Command line example for x265 live (real-time) configuration:
$./x265 – –input BarScene.yuv – –input-res 4096×2160 – –frames 1200 –fps 60 – –preset ultrafast – –keyint 90 – –pools 16 – –bitrate 7000 – –vbv-maxrate 14000 – –vbv-bufsize 112000 –hrd –o x.265
Table 6: Live configuration performance of Beamr 5 vs. x265.
Screen capture 7: Live settings Beamr 5 vs. x265.
4K resolution video ‘Bar Scene’ frame 595, left side is Beamr 5, right side is x265. Beamr 5 is 15% faster and produced better video quality than x265.
Screen capture 8: Live settings Beamr 5 vs. x265.
4K resolution video ‘Dinner Scene’ frame 528, left side is Beamr 5, right side is x265. Beamr 5 is 15% faster than x265, while both exhibited comparable quality.
Screen capture 9: Live settings Beamr 5 vs. x265.
4K resolution video ‘Tango’ frame 274, left side is Beamr 5, right side is x265. Beamr 5 is 11% faster with comparable quality, than x265.
Summary of Beamr 5’s technical advantages.
- Beamr has 30 granted and 23 pending patents, including a fast motion estimation process which is useful when speed and quality are at competing priority. Beamr 5’s fast motion estimation process is a significant factor in our performance advantage.
- Beamr 5 uses a heuristic early-termination process which enables it to reach a targeted quality using less computational resources.
- Beamr 5 allows for more possibile frame hierarchies (levels) than what is provided by the H.265 standard. When encoding hierarchical B-frames, x265 uses a 2-level B-frame hierarchy. Beamr 5 on the other hand, encodes with a 3-level B-frame hierarchy when encoding seven B frames between P-frames.
- x265 begins encoding frames before all reference frames are finished, which limits motion estimation to only the parts of reference frames that are available. When high performance (speed) is needed, x265 encoding quality can be degraded. This provides a serious advantage to Beamr 5 which supports full codec multithreading while x265 uses slices and tiles for parallelism (when WPP is disabled for maximum efficiency).
- Beamr 5 achieves better parallelism without the limitations noted above because it is based on utilizing all possible independent encoding tasks inside a single frame. This is called wave-front and it is active even when entropy wave-front is not used. Multithreading in de-blocking and SAO filtering provides additional quality benefits.
Evaluating an encoder is one of the most important jobs for a video encoding engineer and we are proud of the advanced HEVC codec implementation we’ve developed. All information presented may be tested and verified and we invite you to take advantage of the video files using Beamr View to subjectively analyze the results above.
For those interested in Intel specific support, you will want to stay tuned for important speed breakthroughs that we will be showing soon. Get a preview of what was announced at IBC 2017 – Beamr 5 running on the new Intel Xeon Scalable Platinum Processor. Six live 4Kp60 10-bit HDR streams on a dual socket 8180 board.
For more information simply send an email to firstname.lastname@example.org and a member of our technical sales team will reach out.