Before using the Short Video Demo, configure the required settings, such as templates, in the ApsaraVideo VOD (VOD) console.
Prerequisites
-
An Alibaba Cloud account is created and identity verification is complete. To create an Alibaba Cloud account, visit the Alibaba Cloud official website. For more information, 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 an accelerated domain name.
-
You can store content for your accelerated domain name in VOD storage or OSS. If your origin server is not hosted on Alibaba Cloud, submit a Yida request for assistance before you proceed.
Configuration
-
Configure a transcoding template group.
For the Short Video Demo, create a transcoding template group to ensure a good user experience and resource security. For example, the group can include a template for Low Definition videos without watermarks and another for Standard Definition videos with watermarks. For detailed instructions, see Transcoding templates.
-
To configure a template for Low Definition videos without a watermark, set Definition to Low Definition, turn off Watermark, and click Save.
-
To configure a template for Standard Definition videos with a watermark, set Definition to Standard Definition, turn on Watermark, use the default watermark template for Watermarks, and click Save.
Note-
The Short Video Demo supports Narrowband HD transcoding. To try this feature, create a separate transcoding template group and configure a Narrowband HD transcoding template within it.
-
You must add the transcoding template group ID to your server's source code configuration file. We recommend that you save the ID locally for easy access. For more information, see Server-side integration.
-
-
Configure callback settings.
The Short Video Demo uses callbacks and HTTP requests to notify your server about events such as transcoding, screenshots, video AI processing, and automated review. After you configure a callback URL in the console, the VOD server sends an HTTP POST request to this URL when a specified event occurs. The request body contains the event details. While the Short Video Demo server provides basic callback handling, you can set the callback URL to your ECS server's address or deploy a separate HTTP server to process these messages. For detailed instructions, see Callback settings.
-
Set the callback method to HTTP request.
-
Set the callback URL to the callback service address of your ECS server to use the built-in callback logic from the Short Video Demo's server-side source code.
Example: http://<public IP address of your ECS instance>:8080/vodcallback/callback.
-
For 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 select other events as needed. When a selected event occurs, VOD sends an HTTP POST request to your callback URL to notify your server.
-
Configure callback authentication.
For HTTP callbacks, configure callback authentication. This feature adds a signature header to callbacks, allowing your server to verify the signature and prevent unauthorized requests.
Turn on the Callback Authentication switch, set a custom authentication key, and click OK.
Note-
You must add the callback URL and authentication key to the server's source code configuration file in a later step. We recommend that you save this information locally for easy access. For more information, see Server-side integration.
-
Incorrectly configuring the callback URL, callback events, or callback authentication causes processing failures, such as videos becoming stuck in the 'Reviewing' or 'Transcoding' state.
-
-
Download settings.
Enable the offline download feature to allow users to download videos. For detailed instructions, see Offline download.
ImportantIf this feature is disabled, users who try to download a video on a mobile device will see the message 'Download switch is off'.