This topic describes a solution that uses RTS to reduce standard live streaming latency from over 3 seconds to 400–800 ms. This guide is for developers and operations engineers who build and optimize e-commerce live streaming systems.
Background
Industry overview
In recent years, an increasing number of e-commerce businesses have adopted live streaming. However, standard live streaming technology often has a latency of 3 to 6 seconds or even longer, which cannot meet the demand for frequent interaction between hosts and buyers. Furthermore, the stability and continuity of audio and video streams can directly impact business conversion rates.
Pain points
-
High latency: When viewers ask questions about products, high latency prevents the host from responding in real time, which degrades the viewing experience.
-
Frequent buffering: Frequent buffering complaints from viewers often force hosts to switch networks or restart the stream, which reduces efficiency.
-
Long wait times when switching streams: Swiping between live streams on a mobile device can cause a multi-second delay before the next video loads.
Solution overview
Solution
RTS uses the UDP protocol and leverages Alibaba Cloud's global network of over 3,200 points of presence (POPs) and full-link optimization technology to reduce the latency of e-commerce live streaming to the sub-second level, down from over 3 seconds with standard live streaming. RTS features low latency, easy integration, and low stuttering.
Advantages
Sub-second latency
-
Leveraging a global network of over 3,200 POPs, a smart scheduling system connects hosts and viewers to the nearest point of presence (POP) within the same ISP.
-
A dynamic path planning system, combined with flexible networking, selects optimal transmission routes.
-
Upgrading the transport protocol from TCP to UDP significantly improves transmission efficiency while maintaining reliability.
Reduced buffering
Quality of service for audio and video transmission is optimized across the entire delivery path. This ensures a smooth viewing experience during minor packet loss and minimizes buffering during severe packet loss.
Easy integration
The Alibaba Cloud console now allows you to enable RTS with a single click. This feature generates a playback URL for RTS based on your existing live stream for quick use.
Demonstration
Use case
Taobao Live: Taobao Live has evolved into a new industry for e-commerce in the modern era. Merchants, streamers, and consumers have all embraced the platform. Currently, Taobao Live uses RTS at a large scale. RTS helps Taobao Live reduce latency, minimize buffering, and support tens of millions of concurrent users, boosting its business conversion efficiency.
Implementation
Prerequisites
-
Ensure that ApsaraVideo Live is activated. If not, activate it now.
-
An ingest domain must be associated with a streaming domain. For more information, see Associate an ingest domain with a streaming domain.
Limitations
-
Web RTS SDK limitations: The SDK does not support video streams that contain B-frames or audio streams that use AAC encoding. If you enable RTS and select Sub-second latency (400ms-800ms end-to-end), the system automatically transcodes streams that contain B-frames or use AAC audio to ensure compatibility. This process incurs a live stream transcoding fee.
-
Player requirements: RTS uses the UDP protocol, and the player version requirements are shown in the table below:
Player type
Description
ApsaraVideo Player SDK
Version 5.4.5.0 or later
ApsaraVideo Player SDK
Version 2.0.3 or later
Configuration
-
Log in to the ApsaraVideo Live console.
-
In the left-side navigation pane, choose Live + > RTS.
-
Select a streaming domain.
-
Enable the RTS toggle and select Sub-second (End-to-End Latency: 400-800 ms).
-
To deploy in a production environment, you can integrate the SDK or follow the RTS signaling protocol.
NoteYou can enable both RTS and standard live streaming (RTMP, FLV, and HLS) on a single playback domain. You can differentiate between them by using the playback URL.
-
An example of a playback URL for RTS is:
artc://PlaybackDomain/AppName/StreamName?AuthenticationString. -
Example of a standard live streaming playback URL:
rtmp://{streaming_domain}/{AppName}/{StreamName}?{auth_string}.
-
Verification
This topic describes how to use the OBS stream ingest tool (For more information, see OBS introduction and download) and the Alibaba Cloud RTS mobile demo to perform verification.
Step 1: Generate ingest and playback URLs
Generate authenticated ingest and playback URLs. For detailed instructions, see URL Generator. In the ApsaraVideo Live console, navigate to the URL Generator page. Select a Streaming Domain and its Associated Ingest Domain. Enter an AppName and a StreamName. Configure the Authentication Method, for example, Type A with a 30-minute validity period. You can also select a transcoding template. Click Generate. The system generates ingest URLs in RTMP and RTS formats and playback URLs for the original stream in RTMP, FLV, M3U8, and RTS formats.
Step 2: Ingest stream with OBS
-
Open OBS Studio. In the settings, select Stream. In the Server field, enter the generated ingest URL. Example:
rtmp://***push1.ialicdn.com/test***/test?auth_key=1643******-0-0-a922892e06ee18016640e0fe14******. -
In the settings, select Output. Set Keyframe Interval to 3 seconds or less, and set the Profile to
baseline. Return to the main screen, select a video source, and start streaming.NoteThese settings help achieve an ultra-low latency of 700–900 ms.
Step 3: Play the RTS stream
This section describes how to use the mobile demo app for playback verification.
The mobile demo app is available only for Android 4.3 and later. For information about other verification tools and demos, see Demo Center.
Scan the QR code to install the ApsaraVideo Player SDK demo app, for example, v6.14.0. On the homepage, select Live and then RTS. In the Playback URL field, enter the RTS playback URL. Click Start to begin playback.
Billing
Billing rules
Unlike standard live streaming, RTS is billed according to a new pricing system as follows:
-
You are billed based on the RTS billable item, and are not additionally charged for the standard live streaming billable item.
-
The billing methods for RTS are the same as those for standard live streaming: billing by data transfer and billing by bandwidth.
-
When the billing method for standard live streaming is changed, the RTS billing method is also updated accordingly.
For more information about billing for RTS, see Billing for Ultra-Low Latency Live Streaming.
Promotional offers
For more information, see Free trial for RTS!
-
Enterprise users with real-name registration can receive a 10 TB free package. Individual users with real-name registration can receive a 1 TB free package.
-
Each Alibaba Cloud account (UID) is eligible for one free trial package. To use the free package, you must select the pay-by-data-transfer billing method.
FAQ
Can standard live streaming and RTS be used simultaneously for the same live stream?
Yes. For a single live stream, separate playback URLs are generated for standard live streaming and RTS. For example, standard live streaming uses rtmp://PlaybackDomain/AppName/StreamName?AuthenticationString for playback, and RTS uses artc://PlaybackDomain/AppName/StreamName?AuthenticationString for playback.
Can I use a self-developed SDK to access RTS?
Yes. You must follow the specifications of the Alibaba Cloud RTS signaling protocol.
RTS: Which browsers are supported for playback?
RTS allows access via standard WebRTC, which enables playback in any WebRTC-compatible browser. For more information about browser compatibility, see Browser compatibility with WebRTC.