edit-icon download-icon

Workflow activity introduction

Last Updated: Apr 18, 2018

Workflow activity types are listed as follows

Start, Transcode, Snapshot, Analysis, Cover, Summary, Censor, Report, UploadVerify, GenerateMasterPlayList, AudioGroup, SubtitleGroup and PackageConfig.

This document introduces the parameters supported by the following activity types:

1. Start activity

You can set the trigger conditions and overall configurations of the Media workflow. This activity acquires media information. If the acquisition fails, directly jump to perform Report activity.

Name Type Required Description
InputFile String Yes Input position.
For example: {“Bucket”: “example-001”,”Location”: “oss-cn-hangzhou”, “ObjectPrefix”: “test/“}.
PipelineId String Yes ID of the MPS queue, which is global. In the workflow scenario, the message configuration for the MPS queue is invalid, but the message configuration of the QueueName/TopicName is valid.
MessageType String No Message Type.
Range: Queue and Topic.
Default value: Queue.
QueueName String No Name of the Message Service queue, which is global.
TopicName String No Topic name, which is global.
RoleName String No Authorization role name, which is global.
Default value: AliyunMTSDefaultRole.

2. Transcode activity

Name Type Required Description
Outputs String No Optional while extracting subtitles.
For more information, see 2. Output.
For example, [{“OutputObject”:”transcode%2F%7BObjectPrefix%7D%2F%7BFileName%7D.%7BExtName%7D”,”TemplateId”: “S00000001-000070”}].
OutputBucket String No Output bucket. During HLS package, it is overwritten by the Bucket in PackageConfig.
OutputLocation String No Output region. During HLS package, it is overwritten by the Location in PackageConfig.
MultiBitrateVideoStream String No During HLS package, this parameter is required while extracting video streams.
For more information about this parameter, see 40 MultiBitrateVideoStream.
For example, {“URI”: “c/d/video1.m3u8”}.
ExtXMedia String No During HLS package, this parameter is requried while extracting audio streams or subtitle streams.
For more information about this parameter, see 41 ExtXMedia.
For example, {“Name”: “english”,”Language”: “en-US”,”URI”:”c/d/audio-1.m3u8”}.
WebVTTSubtitleURL String No Subtitle address, which currently only supports WebVTT subtitle file, must comply with URL standard, and can overwrite subtitle address while calling AddMedia.
For example, http://test.oss-cn-hangzhou.aliyuncs.com/subtitles-en.vtt.

3. Screenshot activity

Name Type Required Description
SnapshotConfig String Yes For more information, see 11. SnapshotConfig.
For example, {“OutputFile”: {“Bucket”: “example-001”, “Location”: “oss-cn-hangzhou”, “Object”:”snapshot%2F%7BObjectPrefix%7D%2F%7BFileName%7D.%7BExtName%7D%2F1.jpg”},”Time”: “5”}.
MediaCover String No Whether the screenshot is set as the media cover, only for a single screenshot.
Range: true, false.
Default value: false.

4. Analysis activity

Name Type Required Description
KeepOnlyHighestDefinition String No Whether to keep only the highest definition analysis results.
Range: True, False.
Default value: False.

5. Report activity

Name Type Required Description
PublishType String No Media publishing type.
Range: Auto, Manual, and TranscodeCompletedAuto.
Auto: the media set is automatically published after the workflow is executed.
Manual: the media set is not published.
TranscodeCompletedAuto: the media set is automatically published after any Transcode activity is completed (use the message configuration of the Start node to notify users of transcoding completion and use the Play Service to play the activity output).
Default value: Manual.
When the type is TranscodeCompletedAuto, the message will not be sent if the status of the transcoding activity is Skipping.

6. PackageConfig activity

Name Type Required Description
Output String Yes JSON string.
For example, {“Bucket”:”output”,”Location”:”oss-cn-hangzhou”,”MasterPlayListName”:”a/b/c.m3u8”}.
Placeholders that can be used in MasterPlayListName:
{ObjectPrefix}: the original file path not including Bucket information,
{FileName}: the original file name not including extension,
{ExtName}: extension of the original file,
{RunId}: the ID of the workflow execution,
{MediaId}: the MediaID processed by the workflow.
All these placeholders can be dynamically replaced.

7. SubtitleGroup activity

Name Type Required Description
GroupId String Yes Group ID. The length cannot exceed 32 bytes.

8. AudioGroup activity

Name Type Required Description
GroupId String Yes Group ID. The length cannot exceed 32 bytes.

9. GenerateMasterPlayList activity

Name Type Required or not Description
MasterPlayList String Yes Multi-bitstream list. For more information about this parameter, see 42 MasterPlayList.
For example, {“MultiBitrateVideoStreams”: [{“RefActivityName”: “video-1”,”ExtXStreamInf”: {“BandWidth”: “111110”,”Audio”: “auds”,”Subtitles”: “subs” }}]}.
Thank you! We've received your feedback.