All Products
Search
Document Center

ApsaraVideo Live:DescribeLiveAISubtitle

最終更新日:Jul 05, 2024

Queries the subtitle templates.

Usage notes

You can call this operation to query the subtitle templates. Make sure that the parameter configurations meet the requirements.

Important The live subtitles feature is in invitational preview. You can add up to 300 subtitle templates.

QPS limit

You can call this operation up to 60 times per second per account. Requests that exceed this limit are dropped and you will experience service interruptions. We recommend that you take note of this limit when you call this operation. For more information, see QPS limits.

Debugging

OpenAPI Explorer automatically generates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter

Type

Required

Example

Description

Action String Yes DescribeLiveAISubtitle

The operation that you want to perform. Set the value to DescribeLiveAISubtitle.

SubtitleId String No 445409ec-7eaa-461d-8f29-4bec2eb9****

The ID of the subtitle template.

SubtitleName String No sub01

The name of the subtitle template. The name can contain only digits, letters, and hyphens (-). The name cannot start with a hyphen.

PageNumber String No 1

The page number. Valid values: [1,100].

PageSize String No 100

The number of entries per page. Valid values: [1,100].

IsDefault Boolean No false

Specifies whether to query the default subtitle template. Valid values:

  • true
  • false

    Note The default template includes the built-in parameter configurations. You can specify the copyFrom parameter when you call the AddLiveAISubtitle operation to use the default template.

Response parameters

Parameter

Type

Example

Description

RequestId String 5c6a2a0df228-4a64- af62-20e91b96****

The ID of the request.

SubtitleConfigs Array of SubtitleConfig

The information about the subtitle templates.

SubtitleConfig
DstLanguage String zh-CN

The language to which the subtitles are translated.

SrcLanguage String zh-CN

The source language of the subtitles.

FontColor String 0xFFFFFF

The font color.

FontName String AlibabaPuHuiTi-Regular

The font.

ShowSourceLan Integer true

Indicates whether the source language of the subtitle is displayed.

MaxLines Integer 2

The number of displayed lines.

WordPerline Integer 20

The number of words per line.

PositionNormalized Array of Float [0.3,0.35]

The position of the subtitles.

BgColor String 0xFF0000

The background color of the subtitles.

BgWidthNormalized Float 0.09

The size of the background image.

BorderWidthNormalized Float 0.05

The font weight.

Width String 1280

The width of the preview image.

Height String 720

The height of the preview image.

SubtitleName String sub1

The name of the subtitle template.

SubtitleId String 597991f3-6ef9-4100-9238-82951de1****

The ID of the subtitle template.

RulesRefer Array of String 1419783e-0dd2-4485-a298-6e4a0e4e****

The ID of the subtitle rule.

FontSizeNormalized String 0.037

The font size.

Description String live AI subtitle template

The description of the template.

Examples

Sample requests

http(s)://[live.aliyuncs.com]/?Action=DescribeLiveAISubtitle
&SubtitleId=445409ec-7eaa-461d-8f29-4bec2eb9****
&SubtitleName=sub01
&PageNumber=1
&PageSize=100
&IsDefault=false
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeLiveAISubtitleResponse>
    <RequestId>5c6a2a0df228-4a64- af62-20e91b96****</RequestId>
    <SubtitleConfigs>
        <DstLanguage>zh-CN</DstLanguage>
        <SrcLanguage>zh-CN</SrcLanguage>
        <FontColor>0xFFFFFF</FontColor>
        <FontName>AlibabaPuHuiTi-Regular</FontName>
        <MaxLines>2</MaxLines>
        <WordPerline>20</WordPerline>
        <PositionNormalized>[0.3,0.35]</PositionNormalized>
        <BgColor>0xFF0000</BgColor>
        <BgWidthNormalized>0.09</BgWidthNormalized>
        <BorderWidthNormalized>0.05</BorderWidthNormalized>
        <Width>1280</Width>
        <Height>720</Height>
        <SubtitleName>sub1</SubtitleName>
        <SubtitleId>597991f3-6ef9-4100-9238-82951de1****</SubtitleId>
        <RulesRefer>1419783e-0dd2-4485-a298-6e4a0e4e****</RulesRefer>
        <FontSizeNormalized>0.037</FontSizeNormalized>
        <Description>live AI subtitle template</Description>
    </SubtitleConfigs>
</DescribeLiveAISubtitleResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "5c6a2a0df228-4a64- af62-20e91b96****",
  "SubtitleConfigs" : [ {
    "DstLanguage" : "zh-CN",
    "SrcLanguage" : "zh-CN",
    "FontColor" : "0xFFFFFF",
    "FontName" : "AlibabaPuHuiTi-Regular",
    "MaxLines" : 2,
    "WordPerline" : 20,
    "PositionNormalized" : [ 0.3, 0.35 ],
    "BgColor" : "0xFF0000",
    "BgWidthNormalized" : 0.09,
    "BorderWidthNormalized" : 0.05,
    "Width" : "1280",
    "Height" : "720",
    "SubtitleName" : "sub1",
    "SubtitleId" : "597991f3-6ef9-4100-9238-82951de1****",
    "RulesRefer" : [ "1419783e-0dd2-4485-a298-6e4a0e4e****" ],
    "FontSizeNormalized" : "0.037",
    "Description" : "live AI subtitle template"
  } ]
}

Error codes

HttpCode

Error code

Error message

Description

400 InvalidParameter %s. One or more parameters are invalid.
400 MissingParameter %s. One or more required parameters are missing.

For a list of error codes, see Service error codes.