Domain name for API request: vod.intl.tencentcloudapi.com.
This API is used to start a task flow on a video.
There are two ways to create a task flow template:
CreateProcedureTemplate API.If event notifications are used, the event type for moderation tasks is ReviewAudioVideoComplete, and that for other tasks is ProcedureStateChanged.
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 | Task flow name. |
| FileId | No | String | Media file ID. FileId or MediaStoragePath must be provided. |
| MediaStoragePath | No | String | Storage path of the media. Only sub-apps in FileID + Path mode can initiate tasks through MediaStoragePath. FileId or MediaStoragePath must be provided. |
| SubAppId | No | Integer | VOD application ID. Customers who activate VOD services after December 25, 2023 must fill this field with the application ID when accessing resources in on-demand applications (whether default or newly created). |
| TasksPriority | No | Integer | Priority of the task flow. The higher the value, the higher the priority. The value ranges from -10 to 10. If left blank, it represents 0. |
| TasksNotifyMode | No | String | Task flow status change notification mode. Valid values: Finish, Change, and None. If left empty, it represents Finish. |
| SessionContext | No | String | Source context, which is used to pass through the user request information. The callback for task flow status changes will return the value of this field. The maximum length is 1,000 characters. |
| SessionId | No | String | An identifier for deduplication. If there has been a request with the same identifier within the past 7 days, an error will be returned for the current request. The maximum length is 50 characters. Leaving it blank or using an empty string indicates no deduplication. |
| ExtInfo | No | String | Reserved field, used when special purpose. |
| Parameter Name | Type | Description |
|---|---|---|
| TaskId | String | Task ID of the task type Procedure. Initiate the task when the task flow template specification corresponding to the input parameter ProcedureName includes one or more of MediaProcessTask, AiAnalysisTask, or AiRecognitionTask. |
| ReviewAudioVideoTaskId | String | Task ID of the task with the ReviewAudioVideo task type. The task is initiated when the task flow template specified by the ProcedureName input parameter includes the ReviewAudioVideoTask. |
| 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 task for fileId 5285485487985271487 with task flow template name 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": ""
}
}
For the task initiation with the path /dir/video.mp4, the used task flow template name is 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 | The FileId does not exist. |
| InvalidParameterValue.ProcedureName | The task flow template name is invalid. |
| InvalidParameterValue.SessionContextTooLong | SessionContext is too long. |
| InvalidParameterValue.SessionId | The deduplication ID already exists. The request is removed due to duplication. |
| InvalidParameterValue.SessionIdTooLong | SessionId is too long. |
| InvalidParameterValue.SubAppId | Incorrect parameter value: application id. |
| InvalidParameterValue.UniqueIdentifier | The deduplication ID already exists on the same day. The request is removed due to duplication. |
| UnauthorizedOperation | Unauthorized operation. |
Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
masukan