CALL US

800-634-5178

Live Streaming Hardware Encoder Primer: Epiphan

Live Streaming Hardware Encoder Primer: Epiphan

By Adam Noyes 0 Comment June 10, 2019

What is a streaming hardware encoder

A hardware encoder is a dedicated appliance which captures, compresses, and converts audio-visual data into a format suitable for streaming and/or recording. Since we often get questions about live streaming encoding in particular, for the purposes of this article we will be talking mostly about hardware encoders for live streaming. Essentially, video streaming encoder hardware are boxes designed especially for making video go live on the internet.

Streaming hardware encoder appliances available on the market vary greatly in their complexity. They can be very simple, portable devices, built for streaming to one destination only. One example of such an encoder is the Webcaster X2, which can stream to YouTube, or Facebook Live, or Twitch. On the other side of the scale, hardware encoder devices could also be quite sophisticated, designed to accept a variety of video input types and having the ability to simultaneously stream to multiple destinations. These more sophisticated hardware encoders could also be quite portable, like Pearl Mini, or be permanently fixed on an equipment rack, like the Pearl-2 Rackmount.

Hardware encoder diagram

What a hardware encoder isn’t

hardware encoder, as the name suggests, is different from a software encoder. Streaming software runs on computer hardware, which in turn has a lot of other processes running on it. Therefore, the computer is not solely dedicated to encoding and streaming. Hardware encoders, on the other hand, are devices designed specifically for encoding. This fact makes them more reliable that streaming software because other processes don’t interfere. This is why in mission-critical situations, professional video producers rely on hardware encoders.

A streaming hardware encoder is not itself an online streaming destination. Generally, you need to set up your live streaming destination separately. A streaming destination could be a live video platform like YouTube or Facebook Live, a CDN like Kaltura, or a streaming server such as WOWZA. However, many encoders allow direct streaming to viewers on the local area network.

A hardware encoder is also not in itself a video input. This of it as more of an input hub. A hardware encoder is able to intake video sources using physical connectors like HDMI, USB, SDI, or through the network (e.g. NDI)

Streaming encoder features

Once again, hardware encoders come in all shapes, sizes, and feature sets. Here are some of the important features that set hardware encoders apart.

Number of simultaneous encoded streams and destinations

Encoders vary in the number of simultaneous streams they are capable of encoding. Encoding takes a lot of processing power, and with each additional encoded stream the workload increases. Number of encoded streams is not to be confused with number of destinations. With advanced enough hardware encoders, you can easily push one encoded stream to multiple destinations. Generally, simpler and less expensive devices can encode one stream and stream to one destination, whereas more powerful encoders can encode a number of separate videos and stream each to multiple destinations simultaneously.

Types of streaming destinations

Streaming hardware encoders can also have streaming destination limits. As mentioned above, Webcaster X2 can only go live to YouTube, or Facebook Live, or Twitch, whereas more advanced hardware encoders are able to stream to virtually any streaming destination. Before committing to an encoder double check its streaming destinations and how many streams it can encode at once. Additionally, some hardware encoders are integrated with CDNs for easier access.

Encoding resolution

Encoding resolution refers to the final size of video frame, width x height, in pixels. The most popular streaming resolutions are 1280 x 720 (a.k.a 720p) and 1920 x 1080 (a.k.a. 1080p) pixels. Resolutions above these require a lot more CPU and network bandwidth. However, if you are set on streaming in 4K resolution, make sure the encoder is in fact capable of that. You will also need to ensure a high and reliable network bandwidth. If you want to know more about the various standard resolution sizes, check out the chart in this article.

Bitrate

Bitrate describes how much data is transmitted per given amount of time. The higher the bitrate – the higher the image quality. Lifewise, to achieve a quality high resolution stream (e.g. 4K, 8K), the bitrate has to be high. Bitrate is commonly measured in kilobits per second (Kbps) or megabits per second (Mbps). On various encoders, bitrate settings can range from 1000 Kbps to 30000+ Kbps. For example, the minimum bitrate recommended by YouTube for 4K streaming is  35000 – 45000 Kbps.

Available streaming bitrate depends not only on the device’s physical limitations, but largely on the available network bandwidth. The device may be able to stream at 20000 Kbps, but if your network connection only allows for 5000 Kbps uplink speed, the final video will not be great, no matter how good the encoder. Many encoders offer the convenient “auto” bitrate option, where the encoder figures out the optimal bitrate based on your connection speed.

Frame rate

Frame rate reflects the number of images that are encoded per second. It is expressed in frames per second (fps). Reducing the frame rate for a channel reduces bandwidth usage, and vice versa. A frame rate of 30 has been the standard for digital video for the past two decades. Currently, a frame rate of 60 and higher is used more and more frequently, creating a very smooth, hyper-realistic look (only if the input source is @60fps, naturally). Keep in mind that the frame rate directly affects required bitrate: for the same resolution video, the higher the frame rate, the higher the bitrate.

Video Compression (codec options)

In order to be streamed online, video has to be first optimally compressed. Codecs are compression methods that make this possible. Codecs use different methods of video file compression: some work faster, some are able to create smaller overall files, but the compression technology is always evolving and moving forward. Here are some of the most popular codecs used by hardware encoders today:

Motion JPEG (MJPEG)
MJPEG compresses individual still frames and has a “low CPU cost” of encoding/decoding. However, it requires more bandwidth than some other codecs. Additionally, MJPEG doesn’t support audio. It is most often used to stream surveillance footage or other video that doesn’t need live audio.

264/AVC
H.264 does not start compressing every subsequent frame from scratch. Instead, it looks at previous frames for changes. If pixels haven’t changed – H.264 just reuses previous data, thereby saving a lot of resources. Higher picture quality requires not only a higher bitrate, but is also more CPU resources. If you have enough of both however, the video will look great.

265/HEVC
H.265 is the next generation of codecs after H.264 (uses same compressions principles). It promises identical quality to H.264, but at half the bitrate (which decreases the bitrate requirement for a given quality). Compared to its predecessor, H.265 has greater accuracy and uses a wider range of frame prediction tools.

If you really want to geek out on the differences between codecs, check out this video:

Streaming protocols

Streaming protocols are methods of delivering the live stream to the destination. The job of a streaming protocol is to decide how to cut up the video feed into chunks and deliver it online. Streaming protocols are not to be confused with codecs: codecs figure out how to initially compress and pack the video, and then streaming protocols pick it up from there. Unsurprisingly, various streaming hardware encoders offer support for a specific set of streaming protocols.

Some streaming protocols are real-time, which means the live encoding happens right away, while others start a bit later. This directly affects latency, or the delay between when real-time events actually happen and when the viewer sees them. For some events, latency is no big deal, but for other events, especially sports and interactive events, low latency is a huge priority.

Moreover, some protocols are better suited for sending video online or to a CDN for further distribution, while others handle delivery of video to viewers on the local network. Additionally, some of the more recent streaming protocols are capable of adapting to the end user’s available bitrate. This is called adaptive bitrate streaming. Let’s run through some of the most popular streaming protocols available on hardware encoders today.

RTMP (Real-Time Messaging Protocol) – RTMP is one of the most widely used streaming protocols today. Many popular CDNs like Facebook Live and Youtube accept RTMP streams from encoders. For protected streaming, a protocol called RTMPS is used (the last S stands for Secure). This protocol encrypts the stream before sending it out, making it a good choice for secure streaming. RTMP is very robust and universally supported, however, it only works with certain codecs.

RTSP (Real-Time Streaming Protocol) – RTSP is a network-control protocol, it is often used with IP cameras and local streams. Viewers can copy and paste the URL of the RTSP stream into a media player and watch the stream on the local network.

MPEG-TS – very low latency protocol, great for LAN streaming directly to viewers.

MPEG-DASH – one of the more recent protocols. Offers adaptive bitrate streaming, works with virtually any codec, and is used by major broadcasters.

HLS (HTTP Live streaming) – this protocol was originally developed by Apple in order to bypass using Flash on i-devices. Today, it is one of the most popular methods of delivering live video to the end user because it’s supported by nearly every browser, operating system, and even Smart TVs. HLS is robust, scales well, offers adaptive bitrate streaming, however there is significant delay in transmission, rendering it unusable for interactive live events.

Other streaming encoder features to consider

In addition to all the technical parameters that are a part of any encoder, it is also important to look at things like usability and design. These features are too often overlooked, but can actually make the user’s life much easier. Here are a few more things to consider when choosing a hardware encoder:

1. Workflow + UI controls

How do you access the encoder’s settings/user interface? This can be a Web UI (accessed through a browser on the same network), physical external buttons, a touch panel, an app, or even an external monitor. Also, how easy is it to start/stop streaming? Some encoders can start and stop streaming with a single push of a button, whereas others require you to have explicit access to a web UI.

2. Live production options

Can the encoder simultaneously stream and record video? If more than one video source is available, can the device switch between sources? Moreover, is it possible to create picture in picture layouts or add graphic overlays to your video and does it require the use of any additional external software?

3. Local video playback

Is there an option to monitor the composite out program (a.k.a. local video playback) using either a built-in confidence monitor or as an HDMI program out to be connected to an external monitor?

4. Types of video and audio inputs

What are the connection options for video: HDMI, SDI, VGA, DVI, USB? How many ports are there? Is there a video over IP option like NDI available? What are the audio inputs and how many are there? For professional audio, XLR in is essential.

5. Type of network connectivity

What are the internet connection options for the encoder? Does it connect using Wi-Fi, cellular internet, LAN line, or a combination of these?

6. Form factor

Will this encoder be a permanent installation as part of an equipment rack? Consider getting a rackmount hardware encoder. For more advanced streaming hardware encoders, many manufacturers offer both a standalone desktop appliance and rackmount models (example: Pearl-2).

Still, other encoders are light and portable. Encoders such as VidiU Go and LiveU Solo have built-in batteries and connect to the internet via cellular, making them ideal for streaming on the go.

Final advice on choosing a hardware encoder for live streaming

When choosing a hardware encoder, you should be asking yourself what it is you need your encoder to do. Desired functionality will inform your decision, and you don’t need to overpay for features you don’t need.

How many destinations do you want to stream to? If you only want to go live to a social media destination, such as Facebook live, a simple encoder like Webcaster X2 might be the way to go. If you are looking to stream locally as well as to a streaming server simultaneously, you may want to consider a more sophisticated hardware encoder like Pearl-2.

Also think about how portable you need your encoder to be. Are you trying to go live on the go? You may want to look at something like VidiU Go or LiveU Solo. Looking to permanently install the encoder onto a rack? Consider devices with a rackmount form factor. Stay tuned for more articles on how to choose a hardware encoder.

Check out the full article HERE

Learn more about Epiphan HERE