Skip to content
Callaba

SRT Backup Stream Failover Setup

On this page

This is a main/backup failover recipe for an existing SRT contribution. It is not an SRT Server selection or deployment guide; for that decision, see SRT Server. Configure the main and backup paths, then test the destination with the failure conditions that matter to your workflow.

Before starting, prepare a working main SRT contribution, an independently reachable backup source or file, and access to the SRT Servers, File Manager, and Re-streaming sections.

For example, if you are streaming from a venue where the internet connection is not the best, you might want to add a backup/fallback stream or video file to switch to in case the network with the main stream goes down. 

Here we’re going to demonstrate how you can set up a backup “stream” from a video file. But you can apply the same logic for an actual live stream backup too. 

✅ Before you begin

For this tutorial, you'll need Callaba Software.

You have two options for using Callaba: You can either launch it on AWS or install the self-hosted version on any hosting provider of your choice.

• 1 •  Callaba Cloud on AWS

📚 How to launch Callaba on AWS

• 2 • Callaba Cloud Self-Hosted

📚 How to install Callaba Self-Hosted

Let’s go!

First, we’re going to add our main input. In our case, it is a video stream via SRT.

01. Add your main stream input

Go to SRT Servers > click Add New

Name your SRT server, change ports if you want to, then save it.

In our example we have named our SRT server “First-input”.

To send your stream to the server, click “info” (i) and use one of the options — streaming via Host and Port, or streaming via Stream ID.

For now, we’ll leave this SRT server alone — we’ll get back to it soon. 

02. Set up the backup/fallback input

In this part, we’re going to upload our video file and set it up as a strem coming to a separate SRT server.

Upload fallback/backup video file to Callaba

Open File manager > click "Add New"

Name your video file and upload it. 

Tip :

You can click “Save” and your file will finish uploading in the background. 

Now we need to turn our file into an actual stream. 

Add SRT server for the backup stream

For starters, create a new SRT Server. 

Go to SRT Servers > click "Add New"

Name your SRT server, change ports, save it.

In our example, we named it “Fallback-input” .

Re-stream video file to the SRT server

Go to Re-streaming section > click "Add New"

Name your restream

Input type : File

File : select the file you’ve uploaded 

Stream destination : SRT URL

We want to send this stream to our Fallback SRT Server.

You can do it by typing your server’s IP address and the Publisher port of your Fallback SRT Server. 

In our case, the port is 1955.

💡Alternatively, you can copy and paste the Publisher URL from your Fallback SRT Server.

To do that, click “info” (i) icon on your Fallback SRT Server and copy the Publisher URL.

Click “Save” and wait for the bitrate to appear. Now the video file is being streamed to the Fallback SRT Server.

Turn the Re-stream off for now. We’ll turn it on when we get to the actual testing.

03. Configure SRT main/backup failover

In SRT Servers, select SRT main/backup failover under SRT Routing, choose Pull, then add the two source hosts with their routing ports and source SRT Server names. Check destination picture and audio while the main path stops and returns; changing the active input can interrupt delivery.

To achieve that, we’re going to add a third SRT Server, that will then pull video streams from the previous two servers.

Go to SRT Servers > click "Add New"

Name your SRT server, change ports.
In our example, we named it “Failover” .

Set up routing

Unfold Routing settings, then change settings

 SRT Routing : SRT main/backup failover

Routing mode : Pull

Then click “+ Add SRT Host”

Here we will have to add our previous SRT Servers (one for main stream and the other one for the fallback) as sources from where this new server will “pull” the streams.

Routing Host : Specify IP address of your server

Routing SRT Port : Specify Receiver (IMPORTANT) port

Destination SRT Server name : Specify the name of your server

Once you’ve added your first SRT Sever, click “+ Add SRT Host” again and add the second one.

Allow “pulling”

Unfold “Allowed streams”. Click “+ Allowed stream”.

In the new stream that appears, set up

Role : Puller

Click “Save”. The routing configuration is ready for a destination-side test.

Next, use this SRT Server as the input for the YouTube restream so you can observe the main and backup paths at the destination.

04. Set up Re-stream to Youtube 

Go to Re-streaming section > click “Add New”

Name your restream

Input type : SRT Server

Server : select the Failover SRT Server

Stream destination : Youtube

RTMP Stream Key : Copy your stream key from the Youtube creator studio

Save your re-stream.

05. Test the setup in action

Time to see how this works in real-time. We’re going to send our stream to Youtube and then simulate what will happen if our main stream breaks off.

Activate your inputs

1.1 — Send your main livestream to your main SRT Server.

To send your stream to the server, click “info” (i) and use one of the options — streaming via Host and Port, or streaming via Stream ID. 

Wait until you see incoming bitrate.

1.2— Turn on your fallback re-stream.

On your Youtube live stream page, you should see your main stream coming. 

In the original example, the Failover SRT Server was shown receiving the Main Stream input.

Make it switch

Turn off Main Stream SRT Server (“First-input”) only during a controlled test, then watch destination picture, audio, and input telemetry to see how this configuration behaves with your sources.

Record any interruption and the observed destination behavior before relying on the route.

In the original example, the Failover SRT Server was shown receiving the Fallback input.

Make it switch back

Restore the main source and confirm its input telemetry is stable. Disable the fallback path only after verifying that main source is available, then repeat the destination-side check.

This is the end our our lifehack.

Follow us on social media 

LinkedIn • Reddit • Instagram • Facebook • Youtube • Twitter