此接口用于创建任务模板。
参数 | 类型 | 是否必选 | 描述 |
---|---|---|---|
Action | String | 是 | 接口名称。当前接口取值为 CreateTaskTemplate 。 |
Version | String | 是 | 接口版本。当前接口取值为 2023-07-01 。 |
SpaceName | String | 否 | 点播空间名称。可通过以下方式获取空间名称: |
Name | String | 否 | 模板名称。 |
Description | String | 否 | 模板描述。 |
TaskType | String | 否 | 任务模板类型。
|
TranscodeVideoTaskParams | 否 | 视频转码模板。 说明 当 | |
ByteHDTaskParams | 否 | 极智超清模版。 说明 当 | |
TranscodeAudioTaskParams | 否 | 音频转码模板。 说明 当 | |
SnapshotTaskParams | 否 | 截图模板。 说明 当 |
参数 | 类型 | 描述 |
---|---|---|
ResponseMetadata | ResponseMetadata | 响应通用信息 |
Result | VodTaskTemplateResult | 响应结果 |
参数 | 类型 | 描述 |
---|---|---|
RequestId | String | 请求 ID |
Action | String | 请求接口 |
Version | String | 版本 |
Service | String | 服务 |
Region | String | 区域 |
Error | ResponseError | 异常信息 |
参数 | 类型 | 描述 |
---|---|---|
Code | String | 错误码 |
Message | String | 详细错误信息 |
参数 | 类型 | 描述 |
---|---|---|
TaskTemplate | TaskTemplate | 任务模板 |
参数 | 类型 | 描述 |
---|---|---|
TemplateId | String | 模板 ID |
SpaceName | String | 空间名 |
Name | String | 模板名称 |
Description | String | 模板描述 |
Type | String | 工作流类型 |
CommitId | String | 版本 ID |
Hash | String | 哈希 |
CreatedAt | String | 创建时间,符合 RFC3339 规范。 |
UpdatedAt | String | 更新时间,符合 RFC3339 规范。 |
TaskType | String | 任务类型模板。 |
TranscodeVideoTaskParams | TranscodeVideoTaskParams | 视频转码模板。 |
ByteHDTaskParams | ByteHDTaskParams | 极智超清模板。 |
TranscodeAudioTaskParams | TranscodeAudioTaskParams | 音频转码模板。 |
SnapshotTaskParams | SnapshotTaskParams | 截图模板。 |
http://vod.volcengineapi.com?Action=CreateTaskTemplate&Version=2023-07-01&SpaceName=YourSpaceName&Name=YourName&Description=YourDescription&TaskType=YourTaskType&TranscodeVideoTaskParams=YourTranscodeVideoTaskParams&ByteHDTaskParams=YourByteHDTaskParams&TranscodeAudioTaskParams=YourTranscodeAudioTaskParams
{ "ResponseMetadata": { "RequestId": "20220726*******************051B513A", "Action": "CreateTaskTemplate", "Version": "2023-07-01", "Service": "vod", "Region": "cn-north-1" }, "Result": { "TaskTemplate": { "TemplateId": "TemplateId", "SpaceName": "SpaceName", "Name": "Name", "Description": "Description", "CommitId": "CommitId", "Hash": "Hash", "CreatedAt": "2022-04-18T20:00:00Z", "UpdatedAt":"2022-04-18T22:00:00Z", "TaskType": "TaskType", "TranscodeVideoTaskParams": { "TranscodeTemplateType": "TranscodeTemplateType", "Container": "Container", "Video": { "Res": "Res", "ScaleMethod": "ScaleMethod", "ScaleType": 1, "ScaleMode": 1, "ScaleWidth": 1, "ScaleHeight": 1, "ScaleShort": 1, "ScaleLong": 1, "Codec": "Codec", "RateControlMode": "RateControlMode", "MaxBitrate": 1, "Bitrate": 1, "Crf": 0.1, "Preset": "Preset", "MaxFps": 1, "Vsync": "Vsync", "Fps": 0.1, "HDRMode": 0 }, "Audio": { "Codec": "Codec", "SampleRate": 1, "RateControlMode": "RateControlMode", "Bitrate": 1, "MinRate": 1, "MaxRate": 1, "Channels": 1, "Profile": "Profile" }, "DisableAudio": "false", "Quality": "Quality", "UserTag": "UserTag", "Encrypt": "false", "Encryption": { "Vendor": "Vendor" }, "Segment": { "Format": "Format", "Type": "Type", "Duration": 1 }, "Volume": { "Method": "Method", "IntegratedLoudness": 0.1, "TruePeak": 0.1, "VolumeTime": "2019-10-12T07: 20: 50.52Z" } }, "ByteHDTaskParams": { "Container": "Container", "Video": { "Res": "Res", "ScaleMethod": "ScaleMethod", "ScaleType": 1, "ScaleMode": 1, "ScaleWidth": 1, "ScaleHeight": 1, "ScaleShort": 1, "ScaleLong": 1, "Codec": "Codec", "RateControlMode": "RateControlMode", "MaxBitrate": 1, "Bitrate": 1, "Crf": 0.1, "Preset": "Preset", "MaxFps": 1, "Vsync": "Vsync", "Fps": 0.1, "HDRMode": 0 }, "Audio": { "Codec": "Codec", "SampleRate": 1, "RateControlMode": "RateControlMode", "Bitrate": 1, "MinRate": 1, "MaxRate": 1, "Channels": 1, "Profile": "Profile" }, "DisableAudio": "false", "Quality": "Quality", "UserTag": "UserTag", "Encrypt": "false", "Encryption": { "Vendor": "Vendor" }, "Segment": { "Format": "Format", "Type": "Type", "Duration": 1 }, "Volume": { "Method": "Method", "IntegratedLoudness": 0.1, "TruePeak": 0.1, "VolumeTime": "2019-10-12T07: 20: 50.52Z" } }, "TranscodeAudioTaskParams": { "Container": "Container", "Audio": { "Codec": "Codec", "SampleRate": 1, "RateControlMode": "RateControlMode", "Bitrate": 1, "MinRate": 1, "MaxRate": 1, "Channels": 1, "Profile": "Profile" }, "Quality": "Quality", "UserTag": "UserTag", "Encrypt": "false", "Encryption": { "Vendor": "Vendor" }, "Segment": { "Format": "Format", "Type": "Type", "Duration": 1 }, "Volume": { "Method": "Method", "IntegratedLoudness": 0.1, "TruePeak": 0.1, "VolumeTime": "2019-10-12T07: 20: 50.52Z" } } } } }
{ "ResponseMetadata": { "RequestId": "20220726*******************051B513A", "Action": "CreateTaskTemplate", "Version": "2023-07-01", "Service": "vod", "Region": "cn-north-1", "Error": { "Code": "InternalError", "Message": "InternalError:some error!" } } }
详见视频点播公共错误码。
点播 OpenAPI 提供了配套的服务端 SDK,支持多种编程语言,帮助您实现快速开发。建议使用服务端 SDK 来调用 API。此 API 各语言调用的示例代码,请参考如下: