All Products
Search
Document Center

ApsaraVideo Live:UpdateLiveAIProduceRules

更新時間:Aug 13, 2024

Updates a subtitle rule.

Usage notes

You can call the UpdateLiveAIProduceRules operation to modify the parameters of a subtitle rule.

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 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

OpenAPI Explorer automatically calculates 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 UpdateLiveAIProduceRules

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

Domain String Yes demo.aliyundoc.com

The main streaming domain.

App String Yes AppName

The name of the application to which the live stream belongs.

SubtitleName String Yes sub01

The name of the subtitle template to which the subtitle rule applies.

IsLazy Boolean No true

Specifies whether to generate live subtitles when stream pulling starts. Valid values:

  • true: generates live subtitles when stream pulling starts and stops generating live subtitles when no streams are pulled for 5 minutes. When stream pulling restarts, live subtitles are generated again.
  • false: generates live subtitles when stream ingest starts.
RulesId String No 445409ec-7eaa-461d -8f29-4bec2eb9****

The ID of the subtitle rule.

LiveTemplate String No lp_ld

The specification of the output subtitles. Valid values:

  • lp_ld: 360p (640 × 360)
  • lp_ld_v: 360p (360 × 640)
  • lp_sd: 480p (854 × 480)
  • lp_sd_v: 480p (480 × 854)
  • lp_hd: 720p (1280 × 720)
  • lp_hd_v: 720p (720 × 1280)
  • lp_ud: 1080p (1920 × 1080)
  • lp_ud_v: 1080p (1080 × 1920)
SubtitleId String No 445409ec-7eaa-461d-8f29-4bec2eb9****

The ID of the subtitle template.

Description String No live AI subtitle template

The description of the subtitle rule. The description can be up to 128 characters in length and can contain letters, digits, and special characters.

Response parameters

Parameter

Type

Example

Description

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

The request ID.

Examples

Sample request

http(s)://live.aliyuncs.com/?Action=UpdateLiveAIProduceRules
&Domain=demo.aliyundoc.com
&App=AppName
&SubtitleName=sub01
&IsLazy=true
&IsOrigin=true
&RulesId=445409ec-7eaa-461d -8f29-4bec2eb9****
&LiveTemplate=lp_ld
&SubtitleId=445409ec-7eaa-461d-8f29-4bec2eb9****
&Description=live AI subtitle template
&<Common request parameters>

Sample success responses

XML format

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

<UpdateLiveAIProduceRulesResponse>
    <RequestId>5c6a2a0df228-4a64-af62-20e91b96****</RequestId>
</UpdateLiveAIProduceRulesResponse>

JSON format

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

{
  "RequestId" : "5c6a2a0df228-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.