The stream ingestion and interruption callbacks allow you to learn the status of a live stream in real time and the result of stream ingestion or interruption.

You can log on the ApsaraVideo Live console and add the URL of your backend server for receiving stream ingestion and interruption callbacks. When the status of a stream changes, ApsaraVideo Live sends an HTTP GET request to your server to inform you of the latest status in real time, such as successful stream ingestion or interruption.

Restrictions and guidelines

  • ApsaraVideo Live sends HTTP GET requests to your server to inform you of the stream ingestion or interruption result in real time. If the requests are successful, the server returns responses with HTTP status code 200.

    When a request times out, ApsaraVideo Live resends the request. The request timeout is five seconds and the maximum retries is five. The request resend interval is one second.

  • You must use a CA issued HTTPS certificate when the callback URL is an HTTPS URL.
  • For edge ingestion that uses an ingest domain name and streaming domain name, the callback setting is configured under the ingest domain name. For live center ingestion that only uses a streaming domain name, ApsaraVideo Live will generate a live center ingest URL. This URL can be used to ingest streams to the live center. The callback setting is configured under the streaming domain name. This topic describes how to configure the callback setting when edge ingestion is used.

Procedure

  1. Log on to the ApsaraVideo Live console.
  2. ClickDomain Management.
  3. Select the target streaming domain name, and then click Domain Settings.
  4. Choose Basic Settings > Stream Ingest Information, and then click Not Configured in the Callback URL area under the edge ingest URL.
    Note If you use live center ingestion, set the Callback URL on the Live Center Ingest Information page.
  5. In the Configure Callback URL dialog box, enter the callback URL.

Example:

 https://live.aliyunlive.com/pub? action=publish & app=xc.cdnpe.com & appname=test01 & id=test01 & ip=42.120.74.183 & node=cdnvideocenter010207116011.cm3
Parameter Description
time A Unix timestamp.
usrargs User customized ingest parameters.
action Set the action to publish to ingest streams and set the action to publish_done to interrupt streams.
app By default, this parameter is set to the specified ingest domain name. This parameter is set to the streaming domain name if no ingest domain name is bound to the streaming domain name.
appname The name of the application.
id The name of the stream.
Note The stream name must be in lowercase.
node The CDN node or server that the stream is ingested to.
IP The IP address of ingest client.