The goal of this article is to offer the reader 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 now jumping quickly into evaluations with the fast approaching release by Apple of the public version of iOS 11 and macOS High Sierra.
The criteria for determining the best HEVC implementation will vary across application and service type. Even the business model can 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 of the encoder. If you operate the encoding function for a live streaming service, then the performance of an encoder is already at the front of your thinking, and the benefits of a solution which is 2x faster understood. But for those who operate SVOD and VOD services, the need to carefully measure performance may not be obvious. CPU performance should be considered in an evaluation because it is directly correlated to the operational cost of an encoding workflow.
Why a speed “face off”?
There is an inherent tradeoff between speed and quality in video encoder’s. If we have unlimited computing resources, one simply needs to apply the appropriate CPU power to meet the performance objectives of the workflow. And even 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 to them. But, in the real world, there are constraints that cannot be ignored, whether they are budget, power, or space in the rack, no one should plan as if they have unlimited computing resources available. 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 encoders operations 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. To ensure an “apples to apples” comparison all other default parameters for each codec were left unchanged.
Since we wanted you to experience our speed and quality claims first hand so you can personally interpret and verify the results, we’ve provided the x265 settings 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.
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. 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.
At Beamr we are all about the numbers, but as all video encoding engineer 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. (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 highly useful when speed and quality are at competing priority.
- 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. For example, 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 starts encoding frames before all reference frames are finished, which limits motion estimation to only the parts of reference frames that are available. For this reason, when high performance 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 that 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.
For more information simply send an email to email@example.com and a member of our technical sales team will reach out.