Queries watermark templates.

Usage notes

You can call this operation to query watermark templates. You can use the PageNumber parameter to view results in separate pages. Ensure that you have set parameters properly when you call this operation.

QPS limit

You can call this operation up to 60 times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation. For more information, see QPS limit on an API operation in ApsaraVideo Live.

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 DescribeLiveStreamWatermarks

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

PageNumber Integer No 1

The number of pages that you want to view the results in. If you do not specify this parameter, the default value of 1 is used.

PageSize Integer No 100

The number of templates that are displayed on each page. If you do not specify this parameter, the default value of 100 is used.

Response parameters

Parameter Type Example Description
RequestId String 5c6a2a0df228-4a64- af62-20e91b9676b3

The ID of the request.

WatermarkList Array of Watermark

The list of watermark templates.

Watermark
Description String my watermark

The description of the watermark.

Height Integer 200

The height of the watermark. Unit: pixel.

Name String livewatermark****

The name of the watermark.

OffsetCorner String TopRight

The position of the watermark.

  • TopLeft: the upper-left corner.
  • TopRight: the upper-right corner.
  • BottomLeft: the lower-left corner.
  • BottomRight: the lower-right corner.
PictureUrl String http://example.com

The URL of the watermark image.

RefHeight Integer 1080

The height of the background video. Unit: pixel.

RefWidth Integer 1920

The width of the background video. Unit: pixel.

TemplateId String 445409ec-7eaa-4 61d-8f29-4bec2eb9 ****

The ID of the watermark template.

Transparency Integer 255

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

Type Integer 0

The type of the watermark.

  • 0: image. Only image watermarks are supported currently.
  • 1: text.
XOffset Float 50.0

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

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.
YOffset Float 100.0

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

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.

Examples

Sample requests

http(s)://live.aliyuncs.com/?Action=DescribeLiveStreamWatermarks
&<Common request parameters>

Sample responses

XML format

<DescribeLiveStreamWatermarkResponse>
  <RequestId>5c6a2a0df228-4a64- af62-20e91b9676b3</RequestId>
  <WatermarkList>
        <Watermark>
              <RefHeight>1080</RefHeight>
              <Transparency>255</Transparency>
              <Type>0</Type>
              <Description>my watermark</Description>
              <PictureUrl>http://example.com</PictureUrl>
              <OffsetCorner>TopRight</OffsetCorner>
              <Height>200</Height>
              <YOffset></YOffset>
              <XOffset></XOffset>
              <RefWidth>1920</RefWidth>
              <TemplateId>445409ec-7eaa-4 61d-8f29-4bec2eb9 ****</TemplateId>
              <Name>livewatermark****</Name>
        </Watermark>
  </WatermarkList>
</DescribeLiveStreamWatermarkResponse>

JSON format

{
    "RequestId": "5c6a2a0df228-4a64- af62-20e91b9676b3",
    "WatermarkList": {
        "Watermark": [
            {
                "RefHeight": "1080",
                "Transparency": "255",
                "Type": "0",
                "Description": "my watermark",
                "PictureUrl": "http://example.com",
                "OffsetCorner": "TopRight",
                "Height": "200",
                "YOffset": "",
                "XOffset": "",
                "RefWidth": "1920",
                "TemplateId": "445409ec-7eaa-4 61d-8f29-4bec2eb9 ****",
                "Name": "livewatermark****"
            }
        ]
    }
}

Error codes

For a list of error codes, visit the Error Center.