All Products
Search
Document Center

Overview

Last Updated: Aug 10, 2021

Real-Time Streaming (RTS) is a value-added feature of ApsaraVideo Live. This feature provides easy-to-access live streaming services that feature a low latency of milliseconds, high concurrency, high definition, and smooth playback. This topic describes the basic information of the RTS feature. This topic also describes how to use the RTS feature.

Introduction

The RTS feature is developed based on ApsaraVideo Live. This feature monitors the latency during the complete live streaming process, reconstructs the Content Delivery Network (CDN) protocol, and optimizes underlying technologies such as User Datagram Protocol (UDP). RTS SDKs are integrated with the player SDKs of ApsaraVideo Live. Compared with conventional live streaming that has a latency of 3 to 6 seconds, RTS supports the playback of tens of millions of concurrent streams at a low latency of milliseconds. You can use RTS to reduce the latency and video stuttering, and ensure instant loading and smooth playback for live streaming.

Architecture

To use the RTS feature, you need only to add an RTS streaming domain to your ApsaraVideo Live service. This way, you can pull streams based on various protocols. The following figure shows the architecture of RTS.

1
Note
  • Streams are pushed based on Real-Time Messaging Protocol (RTMP).

  • The source URLs of the streams that are pulled based on RTMP start with rtmp://. The source URLs of the streams that are pulled based on Flash Video (FLV) or HTTP Live Streaming (HLS) start with http://.

  • The source URLs of the streams that are pulled based on UDP for RTS start with artc://.

Scenarios

  • Educational live streaming

    RTS supports large-size classes, where a large number of students can communicate with teachers online at the same time at a low latency.

  • E-commerce live streaming

    RTS allows sellers to communicate with buyers, answer questions of buyers, and exchange product information with buyers in real time.

  • Sports live streaming

    RTS can be used to broadcast events such as sports and e-sports in real time.

  • Interactive entertainment

    RTS enables streamers to give real-time responses when viewers send gifts. This improves the interactions between streamers and viewers.

Pricing

The pricing of RTS is different from that of ApsaraVideo Live. For more information, see Pricing.

  • Streams that are pulled by using RTS are charged based on the billable items of RTS rather than those of ApsaraVideo Live. This way, you are charged for the streams only once.

  • The billing method of RTS is the same as that of your ApsaraVideo Live service. For example, if you select the pay-by-data-transfer or pay-by-bandwidth billing method for ApsaraVideo Live, the same billing method applies to RTS.

  • If you change the billing method of your ApsaraVideo Live service, the billing method of RTS also changes.

Notice

You can apply for a free trial of RTS.

  • Enterprise users who complete real-name verification can use a 10 TB data transfer plan free of charge. Individual users who complete real-name verification can use a 1 TB data transfer plan free of charge.

  • Each Alibaba Cloud account can use the free data transfer plan only once. In addition, resource consumption can be deducted from the free data transfer plan only when the pay-by-data-transfer billing method is selected.

Procedure

  1. Enable the RTS feature.

    You can enable the RTS feature in the ApsaraVideo Live console by performing the following steps: Add an RTS streaming domain. On the Domain Management page, find the RTS streaming domain and click Domain Settings in the Actions column. On the page that appears, choose Stream Management > RTS. Then, turn on RTS.1

    Note

    • The RTS configuration takes effect within a few minutes. Wait a few minutes and then check whether RTS is enabled.

    • For information about how to bind an RTS streaming domain as a sub-streaming domain to a regular streaming domain, see Bind a sub-streaming domain to a main streaming domain and Bind an ingest domain to a streaming domain.

    • RTS can share a streaming domain with regular live streaming based on RTMP, FLV, or HLS. However, RTS is based on UDP and regular live streaming is based on TCP. The two protocols are different. We recommend that you configure a separate streaming domain for RTS.

  2. Push streams. For more information, see Stream ingest, stream pulling, and streaming.

    Streams are pushed based on RTMP. To use RTS to push streams, make sure that the source streams do not contain B-frames and are not encoded in the H.265 format. The size of the group of pictures (GOP) of the source streams cannot exceed 3 seconds. B-frames cause frame skips and a large GOP size increases the latency. If a source stream does not meet the preceding requirements, use the RTS transcoding feature to transcode the source stream. If you transcode the source stream, the latency may increase by hundreds of milliseconds. For more information, see Configure RTS transcoding.

  3. Stream live videos. For more information, see Stream ingest, stream pulling, and streaming.

    • Player: RTS is based on UDP and has special requirements on players. If you use RTS SDKs for mobile clients, make sure that the version of ApsaraVideo Player is 5.1.5 or later. If you use RTS SDK for HTML5, make sure that the version of ApsaraVideo Player is 1.1.0 or later. If you use RTS SDK for ApsaraVideo Player, make sure that the version of ApsaraVideo Player is 2.9.1 or later.

    • RTS streaming URL:

      • The method for concatenating RTS streaming URLs is the same as that for concatenating regular streaming URLs, except that RTS streaming URLs start with artc://. For example, you can concatenate RTS streaming URLs in the format of artc://Streaming domain/AppName/StreamName?Access token.

      • RTS SDK for HTML5 does not support Advanced Audio Coding (AAC). To use RTS SDK for HTML5, you must transcode streams to the Opus format. This limit does not apply to RTS SDKs for mobile clients. When you use RTS SDK for HTML5, you must use a streaming URL for transcoding. For example, you can concatenate RTS streaming URLs for transcoding in the format of artc://Streaming domain/AppName/StreamName{_Transcoding template ID}?Access token.

      For more information, see Ingest and streaming URLs.

  4. Record live streams.

    The configuration method for recording RTS live streams is the same as that for recording regular live streams. After the configuration is complete, recordings are automatically stored in Object Storage Service (OSS) or ApsaraVideo VOD. For more information, see Store live recordings in ApsaraVideo VOD and Store live recordings in OSS.