All Products
Search
Document Center

ApsaraVideo Live:Run demos

Last Updated:Dec 06, 2023

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 experience the RTS feature. This topic describes how to run RTS demos.

Prerequisites

  • A signed ingest URL is generated. For more information, see Generate ingest and streaming URLs.

  • The RTS feature is enabled. For more information, see Enable RTS.

  • Open Broadcaster Software (OBS) is downloaded and installed. For more information, see OBS.

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

    1. Launch OBS.

    2. In the menu bar, choose File > Settings.

    3. On the Settings page, click Stream. Enter the generated ingest URL in the RTMP format in the Server field. Example: rtmp://example.aliyundoc.com/liveApp****/liveStream****?auth_key=1543302081-0-0-9c6e7c8190c10bdfb3c0****.

      001

      Note
      • The ingest URL consists of an ingest domain, application name, stream name, and token. Replace them based on your business requirements.

      • You can specify a value for Stream Key or leave the field empty.

    4. In the left-side navigation pane, click Output. Set the Keyframe Interval parameter to a value less than or equal to 3 and the Profile parameter to baseline.

      002

    5. In the left-side navigation pane, click Advanced. Select Dynamically change bitrate to manage congestion in the Network section.

    Method 2: Ingest a stream over RTS 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 box 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, respectively. After the authorization is successful, click the Select Microphone and Select Camera drop-down boxes to select your microphone and camera.

      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 RTS demo. Alternatively, you can copy the URL that is displayed after you scan the QR code to your browser to download and install the demo.

      二维码

    2. Open the RTS demo and scan the QR code or enter the streaming URL of the RTS stream.

      Note

      Before you use the RTS demo on an iOS device, tap Settings > General > Device Management. On the page that appears, find the permissions required by Taobao and tap Trust.

    3. Click Start 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
      • Make sure that an HTTPS certificate is configured for the streaming domain of your RTS stream due to the Web Real-Time Communications (WebRTC) security policy of browsers. 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 in 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.