ProcessMediaByUrl

最后更新时间:2021-09-24 15:19:51

    1. API Description

    Domain name for API request: vod.tencentcloudapi.com.

    This API is disused, please use ProcessMedia API of MPS, with the input parameter InputInfo.UrlInputInfo.Url set to a video URL.

    A maximum of 100 requests can be initiated per second for this API.

    We recommend you to use API Explorer
    Try it
    API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

    2. Input Parameters

    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 parameter. The value used for this API: ProcessMediaByUrl.
    Version Yes String Common parameter. The value used for this API: 2018-07-17.
    Region No String Common parameter. This parameter is not required for this API.
    InputInfo No MediaInputInfo This API isdisused. You are advised to use an alternative API. For more information, see API overview.
    OutputInfo No MediaOutputInfo Information of COS path to output file.
    AiContentReviewTask No AiContentReviewTaskInput Type parameter of video content audit task.
    AiAnalysisTask No AiAnalysisTaskInput Video content analysis task parameter.
    AiRecognitionTask No AiRecognitionTaskInput Type parameter of video content recognition task.
    TasksPriority No Integer Task flow priority. The higher the value, the higher the priority. Value range: -10-10. If this parameter is left empty, 0 will be used.
    TasksNotifyMode No String Notification mode for task flow status change. Valid values: Finish, Change, None. If this parameter is left empty, Finish will be used.
    SessionContext No String The source context which is used to pass through the user request information. The task flow status change callback will return the value of this field. It can contain up to 1,000 characters.
    SessionId No String Used to identify duplicate requests. After you send a request, if any request with the same SessionId has already been sent in the last three days (72 hours), an error message will be returned. SessionId contains up to 50 characters. If this parameter is not carried or is an empty string, no deduplication will be performed.
    SubAppId No Integer Subapplication ID in VOD. If you need to access a resource in a subapplication, enter the subapplication ID in this field; otherwise, leave it empty.

    3. Output Parameters

    Parameter Name Type Description
    TaskId String Task ID
    RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

    4. Example

    Example1 Initiating a content analysis task

    This example shows you how to initiate a content analysis task for a video whose URL is


    .

    Input Example

    https://vod.tencentcloudapi.com/?Action=ProcessMediaByUrl
    &InputInfo.Url=http://www.abc.com/abc.mp4
    &InputInfo.Name=Major Country Diplomacy
    &InputInfo.Id=872988202
    &OutputInfo.Region=ap-guangzhou
    &OutputInfo.Bucket=myoutputbucket-1256244234
    &OutputInfo.Dir=/output/test/
    &AiAnalysisTask.Definition=10
    &<Common request parameters>
    

    Output Example

    {
    "Response": {
      "RequestId": "5ca61e3a-6b8e-4b4e-9256-fdc701190064ef0",
      "TaskId": "125xxxxxx07-procedurev2-813dc41e6fdc22dcf24aa6e9c61cp92"
    }
    }
    

    Example2 Initiating an inappropriate information recognition task

    This example shows you how to initiate an inappropriate information recognition for a video whose URL is


    .

    Input Example

    https://vod.tencentcloudapi.com/?Action=ProcessMediaByUrl
    &InputInfo.Url=http://www.abc.com/abc.mp4
    &InputInfo.Name=Major Country Diplomacy
    &InputInfo.Id=872988202
    &OutputInfo.Region=ap-guangzhou
    &OutputInfo.Bucket=myoutputbucket-1256244234
    &OutputInfo.Dir=/output/test/
    &AiContentReviewTask.Definition=10
    &<Common request parameters>
    

    Output Example

    {
    "Response": {
      "RequestId": "5ca61e3a-6b8e-4b4e-9256-fdc701190064ef0",
      "TaskId": "125xxxxxx07-procedurev2-893dc41e6fdc22dcf24aa6e9c61cp94"
    }
    }
    

    Example3 Initiating a content recognition task

    This example shows you how to initiate a content recognition task for a video whose URL is


    .

    Input Example

    https://vod.tencentcloudapi.com/?Action=ProcessMediaByUrl
    &InputInfo.Url=http://www.abc.com/abc.mp4
    &InputInfo.Name=Major Country Diplomacy
    &InputInfo.Id=872988202
    &OutputInfo.Region=ap-guangzhou
    &OutputInfo.Bucket=myoutputbucket-1256244234
    &OutputInfo.Dir=/output/test/
    &AiRecognitionTask.Definition=10
    &<Common request parameters>
    

    Output Example

    {
    "Response": {
      "RequestId": "5ca61e3a-6b8e-4b4e-9256-fdc701190064fk3",
      "TaskId": "125xxxxxx07-procedurev2-813dc41e6fdc22dcf24aa6e9c61f3t0"
    }
    }
    

    5. Developer Resources

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    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.
    FailedOperation.TaskDuplicate Operation failed: the task already exists.
    InternalError Internal error.
    InternalError.GetFileInfoError Internal error: an error occurred while getting media file information.
    InvalidParameter Invalid parameter.
    InvalidParameterValue.AiAnalysisTaskDefinition Incorrect parameter value: Definition for AI-based analysis.
    InvalidParameterValue.AiContentReviewTaskDefinition Incorrect parameter value: Definition AI-based content audit.
    InvalidParameterValue.AiRecognitionTaskDefinition Incorrect parameter value: Definition for AI-based recognition.
    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: subapplication ID
    UnauthorizedOperation Unauthorized operation.