Updates a subtitle template.
Usage notes
You can call this operation to modify the parameters of a subtitle template.
QPS limit
You can call this operation up to 60 times per second per account. Requests that exceed this limit are dropped and you may experience service interruptions. We recommend that you take note of this limit when you call this operation. For more information, see QPS limits.
Debugging
Request parameters
Parameter |
Type |
Required |
Example |
Description |
Action | String | Yes | UpdateLiveAISubtitle | The operation that you want to perform. Set the value to UpdateLiveAISubtitle. |
SubtitleName | String | No | live AI subtitle template | The name of the subtitle template. The name can contain digits, letters, and hyphens (-) but cannot start with a hyphen (-). |
SrcLanguage | String | No | zh-CN | The source language. Valid values:
|
DstLanguage | String | No | zh-CN | The target language. Valid values:
|
FontColor | String | No | 0xFFFFFF | The font color. Color format: RGBA. |
FontName | String | No | KaiTi | The font. Valid values:
|
BgColor | String | No | 0xFF0000 | The background color of the subtitles. Color format: RGBA. |
PositionNormalized | Array of Float | No | [0.32,0.27] | The position of the subtitles relative to the lower-left corner of the screen. The value is a pair of coordinates. |
ShowSourceLan | Boolean | No | true | Specifies whether to display the source language. Valid values: true and false. Default value: false. |
MaxLines | Integer | No | 2 | The number of displayed lines. |
WordPerLine | Integer | No | 20 | The number of characters per line. Valid values: 1 to 500. |
FontSizeNormalized | Float | No | 0.037 | The font size. Valid values: [0,1]. |
BorderWidthNormalized | Float | No | 0.05 | The font weight. Valid values: [0,1]. |
BgWidthNormalized | Float | No | 0.09 | The size of the background box. Valid values: [0,1]. |
SubtitleId | String | Yes | 597991f3-6ef9-4100-9238-82951de1**** | The ID of the subtitle template. |
Description | String | No | live AI subtitle template | The description of the subtitle template. The description can be up to 128 characters in length and can contain letters, digits, and special characters. |
Width | String | No | 1280 | The width of the preview. Unit: pixels. |
Height | String | No | 720 | The height of the preview. Unit: pixels. The following preview specifications (width x height) are supported:
|
Response parameters
Parameter |
Type |
Example |
Description |
RequestId | String | String 5c6a2a0df228-4a64- af62-20e91b96**** | The request ID. |
Examples
Sample request
http(s)://live.aliyuncs.com/?Action=UpdateLiveAISubtitle
&SubtitleName=live AI subtitle template
&SrcLanguage=zh-CN
&DstLanguage=zh-CN
&FontColor=0xFFFFFF
&FontName=KaiTi
&BgColor=0xFF0000
&PositionNormalized=[0.32,0.27]
&ShowSourceLan=true
&MaxLines=2
&WordPerLine=20
&FontSizeNormalized=0.037
&BorderWidthNormalized=0.05
&BgWidthNormalized=0.09
&SubtitleId=597991f3-6ef9-4100-9238-82951de1****
&Description=live AI subtitle template
&Width=1280
&Height=720
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<UpdateLiveAISubtitleResponse>
<RequestId>String 5c6a2a0df228-4a64- af62-20e91b96****</RequestId>
</UpdateLiveAISubtitleResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "String\t5c6a2a0df228-4a64- af62-20e91b96****"
}
Error codes
HTTP status code |
Error code |
Error message |
Description |
400 | MissingParameter | %s. | One or more required parameters are not specified. |
400 | InvalidParameter | %s. | One or more specified parameters are invalid. |
For a list of error codes, see Service error codes.