SRT streaming
This guide explains how to push streams to Media Gateway using the SRT protocol.
Understand the tech
SRT (Secure Reliable Transport) is an open-source protocol developed by Haivision and promoted by the SRT Alliance. It provides secure, high-quality, low-latency video streaming. Compared to RTMP, SRT performs better for live streaming over unstable network connections.
When using the SRT protocol to push streams to Media Gateway, the following codecs are supported:
- Video: H.264, H.265
- Audio: AAC, OPUS
Configure with OBS
Set up SRT streaming in OBS Studio by configuring the server and stream key settings.
-
In the Server field, enter your streaming domain name using the following format:
You can use the Agora unified domain name or bind your own domain name.
-
To use the unified domain name, use
srtlive-rtcpush-prod-{region}.agoramdn.com
. Replace{region}
with your actual region. Supported regions are as follows:na
: North Americaeu
: Europeap
: Asia except mainland Chinacn
: Mainland China
-
To use your own domain name, contact Agora technical support for configuration before use.
-
-
In the Stream Key field, enter the streaming key. To obtain a key, see Get streaming key.
infoWhen using a custom domain name, you must add domain parameters to your stream key using the format:
{streaming_code}?h={streaming_domain_name}
This is required because the SRT protocol doesn't transmit domain name information to the server by default.
Configure with FFmpeg
Use ffmpeg
to push SRT streams directly from the command line. The following examples show configurations for both unified and custom domain names.
-
Use the Agora unified domain name:
-
Use a custom domain name (example.com):