ApsaraVideo VOD (VOD) allows you to configure callback settings. After callback settings are configured, VOD notifies you of the progress and video status immediately after a video processing operation, such as upload or transcoding, is complete. VOD supports HTTP callbacks and Alibaba Cloud Message Service (MNS) callbacks.

Limits

ApsaraVideo VOD supports multiple storage regions. The event notification configurations among regions are independent of each other. You can use different callback methods and callback URLs for different regions. You can upload videos to different regions. After a video is processed, such as uploaded or transcoded, ApsaraVideo VOD notifies you of the processing results based on the callback settings for the region.

Configure HTTP callbacks

  1. Log on to the ApsaraVideo VOD console.
  2. In the left-side navigation pane, choose Configuration Management > Media Processing > Callback.
  3. On the Callback page, click Modify. In the Callback dialog box, select HTTP Request for Callback Method.
  4. Specify the callback URL and events for which you want to configure callbacks. Then, click OK.
    The following table describes the callback parameters.
    Parameter Description
    Callback URL

    The URL for receiving callback messages. When a callback event is generated, ApsaraVideo VOD sends an HTTP POST request to the URL.

    The URL can be up to 256 bytes in length. You can specify only one URL.

    Events The events for which you want to configure callbacks. Select the events based on your business requirements. For more information about the events supported in ApsaraVideo VOD and event notification content, see Events.
    Note If you select AI Processing Completed, notifications are sent for all AI events such as AIMediaAuditComplete, AIMediaDNAComplete, and AIVideoTagComplete.

Configure MNS callbacks

Prerequisites

  • ApsaraVideo VOD is authorized to access Message Service (MNS). To authorize ApsaraVideo VOD to access MNS, go to the Cloud Resource Access Authorization page.
  • A queue exists in MNS. If no queue exists in MNS, create a queue. For more information, see Create a queue.

Procedure

  1. Log on to the ApsaraVideo VOD console.
  2. In the left-side navigation pane, choose Configuration Management > Media Processing > Callback.
  3. On the Callback page, click Modify. In the Callback dialog box, select MNS Queue for Callback Method.
  4. Specify the region, queue, and events for which you want to configure callbacks. Then, click OK.
    The following table describes the callback parameters.
    Parameter Description
    Region

    Select the region where the video for which you want to configure event notifications is stored. We recommend that you select the region where the MNS queue is created.

    Queue

    Select the queue in the region.

    Note If no queue exists, create an MNS queue. For more information, see Create a queue.
    Events The events for which you want to configure callbacks. Select the events based on your business requirements. For more information about the events supported in ApsaraVideo VOD and event notification content, see Events.
    Note If you select AI Processing Completed, notifications are sent for all AI events such as AIMediaAuditComplete, AIMediaDNAComplete, and AIVideoTagComplete.

What to do next

After you configure HTTP callbacks or MNS callbacks, you can perform operations, such as audio, video, or image uploads, to trigger the events. You can also submit media processing jobs, such as transcoding jobs and snapshot jobs, to trigger the events. After an HTTP callback is triggered, you can view the event notification in the callback service that you deployed. After an MNS callback is triggered, you must receive the message in MNS and view the notification content. For more information, see HTTP callbacks and MNS callbacks.

References