ApsaraVideo VOD provides media processing features such as transcoding, snapshots, and automated review. Workflows let you combine these features into custom processing pipelines in the console.
What is a workflow
A workflow streamlines and modularizes media processing tasks. You can pre-configure a custom processing pipeline and apply it to your videos, eliminating repetitive API calls.
What's new
The new version of workflows includes core ApsaraVideo VOD nodes and adds Intelligent Media Services (IMS) nodes for video translation, subtitle extraction, subtitle removal, and logo removal. It also supports task queries and workflow task callbacks. More feature nodes will be added to meet evolving business needs.
Feature comparison
✔️ indicates that a feature is supported, ❌ indicates that it is not, and — indicates that the feature is not applicable.
|
Category |
Feature |
Previous version |
New version |
|
ApsaraVideo VOD nodes |
video transcoding |
✔️ |
✔️ |
|
video snapshot |
✔️ |
✔️ |
|
|
video animation |
✔️ |
✔️ |
|
|
automated review/deduplication |
✔️ |
❌ |
|
|
Intelligent Media Services nodes |
video translation |
❌ |
✔️ |
|
subtitle extraction |
❌ |
✔️ |
|
|
subtitle removal |
❌ |
✔️ |
|
|
logo removal |
❌ |
✔️ |
|
|
Workflow task query |
— |
❌ |
✔️ |
|
workflow callback |
Workflow task callback events |
❌ |
✔️ |
|
Individual workflow callback settings |
❌ |
✔️ |
|
|
Individual node task callback |
✔️ |
❌ |
|
|
Media ID-level callback (userdata) |
✔️ |
❌ |
Limitations
-
The video translation, subtitle extraction, and subtitle removal nodes are available only in the China (Shanghai), China (Beijing), China (Shenzhen), and Singapore regions. The logo removal node is available only in the China (Shanghai), China (Beijing), and Singapore regions. ApsaraVideo VOD nodes are available in all regions.
-
To use ApsaraVideo VOD and Intelligent Media Services nodes, you must activate ApsaraVideo VOD and Intelligent Media Services separately.
Use cases
-
Serial: Translation and transcoding
This workflow first translates a video and then transcodes the output. For configuration details, see the Workflow configuration example section. The node configuration is: Start → video translation → video transcoding → End. Video data is passed between the nodes.
-
Parallel: Subtitle removal and transcoding
This workflow runs subtitle removal and transcoding simultaneously. It branches from the Start node into two parallel paths: subtitle removal and video transcoding. Both paths merge at the End node when the tasks are complete.
-
Parallel: Source file distribution and transcoding
This workflow distributes the source file as one playback stream while transcoding it to create other renditions based on a specified transcoding template.
This workflow uses two video transcoding nodes. The upper node must be configured with a no-transcoding template group ID to distribute the source file. The lower node must be configured with a transcoding template group ID to output other renditions.
How it works
Before you begin, you must configure a workflow in the console.
-
Specify the workflow ID when requesting an upload URL and credentials. ApsaraVideo VOD returns the URL and credentials.
-
Upload the video.
-
The workflow is automatically triggered after the upload is complete.
-
The ApsaraVideo VOD workflow engine automatically performs media processing and video AI tasks according to the workflow configuration.
-
When all tasks are finished, the workflow ends, and the service sends a callback notification.
How to use
-
Create a workflow.
Currently, you can create workflows only in the ApsaraVideo VOD console.
-
Initiate a workflow task.
You can initiate a workflow task either during or after video upload.
In the console
During upload
-
Log on to the ApsaraVideo VOD console.
-
In the left-side navigation pane, choose Media Files > Audio/Video, and then click Upload Audio/Video.
-
Click Add Audio/Video, configure parameters such as the upload method and bucket, select Use Workflow and then select your workflow.
For more information about supported upload formats and parameter descriptions, see Upload files in the console.
-
After adding the media files to be uploaded, click Upload.
After upload
-
Log on to the ApsaraVideo VOD console.
-
In the left-side navigation pane, choose Media Files > Audio/Video.
-
In the audio/video list, find the media file you want to process and click Processing in the Actions column.
-
In the Media Processing dialog box, select Use Workflow as the processing type. In the Use Workflow drop-down list, select your target workflow, such as test.
-
Click OK.
Using API
During upload
NoteThe CreateUploadVideo operation only returns an upload URL, credentials, and basic media asset information. It does not upload the media file. You must implement the upload logic. For a complete example of how to upload files by using the API, see Upload media files by calling the ApsaraVideo VOD API.
-
When you call the CreateUploadVideo or UploadMediaByURL operation to upload a media file, set the
WorkflowIdparameter to your workflow's ID. After the upload is complete, the system automatically processes the file based on the specified workflow.
After upload
-
To process a media file that has already been uploaded, call the SubmitWorkflowJob operation. Set the
WorkflowIdparameter to your workflow ID to immediately start the processing task.
-
Configuration examples
Serial translation and transcoding
This example shows how to configure a serial workflow that translates a video and then transcodes it.
-
On the workflow editing page, click the + icon to the right of the Start node to add a video translation node. Configure its parameters in the panel that appears on the right.
-
Click the + icon to the right of the translation node to add a video transcoding node. In the right-side panel, select a transcoding template group.
NoteFor information about how to configure a transcoding template group, see Transcoding templates.
-
After you finish configuring the workflow topology, click OK. The system generates a workflow ID. Save this ID to apply the workflow to future uploads. After you create the workflow, you can view it in the workflow list with its name, ID, and creation time. In the Actions column, click Details to view the workflow configuration or click Delete to remove it.
Parallel subtitle extraction and transcoding
To run subtitle extraction and transcoding in parallel, add two child nodes—subtitle extraction and video transcoding—after the Start node. In the workflow editor, the Start node branches into two parallel paths connected by Video lines. The top path contains the subtitle extraction node (VodCaptionExtraction), and the bottom path contains the video transcoding node (VodTranscode). Both paths converge at the End node, connected by Subtitle and Video lines respectively.