Domain name for API request: vod.intl.tencentcloudapi.com.
Use a task flow template to initiate processing tasks for videos in VOD.
There are two ways to create a task flow template:
For event notification, the type of event notifications other than audio/video moderation tasks is task flow status change; the type of audio/video moderation task event notification is audio/video moderation completed.
A maximum of 100 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: ProcessMediaByProcedure. |
| Version | Yes | String | Common Params. The value used for this API: 2018-07-17. |
| Region | No | String | Common Params. This parameter is not required. |
| ProcedureName | Yes | String | Name of the task flow. |
| FileId | No | String | Media file ID. |
| MediaStoragePath | No | String | Storage path of the media. |
| SubAppId | No | Integer | On-demand application ID. For customers who activate on-demand services from December 25, 2023, this field must be filled in as the app ID when accessing resources in on-demand applications (whether the default application or a newly created application). |
| TasksPriority | No | Integer | Priority of the task flow. The higher the value, the higher the priority. The value range is from -10 to 10. If this is not specified, the default value is 0. |
| TasksNotifyMode | No | String | Task flow status change notification mode. Valid values are Finish, Change, and None. If this is not specified, the default value is Finish. |
| SessionContext | No | String | Source context. This is used to pass user request information. The task status change callback returns the value of this field. The maximum length is 1000 characters. |
| SessionId | No | String | Identifier for deduplication. If a request with the same identifier has been sent within the past 7 days, an error is returned for the current request. The maximum length is 50 characters. If this is not specified or left empty, deduplication is not performed. |
| ExtInfo | No | String | Reserved field, used for special purposes. |
| Parameter Name | Type | Description |
|---|---|---|
| TaskId | String | Task ID of the task type Procedure. The task is initiated when the task flow template specified by the input parameter ProcedureName includes one or more of MediaProcessTask, AiAnalysisTask, and AiRecognitionTask. |
| ReviewAudioVideoTaskId | String | Task ID of the task type ReviewAudioVideo. This task is initiated when the task flow template specified by the input parameter ProcedureName includes ReviewAudioVideoTask. |
| ImportMediaKnowledgeTaskIdSet | Array of String | Task ID of the task type ImportMediaKnowledge. When the task flow template specified by the input parameter ProcedureName includes ImportMediaKnowledgeTaskSet, initiate the task. |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
Initiate a task for fileId 5285485487985271487 using the task flow template named TranscodeAndSnapshot.
https://vod.intl.tencentcloudapi.com/?Action=ProcessMediaByProcedure
&FileId=5285485487985271487
&ProcedureName=TranscodeAndSnapshot
&<Common request parameters>
{
"Response": {
"RequestId": "6ca31e3a-6b8e-4b4e-9256-fdc700064ef3",
"TaskId": "125xxx65-procedurev2-bffb15f07530b57bc1aabb01fac74bca",
"ReviewAudioVideoTaskId": "",
"ImportMediaKnowledgeTaskIdSet": [
"2****5-ImportMediaKnowledge-fe26d12dbb53cd75d8f7881253e3266at"
]
}
}
Initiate a task for the file at /dir/video.mp4 using the task flow template named TranscodeAndSnapshot.
https://vod.intl.tencentcloudapi.com/?Action=ProcessMediaByProcedure
&MediaStoragePath=/dir/video.mp4
&ProcedureName=TranscodeAndSnapshot
&<Common request parameters>
{
"Response": {
"RequestId": "6ca31e3a-6b8e-4b4e-9256-fdc700064ef3",
"TaskId": "125xxx65-procedurev2-bffb15f07530b57bc1aabb01fac74bca",
"ReviewAudioVideoTaskId": ""
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| FailedOperation | Operation failed. |
| FailedOperation.InvalidVodUser | The VOD service is not activated. |
| InternalError | Internal error. |
| InvalidParameter | Parameter error. |
| InvalidParameterValue | Parameter value error. |
| InvalidParameterValue.FileId | FileId does not exist. |
| InvalidParameterValue.ProcedureName | Task flow template name is invalid. |
| InvalidParameterValue.SessionContextTooLong | SessionContext is too long. |
| InvalidParameterValue.SessionId | Duplicate recognition code. Request deduplicated. |
| InvalidParameterValue.SessionIdTooLong | SessionId is too long. |
| InvalidParameterValue.SubAppId | Parameter value error: app ID. |
| InvalidParameterValue.UniqueIdentifier | Duplicate recognition code within one day. Request deduplicated. |
| UnauthorizedOperation | Unauthorized operation. |
文档反馈