All Products
Search
Document Center

ApsaraVideo Media Processing:Workflow triggering rules for files

Last Updated:Aug 25, 2023

Overview

If you want to trigger a workflow, the input file must meet all of the following three conditions:

  1. The file is not generated by a workflow.

  2. The file matches the rules based on the file path.

  3. The file matches the rules based on the file name extension.

Files that are not generated by a workflow

If the input path and output path of a workflow are not specified properly, an inner loop may occur in the workflow. To prevent this issue, if an input file is generated by a workflow, the input file cannot trigger a workflow. Example:

If both the output path of Workflow A and the input path of Workflow B are http://bucket.oss-cn-hangzhou.aliyuncs.com/A/, the following scenarios may occur:

  • If http://bucket.oss-cn-hangzhou.aliyuncs.com/A/example.flv is a file that is generated by Workflow A, this file cannot trigger Workflow B.

  • If http://bucket.oss-cn-hangzhou.aliyuncs.com/A/example.flv is a file that is uploaded to this path, this file can trigger Workflow B.

Files that match the rules based on the file path

If the path of an input file is under the input path that you specified for the Input node of a workflow in the ApsaraVideo Media Processing (MPS) console, the input file can trigger the workflow. Otherwise, the input file cannot trigger the workflow. Example:

Note

The input path of a workflow cannot be the prefix of the input path of another workflow. Otherwise, both workflows are triggered if a file is uploaded to the latter path. For example, the input path of Workflow A is test and the input path of Workflow B is test1. If a file is uploaded to the test1 folder, both workflows are triggered.

If the input path that you specified for the Input node of a workflow in the MPS console ends with a forward slash (/), such as http://bucket.oss-cn-hangzhou.aliyuncs.com/A/, the matching results of multiple input files are described in the following table.

Path of an input file

Matched

http://bucket.oss-cn-hangzhou.aliyuncs.com/A/example.flv

Yes

http://bucket.oss-cn-hangzhou.aliyuncs.com/A/B/example.flv

Yes

http://bucket.oss-cn-hangzhou.aliyuncs.com/A/B/C/example.flv

Yes

http://bucket.oss-cn-hangzhou.aliyuncs.com/A1/example.flv

No

http://bucket.oss-cn-hangzhou.aliyuncs.com/A_video01.mp4

No

http://bucket.oss-cn-beijing.aliyuncs.com/A/example.flv

No

http://bucket.oss-cn-hangzhou.aliyuncs.com/example.flv

No

http://bucket.oss-cn-hangzhou.aliyuncs.com/D/example.flv

No

If the input path that you specified for the Input node of a workflow in the MPS console does not end with a forward slash (/), such as http://bucket.oss-cn-hangzhou.aliyuncs.com/A, the matching results of multiple input files are described in the following table.

Path of an input file

Matched

http://bucket.oss-cn-hangzhou.aliyuncs.com/A/example.flv

Yes

http://bucket.oss-cn-hangzhou.aliyuncs.com/A/B/example.flv

Yes

http://bucket.oss-cn-hangzhou.aliyuncs.com/A/B/C/example.flv

Yes

http://bucket.oss-cn-hangzhou.aliyuncs.com/A1/example.flv

Yes

http://bucket.oss-cn-hangzhou.aliyuncs.com/A_video01.mp4

Yes

http://bucket.oss-cn-beijing.aliyuncs.com/A/example.flv

No

http://bucket.oss-cn-hangzhou.aliyuncs.com/example.flv

No

http://bucket.oss-cn-hangzhou.aliyuncs.com/D/example.flv

No

Files that match the rules based on the file name extension

The following table describes the supported file name extensions. If the file name extension of an input file is in the table, the input file can trigger a workflow. Otherwise, the input file cannot trigger a workflow. Example:

If http://bucket.oss-cn-hangzhou.aliyuncs.com/A/B/C/test1.flv is an input file, the file name extension is .flv and the file matches the rules.

Note

The last file name extension prevails. For example, if http://bucket.oss-cn-hangzhou.aliyuncs.com/A/B/C/test1.flv.mp4 is an input file, the file name extension is .mp4 and the file matches the rules.

Type

File name extension

Video file

.3gp, .asf, .avi, .dat, .dv, .flv, .f4v, .gif, .m2t, .m3u8, .m4v, .mj2, .mjpeg, .mkv, .mov, .mp4, .mpe, .mpg, .mpeg, .mts, ogg, .qt, .rm, .rmvb, .swf, .vob, .wmv, and .webm, .mxf, .quicktime

Audio file

.s48, .aac, .ac3, .acm, .amr, .ape, .caf, .flac, .m4a, .mp3, .ra, .wav, .wma, and .aiff