Overview

To use ApsaraVideo Live to implement live streaming, you must use a stream ingest tool or Push SDK to ingest a Real-Time Messaging Protocol (RTMP)-based stream to a live center of ApsaraVideo Live. The domain name of the live center is video-center.alivecdn.com. For more information about how to ingest a stream, see Ingest the stream. However, you may encounter issues that cause stream ingest failures. This topic describes common causes that lead to the failure of stream ingest. We recommend that you check whether these causes exist when stream ingest fails.

Common causes

  • Settings on the stream ingest client are invalid.
    • Check whether the Server and Stream Key parameters that you specified in the stream settings are correct.
      Note In this topic, the stream settings of Open Broadcaster Software (OBS) are explained. If you use other stream ingest tools, check their stream settings.
      The Server parameter consists of the ingest domain and the AppName field. The Stream Key parameter consists of the StreamName and QueryString fields. If the URL signing feature is enabled, the QueryString field must include the vhost and auth_key attributes. If the URL signing feature is disabled, the QueryString parameter needs to include only the vhost attribute. Server and stream key
    • Check the stream settings of your stream ingest tool. Common stream ingest tools include OBS, FFmpeg, and Adobe Flash Media Live Encoder (FMLE). When stream ingest fails, we recommend that you use another tool to ingest the stream again. If the stream can be ingested, check whether the stream settings of your original stream ingest tool are correct.
      Note For more information about the stream settings of OBS, see OBS.

      If a stream can be ingested by using another stream ingest tool, the stream settings of your original stream ingest tool may be invalid. In this case, you can compare the stream settings of your original stream ingest tool with those of the stream ingest tool used for testing, adjust your stream settings, and then ingest the stream again.

  • The encoding format of the video or audio is invalid.

    ApsaraVideo Live supports only H.264 video streams and Advanced Audio Coding (AAC) audio streams. Make sure that the video and audio encoding formats of your streams meet the requirements. Otherwise, specific streaming protocols may cause problems during live streaming.

    To use FFmpeg to view the encoding formats of your streams, run the following command:

    ffmpeg -i rtmp://[$Your_Domain]/[$App_Name]/[$Stream_Name]
    • [$Your_Domain]: the ingest domain.
    • [$App_Name]: the AppName field in the ingest URL.
    • [$Stream_Name]: the StreamName field in the ingest URL.
    Check whether the encoding formats of your streams meet the requirements. Stream encoding formats
  • The number of concurrent streams that are ingested exceeds the upper limit.

    ApsaraVideo Live restricts the number of domain names that can be created within each Alibaba Cloud account and the number of concurrent streams that can be ingested for each domain name. Up to 20 domain names can be created within each Alibaba Cloud account. For live centers of the China (Beijing), China (Shanghai), China (Shenzhen), and Singapore regions, each accelerated domain name supports up to 50 concurrently ingested source streams that are not transcoded by default. For live centers of other regions, each accelerated domain name supports up to 20 concurrently ingested source streams that are not transcoded by default. If the number of concurrent source streams that are ingested exceeds the limit, stream ingest fails.

    If real-time transcoding is configured for the specified application, for live centers of the China (Beijing), China (Shanghai), China (Shenzhen), and Singapore regions, each domain name supports up to 50 concurrently ingested transcoded streams. For live centers of other regions, each domain name supports up to 10 concurrently ingested transcoded streams. If the number of concurrent transcoded streams that are ingested exceeds the limit, stream ingest fails.

    For more information about how to view the number of concurrent streams that are ingested, see Manage streams.

  • The stream is blocked.

    ApsaraVideo Live allows you to block specific streams by specifying the AppName and StreamName parameters. You can block a stream by adding the ingest URL of the stream to the blacklist. When you fail to ingest a stream, check whether the ingest URL of the stream is in the blacklist.

    To remove an ingest URL from the blacklist, you can perform the following operations:
    • Log on to the ApsaraVideo Live console. On the Stream Management page, click the Disabled Streams tab. Then, find the stream and click Enable in the Actions column.
    • You can also call the ResumeLiveStream operation to remove the ingest URL of the stream from the blacklist.
  • The URL signing failed.

    After you enable the URL signing feature, ingest and streaming URLs are valid only when they are appended with a valid auth_key field. If the auth_key field expires or the signature is invalid, stream ingest fails. For more information, see URL signing.

  • The network is abnormal.

    To implement live streaming, you must ingest a RTMP-based stream to a live center of ApsaraVideo Live. If the network is abnormal during the process, stream ingest may fail. We recommend that you use the following methods to test the network connection:

    • Run the ping command to ping the ingest URL and check whether packet loss occurs. If packet loss occurs, contact the network operator to troubleshoot the issue.
    • Run the telnet command to check whether the port 1935 of the ingest domain can be connected. If the connection fails, run the connection test in different network environments to check whether the on-premises network is abnormal.

  • The timestamps of stream ingest contain extended fields.

    The stream ingest client generates two timestamps for each video or audio frame. The pkt_pts timestamp indicates when a frame is played, and the pkt_dts timestamp indicates when a frame is decoded. You can run the ffprobe command to view the timestamps. The complete command is ffprobe -show_frames rtmp://live.zhibotest.com/AppName/StreamName. The following figure shows part of the result that is displayed after you run the ffprobe command.

    A timestamp can be converted to a binary value. If the binary value exceeds 24 bits, check whether the video frame is greater than the maximum size and whether the video frame contains multiple chunks. If so, modify the settings of your stream ingest client to add timestamps to each chunk. To resolve this issue, you can also forcibly reduce the value of PTS.

  • Others

    If the failure is not caused by the preceding causes, submit a ticket. For more information, see Contact us. After you submit a ticket, technical support engineers of Alibaba Cloud will help you resolve the issue. You must include the following information in your ticket:

    • The ingest URL and streaming URL.
    • The information about what stream ingest tool is used and how you ingest the stream.
    • The error message that is displayed on the stream ingest client.
    • The screenshot of the command output when you ping the IP address of the ingest URL.
    • The screenshot of the command output when you use Telnet to connect the port 1935 of the ingest domain.