tencent cloud

Feedback

ModifyTranscodeTemplate

Last updated: 2022-10-28 15:17:41

1. API Description

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

This API is used to modify a custom transcoding template.

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 Params. The value used for this API: ModifyTranscodeTemplate.
Version Yes String Common Params. The value used for this API: 2018-07-17.
Region No String Common Params. This parameter is not required for this API.
Definition Yes Integer Unique ID of transcoding template.
SubAppId No Integer The VOD subapplication ID. If you need to access a resource in a subapplication, set this parameter to the subapplication ID; otherwise, leave it empty.
Container No String Container. Valid values: mp4; flv; hls; mp3; flac; ogg; m4a. Among them, mp3, flac, ogg, and m4a are for audio files.
Name No String Transcoding template name. Length limit: 64 characters.
Comment No String Template description. Length limit: 256 characters.
RemoveVideo No Integer Whether to remove video data. Valid values:
  • 0: retain
  • 1: remove
  • RemoveAudio No Integer Whether to remove audio data. Valid values:
  • 0: retain
  • 1: remove
  • VideoTemplate No VideoTemplateInfoForUpdate Video stream configuration parameter.
    AudioTemplate No AudioTemplateInfoForUpdate Audio stream configuration parameter.
    TEHDConfig No TEHDConfigForUpdate TESHD transcoding parameter.
    SegmentType No String The segment type. This parameter is valid only if Container is hls. Valid values:
  • ts: TS segment
  • fmp4: fMP4 segment
  • 3. Output Parameters

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

    4. Example

    Example1 Modifying a transcoding template

    Input Example

    POST / HTTP/1.1
    Host: vod.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: ModifyTranscodeTemplate
    <Common request parameters>
    
    {
        "Definition": "1008",
        "Container": "mp4",
        "VideoTemplate": {
            "Codec": "libx264",
            "Bitrate": "256",
            "Fps": "60"
        },
        "AudioTemplate": {
            "SampleRate": "200",
            "Codec": "libfdk_aac",
            "Bitrate": "200"
        }
    }
    

    Output Example

    {
        "Response": {
            "RequestId": "12ae8d8e-dce3-4151-9d4b-5594145287e1"
        }
    }
    

    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.
    InternalError Internal error.
    InvalidParameterValue.AudioBitrate Invalid parameter: audio stream bitrate.
    InvalidParameterValue.AudioChannel Incorrect parameter value: AudioChannel.
    InvalidParameterValue.AudioCodec Invalid parameter: audio stream encoder.
    InvalidParameterValue.AudioSampleRate Invalid parameter: audio stream sample rate.
    InvalidParameterValue.Bitrate Invalid audio/video bitrate.
    InvalidParameterValue.Codec Invalid audio/video codec.
    InvalidParameterValue.Container Invalid parameter: container.
    InvalidParameterValue.FiltrateAudio
    InvalidParameterValue.FiltrateVideo
    InvalidParameterValue.Fps Invalid parameter: video frame rate.
    InvalidParameterValue.RemoveAudio Incorrect parameter value: RemoveAudio.
    InvalidParameterValue.RemoveVideo Incorrect parameter value: RemoveVideo.
    InvalidParameterValue.Resolution Invalid parameter: incorrect resolution.
    InvalidParameterValue.ResolutionAdaptive Invalid ResolutionAdaptive.
    InvalidParameterValue.SampleRate Invalid audio sample rate.
    InvalidParameterValue.TEHDType Incorrect parameter value: TEHD Type is invalid.
    InvalidParameterValue.Type Incorrect Type parameter value.
    InvalidParameterValue.Vcrf Incorrect vcrf.
    InvalidParameterValue.VideoBitrate Invalid parameter: video stream bitrate.
    InvalidParameterValue.VideoCodec Invalid parameter: video stream encoder.
    ResourceNotFound.TemplateNotExist The resource does not exist: the template does not exist.
    UnauthorizedOperation Unauthorized operation.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support