tencent cloud

APIs

ModifyTranscodeTemplate

Baixar
Modo Foco
Tamanho da Fonte
Última atualização: 2026-09-22 21:55:32

1. API Description

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

Modify the information of 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.
Definition Yes Integer

Unique identifier of the transcoding template.

SubAppId No Integer

On-demand video application ID. Customers who activate on-demand services from December 25, 2023 must fill in this field with the app ID to access resources in on-demand applications, whether default or newly created.

Container No String

Container format. Valid values: mp4, flv, hls, mp3, flac, ogg, m4a, and wav. Among them, mp3, flac, ogg, m4a, and wav are for audio-only files.

Name No String

Transcoding template name. Length limit: 64 characters.

Comment No String

Transcoding template description. Length limit: 256 characters.

RemoveVideo No Integer

Indicates whether to remove video data. Valid values:

  • 0: Data is reserved.
  • 1: Data is removed.
  • RemoveAudio No Integer

    Indicates whether to remove audio data. Valid values:

  • 0: Data is reserved.
  • 1: Data is removed.
  • VideoTemplate No VideoTemplateInfoForUpdate

    Video stream configuration parameters.

    AudioTemplate No AudioTemplateInfoForUpdate

    Audio stream configuration parameters.

    TEHDConfig No TEHDConfigForUpdate

    Top Speed Codec transcoding parameters.

    EnhanceConfig No EnhanceConfigForUpdate

    Audio/video enhancement configurations.

    SegmentType No String

    Segment type. Valid when Container is hls. Available values:

  • ts: ts slicing;
  • fmp4: fmp4 slicing.
  • StdExtInfo No String

    Extended parameter.

    3. Output Parameters

    Parameter Name Type Description
    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.

    4. Example

    Example1 Modifying a Transcoding Template

    Modifying a Transcoding Template

    Input Example

    POST / HTTP/1.1
    Host: vod.intl.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 VOD service is not enabled.
    InternalError Internal error.
    InvalidParameterValue.AudioBitrate Invalid parameter: audio stream bit rate.
    InvalidParameterValue.AudioChannel Parameter value error: AudioChannel.
    InvalidParameterValue.AudioCodec Invalid parameter: audio stream encoding format.
    InvalidParameterValue.AudioSampleRate Invalid parameter: audio stream sampling rate.
    InvalidParameterValue.Bitrate Invalid audio/video bitrate.
    InvalidParameterValue.Codec Invalid audio/video encoding format.
    InvalidParameterValue.Container Parameter error: muxing format.
    InvalidParameterValue.FiltrateAudio Parameter error: whether to remove video should be 0 or 1.
    InvalidParameterValue.FiltrateVideo Parameter error: remove the video.
    InvalidParameterValue.Fps Parameter error: video frame rate.
    InvalidParameterValue.RemoveAudio Parameter value error: RemoveAudio.
    InvalidParameterValue.RemoveVideo Parameter value error: RemoveVideo.
    InvalidParameterValue.Resolution Parameter error: Resolution error.
    InvalidParameterValue.ResolutionAdaptive Invalid ResolutionAdaptive.
    InvalidParameterValue.SampleRate Invalid audio sample rate.
    InvalidParameterValue.TEHDType Parameter value error: TEHD Type is invalid.
    InvalidParameterValue.Type Type parameter value error.
    InvalidParameterValue.Vcrf Parameter error: vcrf.
    InvalidParameterValue.VideoBitrate Invalid parameter: video stream bitrate.
    InvalidParameterValue.VideoCodec Invalid parameter: video stream encoding format.
    ResourceNotFound.TemplateNotExist Resource does not exist: template not found.
    UnauthorizedOperation Unauthorized operation.

    Ajuda e Suporte

    Esta página foi útil?

    comentários