How to set up geo-distributed routing of video streams using SRT protocol and Callaba Cloud
In this tutorial, we will explain how to organize geo-distributed video stream delivery using multiple instances. Geo-distributed video delivery technology allows to organize high-quality broadcasting over the SRT protocol with minimal latency.
In our example, the video stream is being sent from the city of Faifax, Virginia, USA, and the stream recipients/viewers are located in Quebec, Canada.
First, we will create an SRT server for the receiver of the video stream.
Since in our example the viewers are located in the Canadian city of Quebec, we will create our Callaba Cloud Live Streaming SRT server in this region.
Before you start, you need to register an Amazon Web Services account if you don’t already have one. This procedure would take around 3 minutes.
Link to register for Amazon Web Services
1. Go to the Callaba Cloud Live Streaming page on the marketplace (link).
Click “Continue to Subscribe”
2. Accept the terms for this software. Click “Accept Terms”
3. Wait until “Continue to Configuration” button becomes active and click on it
4. Region:
Specify your region. We recommend using the one that is the closest to the geographic location of your publishers and recipients.
Since in our example the viewers are located in the city of Quebec, Canada, we are specifying the region of Canada(Central)
Click “Continue to Launch”
Tips for picking your region :
For USA — US East 1 (N. Virginia) | US East 2 (Ohio) | US West 1 (N. California) | US West 2 (Oregon)
For Canada — CA Central 1 (Quebec)
For Russia — depending on the location, EU North 1 (Stockholm) or EU Central 1 (Frankfurt) is optimal. For the Far East, AP Northeast 1 (Tokyo) is optimal
5. The remaining steps to launch Callaba Cloud Live Streaming are covered in great detail in our step-by-step guide for creating an SRT server. In order to keep this tutorial from being too long, we suggest using the aforementioned guide for the remaining steps.
Open the link: “How to create an SRT Server and start streaming SRT in Callaba Cloud Live Streaming”
Follow the steps 5 through 13
If you are unsure of which instance type is the best for you (step 5), there is an interactive calculator on the main page of our website that will help you to pick the appropriate type of instance for your tasks.
6. Now that you have entered the Callaba Cloud Live Streaming dashboard, the most interesting part of this tutorial begins.
Go to the “SRT Servers” section
Click “Add New”
7. In the window that opens, fill in the following fields:
Name:
Give your server a name. This will help you avoid confusion in the future.
In our example, we named our server Canada Central Receiver.
Latency (ms):
For optimal latency, we recommend using the auto-diagnostic function.
Click “Check latency”
Maximum network bandwidth (Bytes/s):
To determine the channel width, we recommend using the auto-diagnostic function.
Click “Check bandwidth”
Status:
Check the “Enable” box
You can leave the remaining settings unchanged. Please only make changes to the settings if you really understand what they do.
Click “Save”
Done!
8. Our server for receiving the video stream in Canada is ready. However, now we need to create a server that will serve as the source of this stream.
In our example, the cameras, the encoder, and the event we want to livestream re located in the United States, in Fairfax, Virginia (US East (N. Virginia) region in AWS), so now we will create an SRT server in this region.
So we will have to do almost all the same steps that we’ve done while creating the receiving server for the Canadian viewers. But there still will be some differences.
Open the Callaba Cloud Live Streaming page on AWS (link)
Click “Continue to Subscribe”
Click “Accept Terms”
Click “Continue to Configuration” when this button becomes active
Region:
In this step you need to select the region where the source of the video stream is located.
In our case, region is US East (N. Virginia)
The remaining steps are no different from creating a receiving server.
Log into the Callaba Cloud Live Streaming dashboard on the new server.
Go to the “SRT Servers” section
Click “Add New”
9. In the window that opens, fill in the fields:
Name:
Give your server a name. This will help you avoid confusion in the future.
In our example, we named our server USA Fairfax Publisher.
Latency (ms):
For optimal latency, we recommend using the automatic diagnostic function.
Click “Check latency”
Maximum network bandwidth (bytes / s):
To determine the channel width, using the automatic diagnostic function.
Click “Check Bandwidth”
Status:
Check the “Enable” box
Let’s take a closer look at the routing parameters
SRT Routing:
To send the stream from the US East (N.Virginia) instance to Canada (Central) one, you must select Callaba Cloud Live Streaming from the drop-down list.
To send the SRT stream to any public address, select the Public IP option.
Please note:
If you are sending a stream to a public address, make sure the receiver side is configured to forward UDP outside the firewall to your local LAN.
And also a configured receiver of SRT video in listening mode (for example, a hardware decoder outside NAT) is required.
Routing Mode:
We will be sending data from US East (N. Virginia), so we need to choose “Push”
SRT Port Routing:
The SRT port of the recipient server. In our example, the publisher’s and the recipient’s ports are the same
Destination SRT Server Name:
Destination server name. In our example, it’s “Canadian Center Receiver” (we gave this name to our server by ourselves)
Please note:
You should specify the exact name of the server you plan to send the video stream to.
Click “Save”
The server for sending our video stream is ready!
10. Now everything is ready and we can send the video stream to the publisher’s address in the US East (N. Virginia) region in Caller mode: 34.229.137.81:1935?streamid=publisher/usa-fairfax-publisher/srt-stream-01
And we can also receive this stream in the region of Canada (Central) in Caller mode: 3.96.196.18?streamid=receiver/canada-central-receiver/srt-stream-01
Or, if you are using a hardware encoder, send your SRT stream to the host and port of the instance in the US East (N.Virginia) region: 34.229.137.81:1935
That’s all. If you have any questions, please contact us at [email protected]. We will reply to you within 24 hours.
We wish you smooth live streams, minimal latency and a really broad broadband.
Related articles :
• How to launch Callaba Cloud Live Streaming
• How to start streaming in OBS Studio over the SRT Protocol
• How to receive SRT stream in OBS Studio
• How to stream from OBS studio to Twitch, Youtube and Facebook at the same time