Low latency remains a key component in any live streaming application. Video chat, distance learning, live auctions, event broadcasts and many more use case cases all need fast stream delivery to ensure a positive user experience. The challenge lies in providing low latency that is consistent and scalable. Complicating matters further, is the fact that live streaming video is itself nuanced with many subtle yet impactful considerations that must be taken into account.
In order to simplify this process and cut through any confusion, Red5 Pro and Videon have joined forces to bring real-time latency live video streaming to the mass market. To accomplish this, they make use of Videon’s hardware based live streaming encoder to perform the video streaming. This document outlines the process for setting up a low latency workflow and displays the impressive ultra-low latency results achievable when pairing Videon encoders with Red5 Pro’s cloud-based streaming platform.
This step-by-step guide walks you through implementing a WebRTC based ultra low latency workflow using Videon’s VersaStreamer 4K encoder and Red5 Pro’s Real-Time Streaming platform. We will then measure the glass-to-glass latency of the configured workflow.
The latency consistently clocks at 400-500ms using either single instance or Red5 Pro Clustering technology and Stream Manager. The lowest latency during this testing was clocked at 147.5ms
Along with our partners at Videon, Red5 Pro recommends using our cloud-based streaming software and Videon’s VersaStreamer 4K for applications that require real-time interaction between viewers and broadcasters.
All the tests and the results shown in this post were run with encode and decode endpoints located in Videon’s lab located in State College, PA.
Videon VersaStreamer 4K
- Software Version: 22.214.171.124.3
Red5 Pro Server
- Software Version: 5.7.11.b376-release
- Configured in Amazon Web Services EC2
- Region: us-east-1
- Instance type: c5.xlarge
- OS: Ubuntu 16.04.6 LTS
- Google Chrome OS
- Version 76.0.3809.136 (Official Build) (64-bit)
- Video: 1920x1080P60
- Audio: HDMI Embedded (Spotify music)
Gefen 1:3 HDMI Splitter
- Model: repeater
Red5 Pro HTML Publisher and Subscriber SDK
- Version: 5.7.0
First, as illustrated by the block diagram above, connect the hardware. Once the hardware is configured, you can then install and setup the Red5 Pro instance or cluster as per the provided Red5 Pro instructions. Please note that all defaults should be enabled.
Next, you will need to setup the Videon VersaStreamer 4K by opening “Encoder Settings: in the Videon VersaStreamer 4K web UI. Make sure that the following settings are selected in order to provide the best performance.
- Encoding Mode > Constant Bitrate
- Video Encoding > H.264 (AVC)
- H.264 Profile > Baseline Profile (note that you must use baseline due to WebRTC based decoder limitations for higher profiles in browsers)
All other settings may be optimized for your specific workflow and deployment conditions. The following image shows all the settings used for the tests that were performed in order to produce the results stated in this post.
You will now need to turn on RTMP streaming to the Red5 Pro server in Output Settings by selecting the RTMP 1 tab:
- Turn RTMP Output 1 “On”
- From the dropdown menu, select “Generic RTMP”
- Enter the following in the URL entry box:
- rtmp://<Red5 Pro Server>:1935/live/stream
- Replace <Red5 Pro Server> with the AWS EC2 instance that has your Red5 Pro server configured and running along with the configured port.
You can now play the stream in the Red5 Pro web player by following the next 2 steps:
- In the browser’s address bar, enter this URL: http://<Red5 Pro Server>:5080/live/viewer.jsp?host=<Red5 Pro Server IP>&stream=stream#. Note that if you want to use this in production you will want to enable SSL and use a fully qualified domain and https. More info on installing SSL certificates can be found in our documentation.
- Replace <Red5 Pro Server> with the hostname of the AWS EC2 instance used in Output Settings of Step 3b from the section above and <Red5 Pro Server IP> with the external IP address of the same instance.
It should be noted that j in Red5 Pro’s upcoming 7.0 release, SRT can be used instead of RTMP for even better latency and performance.
Once you have followed these instructions and conducted a test according to the block diagram, the speed, and power of the combination of Red5 Pro and Videon will become readily apparent.
Please make sure to use a video source that has a running timer. Considering that we measure our latency in milliseconds rather than seconds, you will need to display down to milliseconds in order to properly measure the low latency output. As our partners at Videon did, you can use the Red5 Pro Web Player and monitor output for playback.
Samples were measured by simultaneously taking a picture of the preview monitor screen and the Red5 Pro web player at the same time. By comparing the time codes, you can see the latency from when the local video source captures the video to when the video is encoded by Videon’s VersaStreamer 4k and streamed through Red5 Pro’s cloud infrastructure. The following pictures show the workflow at various times after beginning the stream. Videon consistently measured under 200ms of glass to glass latency. Despite the fact that adverse network conditions can increase latency, even setups in poor networks measured <500ms of latency.
For real-time latency workflows, the Red5 Pro software and the Videon VersaStreamer 4K is an optimal pairing. With sub 500ms of latency, smooth and natural interactions can be achieved by using Red5 Pro’s cloud-based streaming platform and Videon’s VersaStreamer 4K. This powerful combination enables viewers and streamers to interact in real-time for a completely interactive experience. Using the Videon live streaming encoder and the Red5 Pro software, is the best way to provide low latency video streaming to a broader audience.
Want to learn more? Get in touch. Send an email to email@example.com or schedule a call directly.