Updates a custom transcoding configuration.
Usage notes
This operation supports the following types of custom transcoding templates:
- h264: custom H.264 standard transcoding.
- h264-nbhd: custom H.264 Narrowband HD™ transcoding.
- h265: custom H.265 standard transcoding.
- h265-nbhd: custom H.265 Narrowband HD™ transcoding.
- audio: audio-only transcoding.
QPS limit
You can call this operation up to 6,000 times per minute per account.
Debugging
Request parameters
Parameter |
Type |
Required |
Example |
Description |
Action | String | Yes | UpdateCustomLiveStreamTranscode | The operation that you want to perform. Set the value to UpdateCustomLiveStreamTranscode. |
Domain | String | Yes | example.com | The main streaming domain, which cannot be modified. |
App | String | Yes | liveApp**** | The name of the application to which the live stream belongs, which cannot be modified. |
Template | String | Yes | LiveCusTranscode**** | The ID of the custom transcoding template, which cannot be modified. |
TemplateType | String | Yes | h264 | The type of the custom transcoding template, which cannot be modified. |
Height | Integer | No | 720 | The height of the output video. Unit: pixels. The value must comply with the following rules:
|
Width | Integer | No | 576 | The width of the output video. Unit: pixels. The value must comply with the following rules:
Note The resolution of a video that is transcoded by using H.265 Narrowband HD™ transcoding cannot exceed 1280 × 720 pixels. |
FPS | Integer | No | 30 | The frame rate of the output video. Unit: frames per second (FPS). Valid values: 1 to 60. |
VideoBitrate | Integer | No | 720 | The bitrate of the output video. Unit: Kbit/s. Valid values: 1 to 6000. Note The bitrate of the output video may not be the same as the value that you specify, but is as close to the value as possible, especially when the value is excessively large or small. |
AudioBitrate | Integer | No | 512 | The bitrate of the output audio. Unit: Kbit/s. Valid values: 1 to 1000. |
Gop | String | No | 1 | The group of pictures (GOP) size of the video. Unit: frames or seconds. When the unit is frames, the value format is {Number}. When the unit is seconds, the value format is {Number}s.
|
Profile | Integer | No | 2 | The video encoding profile. The profile determines how a video is encoded. In most cases, a greater value indicates better image quality and higher resource consumption. Valid values:
|
AudioProfile | String | No | aac_low | The audio encoding profile. Valid values:
|
AudioCodec | String | No | aac | The audio codec. Valid values:
|
AudioRate | Integer | No | 96000 | The audio sampling rate. Valid values: 22050, 32000, 44100, 48000, and 96000. Unit: Hz. Note If you set AudioProfile to aac_ld, the audio sampling rate cannot exceed 44,100 Hz. |
AudioChannelNum | Integer | No | 2 | The number of sound channels. Valid values:
|
Lazy | String | No | yes | Specifies whether to enable triggered transcoding. Valid values:
|
EncryptParameters | String | No | {"EncryptType": "aliyun", "KmsKeyID":"afce5722-81d2-43c3-9930-7601da11****","KmsKeyExpireInterval":"3600"} | The encryption settings. The value must be a JSON string that includes the following fields:
Note If DRM encryption is used, KmsKeyID cannot be modified. |
ResWithSource | String | No | {"Type":"short","Value":"1080"} | The source-based resolution settings. This parameter takes precedence over other resolution settings. The following fields must be included:
|
FpsWithSource | String | No | {"UpLimit":60,"LowerLimit":1} | The source-based frame rate settings. This parameter takes precedence over other frame rate settings. The following fields must be included:
|
BitrateWithSource | String | No | {"UpLimit":2500,"LowerLimit":800,"Factor":1} | The source-based bitrate settings. This parameter takes precedence over other bitrate settings. The following fields must be included:
|
ExtWithSource | String | No | {"KeyFrameOpen":"yes","Copyts":"yes","SeiMode":1} | Other source-based settings. The following fields are included:
|
Response parameters
Parameter |
Type |
Example |
Description |
RequestId | String | 16A96B9A-F203-4EC5-8E43-CB92E68F4CD8 | The request ID. |
Examples
Sample requests
http(s)://live.aliyuncs.com/?Action=UpdateCustomLiveStreamTranscode
&Domain=example.com
&App=liveApp****
&Template=LiveCusTranscode****
&TemplateType=h264
&Height=720
&Width=576
&FPS=30
&VideoBitrate=720
&AudioBitrate=512
&Gop=1
&Profile=2
&AudioProfile=aac_low
&AudioCodec=aac
&AudioRate=96000
&AudioChannelNum=2
&Lazy=yes
&EncryptParameters={"EncryptType": "aliyun", "KmsKeyID":"afce5722-81d2-43c3-9930-7601da11****","KmsKeyExpireInterval":"3600"}
&ResWithSource={\"Type\":\"short\",\"Value\":\"1080\"}
&FpsWithSource={\"UpLimit\":60,\"LowerLimit\":1}
&BitrateWithSource={\"UpLimit\":2500,\"LowerLimit\":800,\"Factor\":1}
&ExtWithSource={\"KeyFrameOpen\":\"yes\",\"Copyts\":\"yes\",\"SeiMode\":1}
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<UpdateCustomLiveStreamTranscodeResponse>
<RequestId>16A96B9A-F203-4EC5-8E43-CB92E68F4CD8</RequestId>
</UpdateCustomLiveStreamTranscodeResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "16A96B9A-F203-4EC5-8E43-CB92E68F4CD8"
}
Error codes
For a list of error codes, see Service error codes.