All Products
Search
Document Center

ApsaraVideo Live:AddLiveStreamWatermark

Last Updated:Nov 14, 2024
This topic is generated by a machine translation engine without any human intervention. ALIBABA CLOUD DOES NOT GUARANTEE THE ACCURACY OF MACHINE TRANSLATED CONTENT. To request a human-translated version of this topic or provide feedback on this translation, please include it in the feedback form.

Creates a watermark template.

Operation description

  • You can call this operation to create a watermark template and configure information such as the watermark content and layout in the template.
  • After you create a watermark template, you must also call the AddLiveStreamWatermarkRule operation to add a watermark rule. A live stream in progress can contain the watermark only after the stream is re-ingested.

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.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
live:AddLiveStreamWatermarkcreate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
TypeintegerYes

The type of the watermark. Valid values:

  • 0: image.
  • 1: text. Only image watermarks are supported.
0
NamestringYes

The name of the watermark.

livewatermark****
RefWidthintegerYes

The width of the background video. Unit: pixels.

1920
RefHeightintegerYes

The height of the background video. Unit: pixels.

1080
XOffsetfloatYes

The offset of the watermark along the x-axis. Unit: pixels.

Note In this case, the value of the RefWidth parameter is used as the reference. If the OffsetCorner parameter is set to TopLeft, the value of the XOffset parameter indicates the x-axis offset of the upper-left corner of the watermark relative to that of the background video. The directions from the coordinate axes to the center of the background video are positive. In other words, the x-axis is positive toward the right.
50.0
YOffsetfloatYes

The offset of the watermark along the y-axis. Unit: pixels.

Note In this case, the value of the RefHeight parameter is used as the reference. If the OffsetCorner parameter is set to TopLeft, the value of the YOffset parameter indicates the y-axis offset of the upper-left corner of the watermark relative to that of the background video. The directions from the coordinate axes to the center of the background video are positive. In other words, the y-axis is positive downward.
100.0
HeightintegerYes

The height of the watermark. Unit: pixels. The height of the watermark is scaled in proportion to the height of the background video.

200
TransparencyintegerYes

The transparency of the watermark. A smaller value indicates a more transparent watermark. Valid values: 0 to 255.

255
OffsetCornerstringYes

The location of the watermark. Valid values:

  • TopLeft: the upper-left corner.
  • TopRight: the upper-right corner.
  • BottomLeft: the lower-left corner.
  • BottomRight: the lower-right corner.
TopRight
PictureUrlstringYes

The URL of the watermark image.

http://example.com
DescriptionstringNo

The description of the watermark.

my watermark
DomainstringNo

The streaming domain.

example.aliyundoc.com

Response parameters

ParameterTypeDescriptionExample
object
TemplateIdstring

The ID of the watermark template.

445409ec-7eaa-461d-8f29-4bec2eb9****
RequestIdstring

The request ID.

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

Examples

Sample success responses

JSONformat

{
  "TemplateId": "445409ec-7eaa-461d-8f29-4bec2eb9****",
  "RequestId": "5c6a2a0df228-4a64- af62-20e91b96****"
}

Error codes

HTTP status codeError codeError message
400InvalidParameters%s

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history