If you do not know how to use XML on Videon devices, we recommend reading our XML guide.
Currently, high availability and failover needs to be handled at the point of ingest (via features on specific cloud platforms).
Some example streaming platforms/ingest points that support failover are: YouTube, Facebook, MediaLive, and Twitch.
To have a high availability workflow, you will need two Videon devices fed an identical source material
- The simplest way to achieve this is to deliver the source to both Videon devices via an HDMI/SDI splitter/distributor.
- Currently, we do not have a utility or feature for syncing starting frames between separate Videon devices.
- It is possible to handle failover/sync at the point of ingest by injecting KLV Timeframes.
-
Caveat - Since we can’t guarantee that the same frame will be encoded/delivered at the same time, this is not a 1-1 solution.
-
- It is possible to handle failover/sync at the point of ingest by injecting KLV Timeframes.
Example XMLs
HA_XML_1.xml
<?xml version="1.0" encoding="UTF-8"?>
<VStreamPlatform version="2">
<System>
<DeviceName>HA_DEV_1</DeviceName>
<IPScheme>
<DHCP />
</IPScheme>
<XMLPollInterval>10</XMLPollInterval>
<NTPServer>time.nist.gov</NTPServer>
<Timezone>America/New_York</Timezone>
</System>
<InputChannel id="0">
<AudioInputType>Embedded_Audio</AudioInputType>
<VideoInputType>SDI_Video</VideoInputType>
</InputChannel>
<AudioEncoder id="0">
<InputChannelID>0</InputChannelID>
<AudioBitrate>128</AudioBitrate>
<BitrateMode>Variable</BitrateMode>
<AudioMixMode>Stereo</AudioMixMode>
<SelectedChannels>
<Channel>1</Channel>
<Channel>2</Channel>
</SelectedChannels>
</AudioEncoder>
<DataEncoder id="0"/>
<VideoEncoder id="0">
<InputChannelID>0</InputChannelID>
<VideoEncoderSyncGroupID>0</VideoEncoderSyncGroupID>
<VideoCodec>
<H264>
<Profile>High</Profile>
</H264>
</VideoCodec>
<VideoBitrate>4000</VideoBitrate>
<BitrateMode>Variable</BitrateMode>
<ScalingResolution>Passthrough</ScalingResolution>
<LimitTo30FPS>false</LimitTo30FPS>
<KeyframeInterval>
<Unit>Milliseconds</Unit>
<Interval>1000</Interval>
</KeyframeInterval>
<LatencyMode>Normal</LatencyMode>
<KLVEnable>false</KLVEnable>
</VideoEncoder>
<Output id="0">
<Enable>true</Enable>
<AudioSource>
<AudioEncoderID>0</AudioEncoderID>
</AudioSource>
<VideoSource>
<VideoEncoderID>0</VideoEncoderID>
</VideoSource>
<OutputType>
<RTMP>
<URL>rtmp://3.128.127.69:1935/HARTMPS1/inputa</URL>
</RTMP>
</OutputType>
</Output>
</VStreamPlatform>
HA_XML_2.xml
<?xml version="1.0" encoding="UTF-8"?>
<VStreamPlatform version="2">
<System>
<DeviceName>HA_DEV_2</DeviceName>
<IPScheme>
<DHCP />
</IPScheme>
<XMLPollInterval>10</XMLPollInterval>
<NTPServer>time.nist.gov</NTPServer>
<Timezone>America/New_York</Timezone>
</System>
<InputChannel id="0">
<AudioInputType>Embedded_Audio</AudioInputType>
<VideoInputType>SDI_Video</VideoInputType>
</InputChannel>
<AudioEncoder id="0">
<InputChannelID>0</InputChannelID>
<AudioBitrate>128</AudioBitrate>
<BitrateMode>Variable</BitrateMode>
<AudioMixMode>Stereo</AudioMixMode>
<SelectedChannels>
<Channel>1</Channel>
<Channel>2</Channel>
</SelectedChannels>
</AudioEncoder>
<DataEncoder id="0"/>
<VideoEncoder id="0">
<InputChannelID>0</InputChannelID>
<VideoEncoderSyncGroupID>0</VideoEncoderSyncGroupID>
<VideoCodec>
<H264>
<Profile>High</Profile>
</H264>
</VideoCodec>
<VideoBitrate>4000</VideoBitrate>
<BitrateMode>Variable</BitrateMode>
<ScalingResolution>Passthrough</ScalingResolution>
<LimitTo30FPS>false</LimitTo30FPS>
<KeyframeInterval>
<Unit>Milliseconds</Unit>
<Interval>1000</Interval>
</KeyframeInterval>
<LatencyMode>Normal</LatencyMode>
<KLVEnable>false</KLVEnable>
</VideoEncoder>
<Output id="0">
<Enable>true</Enable>
<AudioSource>
<AudioEncoderID>0</AudioEncoderID>
</AudioSource>
<VideoSource>
<VideoEncoderID>0</VideoEncoderID>
</VideoSource>
<OutputType>
<RTMP>
<URL>rtmp://3.128.127.69:1935/HARTMPS1/inputb</URL>
</RTMP>
</OutputType>
</Output>
</VStreamPlatform>
To test the failover, simply change the <Enable> block of Output id=”0” to “false” on one Videon device. The stream should continue, as long as one Videon device is still running and enabled.
Backup RTMP streams with YouTube Live
Navigate to your YouTube Studio Live control panel, as you would for normal streams.
On your primary Videon device XML, use “Stream URL” as the basis for the RTMP URL, and for the secondary Videon device, use the “Backup Server URL” as the basis for the URL.
The RTMP URLs Should be formatted as follows:
rtmp://a.rtmp.youtube.com/live2/<<STREAM_KEY_HERE>>
rtmp://b.rtmp.youtube.com/live2?backup=1/<<STREAM_KEY_HERE>>
Backup RTMP streams with Facebook
-
Sign in to Facebook
-
Click “Pages”
-
Click on the Page you would like to live stream to
-
Click on "Live"
-
Enable “Backup stream” as shown below
On your primary Videon device XML, use the primary stream key in the RTMP URL, and for the secondary Videon device, use the “backup stream key” for the second URL.
Both RTMP URLs should be formatted as follows, again, using the primary and backup stream keys, respectively:
rtmps://live-api-s.facebook.com:443/rtmp/<<STREAM_KEY_HERE>>
An Example RTMP high availability workflow utilizing AWS MediaLive
A prerequisite for this example is a working AWS Elemental MediaLive account. (Or an AWS account that has access to MediaLive.)
- Once you are logged into MediaLive, Navigate to the “Inputs” tab on the left-hand menu, and then click “Create Input".
- Configure your device as described below.
- Input Name is custom. We recommend it be related to your use-case
- Input Security group needs to be filled out with your CIDR
- To whitelist your current (or on-site) external IP, and only that IP, you would enter it in the format of xxx.xxx.xxx.xxx/32
- Then, click “Create Input Security Group”. AWS will remember this for future inputs.
- To whitelist your current (or on-site) external IP, and only that IP, you would enter it in the format of xxx.xxx.xxx.xxx/32
- Destination A / B should be named appropriately for your use case. E.G. “TheaterSource1”
- Finally, Click “Create input”.
- Repeat Steps 1 and 2 to create the second, backup input.
- Now, navigate to “Channels” and click“ Create Channel
- Next, you will be greeted by this window.
- Fill your “Channel name” field as suits your use-case
- For this demonstration, we will be using the “RTMP PUSH” template, so select it.
- Channel Class will be standard, since “single pipelines” do not support failover.
- Configure your Input Specifications to match the input video you expect to stream to this channel.
- For this demonstration, we will only be streaming to YouTube, so on the menu on the left, click on “Twitch”, and then the “remove” button on the top right of the form. Repeat this for “Facebook”. Next, we will fill out the information for our YouTube stream.
- Replace “streamkey” under “Stream Name” With the stream key you can find on your YouTube LiveStream Manager.
- Also, Adjust your video settings below to match what you expect to stream.
- Next to “Input Attachments”, click “Add” and select your first source. Click “Create Channel”, then repeat this process for your second Input.
- Once you have both inputs added, select the input which you want to be your “Primary” stream.
- Under “Automatic Failover Settings”
-
Enable Failover
-
Select your secondary input
-
Optionally, enable video black settings. (Input loss settings should be enabled by default.)
-
Configure threshold values to suit your use-case. For this example we used defaults.
-
- Under “Automatic Failover Settings”
-
Finally, click “Create Channel”. It should bring you to the screen shown below.
-
Click “Start” On the top right to enable your stream.
-
The channel may take as long as several minutes to start.
-
The stream will not start until it receives valid input
-
The Input streams will refuse to connect until the channel is "started"
-
-
Configure your Videon devices to use XML. Optionally, Setup A simple HTTP Server to host XML files.
To view the RTMP stream that you need to configure your Videon device with, you can click “inputs” in MediaLive and the rtmp:// stream addresses will be viewable under “Destination A, Destination B”