ApsaraVideo Live supports stream ingest over the Secure Reliable Transport (SRT) protocol. Compared with the Real-Time Messaging Protocol (RTMP), SRT has approximately 500 ms higher latency but offers higher stability, especially in weak network environments.
Prerequisites
You have configured and associated an ingest domain and a streaming domain. For more information, see Getting started with ApsaraVideo Live.
Enable SRT
Log on to the ApsaraVideo Live console.
In the left navigation pane, click Domain Names.
Find the streaming domain that you want to manage and click Domain Settings in the Actions column.
Click .
Click the Stream Ingest Information tab. In the Ingest Protocol section, enable the SRT Protocol switch. The switch is off by default.
SRT stream ingest and playback
SRT stream ingest
After you enable SRT, you can obtain an SRT ingest URL from the URL Generators in the console or by concatenating URL components.
SRT ingest URLs use the following formats:
Format 1 (Recommended)
srt://{domain}:1105?streamid=#!::h={domain},r=/{AppName}/{StreamName}?auth_key={access token},m=publish (Recommended)
Format 2
srt://{domain}:1105?streamid=push://{domain}/{AppName}/{StreamName}?auth_key={access token}
Custom parameter encoding rules
When the SRT ingest URL contains custom parameters, you must URL-encode the special characters to avoid parsing conflicts. Example:
srt://{domain}:1105?streamid=#!::h={domain},r=/{AppName}/{StreamName}?auth_key%3D1807696811-21613-0fa3597df7f228fbfae37020de3782b70%26sprio%3D6,m=publishSRT playback
When the SRT protocol is used for stream ingest, the supported playback protocols include RTMP, FLV, HLS, and RTS. SRT playback is currently not publicly available. To use this feature, contact your account manager or submit a ticket.
SRT playback URLs support two formats:
srt://{domain}:1105?streamid=#!::h={domain},r=/{AppName}/{StreamName}?auth_key={access token},m=requestsrt://{domain}:1105?streamid=pull://{domain}/{AppName}/{StreamName}?auth_key={access token}
For more information about parameters and authentication, see Generate streaming URLs.