Before you can use the short video demo, you must configure the required templates in the ApsaraVideo VOD (VOD) console. This topic describes how to configure the settings in the VOD console.

Prerequisites

  • An Alibaba Cloud account is created and real-name verification is complete. To create an Alibaba Cloud account, visit the Alibaba Cloud official website. For more information about how to create an Alibaba Cloud account, see Create an Alibaba Cloud account.

  • ApsaraVideo VOD is activated. For more information, see Activate ApsaraVideo VOD.

  • A domain name for Alibaba Cloud Content Delivery Network (CDN) is added in the ApsaraVideo VOD console. For more information, see Add a domain name for CDN.

  • The content saved on the origin server of the accelerated domain name is reviewed. You can specify an Object Storage Service (OSS) bucket or a bucket allocated to ApsaraVideo VOD as the origin server. If the content on your origin server is not stored on Alibaba Cloud, submit a request on Yida.

Configure settings in the VOD console

  1. Configure a transcoding template group.

    You must configure a transcoding template group for the short video demo to ensure user experience and resource security. For example, you can configure a transcoding template group that contains a template for low definition (LD) transcoding without watermarks and a template for standard definition (SD) transcoding with watermarks. For more information about how to configure transcoding template groups, see Configure normal transcoding template groups.

    • To create a template of LD transcoding without watermarks, select Low Definition from the Definition drop-down list, turn off Watermark, and then click Save. Templates without watermarks
    • To create a template of SD transcoding with watermarks, select Standard Definition from the Definition drop-down list, turn on Watermark, select Default Watermark from the Watermark drop-down list, and then click Save. Templates with watermarks
    Note
    • The short video demo supports Narrowband HD transcoding. To use Narrowband HD transcoding, configure a transcoding template group that contains a Narrowband HD transcoding template.

    • You must add the IDs of transcoding template groups to the source code configuration file of your server. We recommend that you save the IDs for subsequent operations. For more information, see Build the short video AppServer.

  2. Configure callback settings.

    The short video demo supports callbacks for transcoding, snapshot capture, video AI processing, and automated review. In the short video demo, HTTP requests are used to send callback notifications. If a callback event is triggered, VOD sends an HTTP POST request to the URL that you specify in the VOD console. The content of the notification is included in the HTTP message body. The short video demo provides the basic logic based on which callbacks are processed. You can set the callback URL to the URL of the Elastic Compute Service (ECS) instance for which the callback service is configured to process callbacks. You can also deploy an independent HTTP server to receive and process callback messages. For more information, see Configure callbacks.

    1. Select HTTP Request as Callback Method.
    2. Set Callback URL to the URL of the ECS instance for which the callback service is configured. The source code in the short video demo provides the basic logic based on which callbacks are processed.

      Example: http://<Public IP address of the ECS instance>:8080/vodcallback/callback

    3. If you use the short video demo, you must select the following callback events: Single Transcoding Task Completed, All Transcoding Tasks Completed, Screenshot Created, AI Processing Completed, Live Stream Recording Completed, Create Audit Completed, and Clip Synthesis Completed. You can also select other events based on your business requirements. If an event that your selected is triggered, VOD sends an HTTP POST request to the specified URL. Configure callback settings
    4. Configure callback authentication.

      If you set Callback Method to HTTP Request, we recommend that you configure callback authentication. You can add a specific signature header to each HTTP or HTTPS callback request. This way, the server that receives callback notifications can verify the signature to prevent malicious or invalid requests.

      Turn on Callback Authentication, enter a custom authentication key in the Authentication key field, and then click OK. Callback configurations
    Note
    • The callback URL and authentication key must be added to the source code configuration file of the server. We recommend that you save the callback URL and authentication key for subsequent operations. For more information, see Build the short video AppServer.

    • Make sure that the values of the Callback URL, Events, and Callback Authentication parameters are correct. Otherwise, callbacks may fail to be processed. For example, a video may be stuck in the Reviewing or Transcoding state.

  3. Configure download settings.
    To allow users to download videos, you must enable the download feature. For more information, see Configure offline download.
    Important If the download feature is disabled and a mobile user clicks to download a video, the "Download switch is off" error message is displayed.