All Products
Search
Document Center

ApsaraVideo Live:Run demos

Last Updated:Aug 28, 2024

ApsaraVideo Live provides Real-Time Streaming (RTS) demos for mobile and web clients. We recommend that you use the RTS demo for mobile clients to try the RTS feature. This topic describes how to run RTS demos.

Prerequisites

Environment requirements

The following table describes the requirements for different operating systems.

Operating system

Requirement

iOS

iOS 9.0 or later

Android

Android 4.3 or later

Procedure

  1. Ingest a stream.

    Method 1: Ingest a stream over Real-Time Messaging Protocol (RTMP) by using OBS. For more information, see Live stream ingest.

    Method 2: Ingest a stream over WebRTC-HTTP ingestion protocol (WHIP) by using OBS. For more information, see Use OBS to ingest an RTS stream (based on WHIP).

    Method 3: Ingest an RTS stream by using the RTS demo for web.

    1. Access the RTS player for web.

    2. Click the Stream Ingest tab.

    3. Expand the none drop-down list and select camera or screen based on your business requirements.

      If you select camera, click Get devices in the lower part of the page and grant access permissions on the microphone and camera. Then, select your microphone and camera from the Select Microphone and Select Camera drop-down lists.

      image.png

    4. Click Create Local Stream.

    5. Enter the generated ingest URL in the RTS format. Example: artc://example.aliyundoc.com/liveApp****/liveStream****?auth_key=1543302081-0-0-9c6e7c8190c10bdfb3c0****.

    6. Click Start.

    Note

    If you encounter issues such as stream ingest exceptions during stream ingest, you can use the troubleshooting tool to troubleshoot the issues. The tool allows you to diagnose common stream ingest issues and provides suggestions for you to resolve specific exceptions. For more information, see Troubleshooting.

  2. Play an RTS stream.

    Method 1: Play an RTS stream on a mobile client

    1. Scan the following QR code to install the demo of ApsaraVideo MediaBox SDK. If a URL is provided after you scan the QR code, copy the URL to your browser to download and install the demo.

      二维码

    2. In the demo, tap Live Push > RTS. Enter the streaming URL of the RTS stream or scan the QR code of the stream.

      Note

      Before you use the demo on an iOS device, go to Settings > General > Device Management, find the permissions required by Taobao, and tap Trust.

    3. Click Start Playback to play the RTS stream.

    Method 2: Play an RTS stream by using the RTS demo for web

    1. Access the RTS player for web.

    2. Click the Stream Pulling tab.

    3. Enter the streaming URL of the RTS stream.

      003

      Note
      • The browsers implement security policies for Web Real-Time Communication (WebRTC). Make sure that an HTTPS certificate is configured for the streaming domain of your RTS stream. Otherwise, the stream may fail to play.

      • Web RTS SDK does not support videos that contain B-frames and audio that is encoded in the AAC format. If the video or audio of your stream does not meet this requirement, transcode the stream and use the URL of the transcoded stream as the streaming URL. For more information about transcoding, see Configure RTS transcoding.

    4. Click Start to play the RTS stream.

Note

If you encounter issues such as playback exceptions during streaming, you can use the troubleshooting tool to troubleshoot the issues. The tool allows you to diagnose common stream playback issues and provides suggestions for you to resolve specific exceptions. For more information, see Troubleshooting.