All Products
Search
Document Center

ApsaraVideo Live:FAQ about RTS

Last Updated:Dec 26, 2023

This topic provides answers to some commonly asked questions about Real-Time Streaming (RTS).

Can I use standard streaming and RTS to watch a live stream at the same time?

Yes. A standard streaming URL and an RTS URL are provided for each live stream. For example, the URL for Real-Time Messaging Protocol (RTMP)-based standard streaming is rtmp://${Streaming domain}/AppName/StreamName?${Access token}, and the URL for RTS is artc://${Streaming domain}/AppName/StreamName?${Access token}.

Can I integrate RTS into my own SDK?

Yes. You must follow the specifications of the RTS signaling protocol. For more information, see Specifications of WebRTC signaling used to access GRTN.

Why am I unable to play a live stream by using Web RTS SDK?

Due to the restrictions of native browsers on Web Real-Time Communications (WebRTC), the following limits apply when you use Web RTS SDK:

  • Videos that contain B-frames are not supported. Frame skips may occur during the playback.

  • Audio that is encoded in the AAC format is not supported. Noise may occur during the playback.

If you are not sure whether the live stream contains B-frames or whether the audio is in the AAC format, log on to the ApsaraVideo Live console, go to the RTS page of the domain name, and then turn on the Auto Transcoding for HTML5 Playback switch to remove B-frames and convert the AAC format.

Note
  • The switch is displayed in the Enable RTS dialog box after you turn on RTS.

  • After you turn on Auto Transcoding for HTML5 Playback, the system automatically removes B-frames and performs Opus transcoding. You do not need to configure an RTS transcoding template. If you already configured an RTS transcoding template, both the Auto Transcoding for HTML5 Playback feature and the transcoding template take effect. However, the transcoding is billed only once.

Why is the latency still high when I use RTS?

RTS provides millisecond-level live streaming latency. If the latency is obviously higher than 1 second, perform the following steps to troubleshoot the issue.

  • Step 1: Check the network status for stream ingest.

    Log on to the ApsaraVideo Live console. In the left-side navigation pane, choose Monitoring > Real-time Monitoring.

    Enter the AppName and StreamName of the ingested stream, and check whether information such as the frame rate, bitrate, and timestamp is normal.

  • Step 2: Obtain the RTS TraceID and submit a ticket to contact technical support personnel.

    If the frame rate, bitrate, and timestamp are normal but the issues of high latency and stuttering persist, use the player demo to play the stream and obtain the TraceID. For more information, see Obtain an RTS TraceID by using RTS demos. Then, submit a ticket to contact Alibaba Cloud technical support. For more information, see Contact us.

What do I do if HLS-based and FLV-based playback has no sound when I use RTS to ingest a stream on the web?

When you use RTS to ingest a stream on the web, the Opus codec is used for audio. Therefore, playback based on Flash Video (FLV) and HTTP Live Streaming (HLS) is not supported. We recommend that you ingest the stream over RTMP and play the stream over RTS. This way, FLV-based and HLS-based playback is supported.

What do I do if I cannot use RTS to play a video in the browser when I use H.265 for stream ingest?

The native WebRTC of the browser does not support H.265. You must ensure that H.264 is used for stream ingest. You can also use Alibaba Cloud services to transcode the H.265 stream to an H.264 stream for playback.

Which browsers are compatible with RTS?

For information about browsers that are compatible with RTS, see Supported browser versions.

How do I solve the problem that QQ Browser on some Android devices fail to pull and ingest streams?

Some Android devices, such as Huawei P20 and vivo iQOO, may fail to start the X5 kernel after you install QQ Browser and open the browser for the first time. As a result, the WebRTC compatibility issue occurs and streams cannot be pulled and ingested. The following error message is reported: Failed to execute 'setRemoteDescription' on 'RTCPeerConnection. If you encounter this problem, perform the following steps to make sure that the X5 kernel is initialized:
  1. Connect to a WI-FI network.
  2. Refresh the page and wait about 30 seconds.
  3. Restart the browser and visit the page again. The problem is solved.

Why do some browsers not support Web RTS SDK?

A browser does not support Web RTS SDK due to one of the following reasons:
  • The browser does not implement WebRTC-related API operations, or implement the API operations in a flawed manner. For example, Microsoft Internet Explorer and UC Browser.
  • The browser supports WebRTC-related API operations. However, the browser supports VP8 encoding but does not support H.264 encoding. For example, the built-in browser of some Android devices.

Why does Safari on iOS report the error message "Failed to set remote answer sdp"?

Problem description: The following error message is displayed.
Failed to set remote answer sdp: The order of m-lines in answer doesn't match order in offer.

Analysis: You integrated other WebRTC SDKs, which causes webrtc-adapter conflicts. To prevent the issue, RTS SDK excludes the adapter from V2.2.4. You can use RTS SDK V2.2.4 or later with other WebRTC-related SDKs.

  • You can use JavaScript to directly integrate RTS SDK V2.2.4 or later.
  • If you want to use npm to integrate RTS SDK, compile the following code:
    import { AliRTS } from 'aliyun-rts-sdk/dist/aliyun-rts-sdk-without-adapter.js';
    In the TypeScript project, you must declare the module to obtain type support.
    // Create file typings.d.ts in the root directory of the project.
    declare module 'aliyun-rts-sdk/dist/aliyun-rts-sdk-without-adapter.js' {
      import {AliRTS} from 'aliyun-rts-sdk';
      export {AliRTS}
    }