BoxCast Team • October 25, 2018
Live video streaming is often best accomplished by way of a hardware encoder (see our post about why that is). The encoder is a physical device that connects to a video source and converts the audio and video signals into something that can be streamed to a media server. While many hardware encoders share similar features, chipsets, and form-factors, they're not all made the same and can produce different results given otherwise similar conditions.
In this article, we'll look at three popular hardware encoders used by professional organizations. We'll compare the hardware itself, then look at how easy it is to configure a stream, then compare the encoded video quality, and finally investigate how the encoders perform under various network conditions.
The VidiU series of encoders are based on the GEO Semiconductor MG3500 processor, which includes a 240MHz ARM9™ CPU, plus dedicated video processing subsystems and a hardware h.264 codec engine. It also utilizes an Analog Devices ADV7611 for its HDMI input and an Ralink RT5572N wireless chipset.
The DMB-8800A Premium is based on the Hisilicon Hi3516RFC V100 processor, which includes an ARM Cortex A9 CPU, plus dedicated video processing subsystems and a hardware h.264 codec engine. It also utilizes an ITE IT6604E for its HDMI input and a TI TVP5150AM1 for analog video input.
The BoxCaster is based on the TI DM368 processor, which includes a 432MHz ARM9™ CPU, plus dedicated video processing subsystems and a hardware h.264 codec engine. It also utilizes an Analog Devices ADV7842 for its HDMI and composite video inputs and a Realtek RTL8192 wireless chipset.
Encoder |
CPU |
Codec |
Video In |
Networking |
Teradek VidiU |
240MHz ARM9 |
Hardware h.264 |
ADV7611 |
RT5572N wireless |
Digicast DMB-8800A Premium |
ARM Cortex A9 |
Hardware h.264 |
IT6604E / TVP5150AM1 |
|
BoxCaster |
432MHz ARM9 |
Hardware h.264 |
ADV7842 |
RTL8192 wireless |
Select a tab to review the setup instructions for each of the encoders being compared.
To set up the BoxCaster to stream to BoxCast (2 steps):
To set up the VidiU for use with an RTMP streaming provider (11 steps):
To set up the DMB-8800A Premium for use with an RTMP streaming provider (7 steps):
For testing the quality of the encoded video, we looked at objective metrics using software to compare video frames. Specifically, we analyzed the peak signal-to-noise ratio (PSNR) and structural similarity (SSIM) index, comparing the output of the encoders to the original source.
We also utilized the VMAF tool from Netflix, which translates objective measurements into predicted subjective quality. (Their blog post about VMAF is a fascinating read for anyone interested in measuring video quality.)
The setup of the experiment took a single video source, split it into three outputs, fed one into the VidiU, one into the DMB-8800A Premium, and one into the BoxCaster. The video source we used for the comparison came from "Big Buck Bunny," a Creative Commons licensed video from the Blender Institute, at 720p out of the laptop's HDMI port.
All encoding devices were configured to use approximately the same configuration. The VidiU was configured for HD+ (3300 kbps 720p, high profile); the DMB-8800A Premium was configured for 3300 kbps 720p, high profile; and the BoxCaster’s video bitrate was limited to 3.0 Mbps (the closest manual setting — the BoxCaster is capable of encoding up to 4.8 Mbps). All devices streamed to the BoxCast platform.
We downloaded each stream’s recording and analyzed a 2:29 segment from each, comparing it against the original recording.
A note about technique: since “Big Buck Bunny” is rendered in 24fps, we converted it to a 30fps reference video. In addition, because we are streaming through an entire workflow, aligning output frames to reference frames is non-trivial. In our analysis, we endeavored to trim all output files to the same set of frames as the reference input; however, due to slight differences in encoder sampling rates, the actual number of frames differed slightly (<0.3% in all cases).
Consequently, the objective measurements should not be taken as absolute values, or compared to objective measurements from other comparisons, but should be taken as relative indications of quality – for example, a higher PSNR value for one of our output videos is better than a lower one, but could not be compared to a PSNR value from a comparison of a different video.
First, we compared the PSNR of the clips via ffmpeg (higher is better) [1]:
Next, we compared the SSIM of the clips via ffmpeg (higher is better) [2]:
Finally, we compared the VMAF score of the clips (higher is better) [3]:
At a glance:
Encoder |
PSNR (avg) |
SSIM (all, dB) |
VMAF |
BoxCaster |
25.0851 | 9.4231 | 30.3061 |
VidiU |
18.6132 | 6.2172 | 10.0923 |
DMB-8800A |
14.8533 | 5.3023 | 25.3882 |
Objectively speaking, both PSNR and SSIM indicate that the BoxCaster’s encoded video remains more true to the original content than both the VidiU and the DMB-8800A Premium. Additionally, Netflix’s VMAF score, which postulates subjective quality based on objective metrics combined with a trained data set, also indicates that the BoxCaster’s encoded video will be perceived as higher-quality than both the VidiU and the DMB-8800A Premium as well.
Subjectively speaking, the Vidiu’s primary weakness is in its rate control algorithm. While the BoxCaster uses a modified variable bit rate (VBR) to maintain an overall bitrate while adapting to changing scene complexity, the VidiU adheres to a strict constant bit rate (CBR) without adapting to scene complexity.
This means that scene changes result in encoding artifacts; subsequent frames help resolve detail in the artifacts.
Here is the first frame after a scene change taken from the reference video, the BoxCaster, and the VidiU capture, respectively (the artifacts can be most clearly seen in the reflections in the water):
Reference Frame | BoxCaster | VidiU (notice washed out reflections) |
The DMB-8800A Premium didn’t seem to suffer from CBR artifacting, but its encoded frames consistently remained darker than both the original video and the other encoders’ encoded frames. Below is a still frame taken from the reference video, the BoxCaster, and the DMB-8800A Premium, respectively. Notice the loss of detail in the darkest parts of the bird’s chest:
Reference Frame | BoxCaster | DMB-8800A Premium |
The DMB-8800A Premium does have settings for adjusting HDMI color parameters, but these were all left at the defaults:
Judge for yourself by playing the encoded videos compared to the original reference video:
Unfortunately, networks are never ideal. Video streaming, especially when live, must deal with adverse situations such as link loss, reduction in bandwidth, or intermittent packet loss. We compared how various encoders deal with network situations by sharing a network from a Macbook Pro and simulating issues using Apple's Network Link Conditioner tool.
The Teradek VidiU and the DMB-8800A Premium transfer their streaming data to a streaming provider via Real-Time Messaging Protocol (RTMP). RTMP is the de-facto protocol for streaming media, as it has very broad support both in encoding hardware/software and media servers and players. RTMP is a stream-based protocol that (in most cases) utilizes TCP as an underlying transport.
The BoxCaster, by default, streams using the BoxCast Backhaul Protocol (BBP). BBP utilizes UDP to transfer media data (to avoid head-of-line blocking problems that plague TCP), while also utilizing a TCP channel for retransmissions of lost media data, plus positive and negative acknowledgements. It also utilizes forward error correction and obfuscation for additional delivery assurance. It was specifically designed to solve a number of problems that plague RTMP.
Premise networks and regional ISPs are not always ideal for handling live streaming traffic. For example, a small church sharing a limited uplink between a live stream and local parishioners may result in intermittent loss of connectivity or reductions in link speed.
A quality hardware encoder and live streaming platform should not only provide the highest quality encoding, but also adapt to changing network conditions gracefully.
Using the Network Link Conditioner from Apple, we reduced the uplink speed of the encoder’s shared network connection to 3.5 Mbps, then reduced it to 2.0 Mbps.
Using the VidiU, you can see an initial lowering of the bit rates as the encoder attempts to compensate for the slower uplink; however, after a couple of minutes, the VidiU drops the TCP connection. The VidiU reconnects after a few seconds, but the aggregate downtime creates a discontinuity of approximately 10 seconds in the live stream.
Using the DMB-8800A, the TCP connection closed when the uplink bandwidth was reduced, but the encoder re-opened it quickly (hence why there is no visible gap in the graph). The disconnection did result in a short discontinuity (about 4 seconds):
Using the BoxCaster, you can see the bit rates being reduced quickly as the BoxCaster observes the lower link speed. The live stream had approximately 4 seconds of visual artifacting, but there were no noticeable audio artifacting or discontinuities. While no artifacting is desirable, some artifacting in the face of network disruptions is preferable to any discontinuity.
Using the Network Link Conditioner from Apple, we fixed uplink speed of the encoder’s shared network connection to 3.5 Mbps, but introduced a percentage likelihood of dropped uplink packets.
Using the VidiU, the encoder dropped the TCP connection when we achieved 9% of dropped uplink packets, leading to a stream discontinuity as the VidiU attempted to reconnect:
Using the DMB-8800A Premium, the encoder dropped the TCP connection when we achieved 5% of dropped uplink packets. It quickly reconnected and used lower bit rates, but the disconnection resulted in a short discontinuity (about 4s):
With the BoxCaster, increasing the drop rate to 10% yielded only a reduction in the encoded bitrates, but no visual or auditory artifacts, no lost data, and no discontinuities:
We set out to conduct a side-by-side comparison of three popular hardware encoders to determine which performed most favorably, especially as it relates to:
When comparing BoxCast’s BoxCaster, the Teradek’s VidiU, and Digicast’s DMB-8800A, it’s clear that the BoxCaster ranks most favorably in all three categories.
In today’s world where “perception is reality,” every organization wants to put their best foot forward. Live streaming invites people from all over the world to participate in your events. Be sure to consider these key factors when deciding which hardware will best represent you and your organization.
Here are a few other resources you might find interesting:
HEVC (H.265) vs. AVC (H.264) - What’s the Difference?
HDMI vs. SDI Video Connections - What's the Difference?
This is Why Your Live Stream Lags: Intro to Streaming Latency
Hardware Vs. Software Encoders: 6 Reasons Hardware Encoders Are Better
HEVC's Impact on Live Streaming
What's the difference between various SDI Signals?
References
[1] Command used to compute PSNR: ffmpeg -i <reference.mp4> -i <captured.mp4> -lavfi psnr -f null -
[2] Command used to compute SSIM: ffmpeg -i <reference.mp4> -i <captured.mp4> -lavfi ssim -f null -
[3] Command used to compute VMAF: run_vmaf yuv422p 1280 720 <reference.yuv> <captured.yuv>