All Products
Search
Document Center

:DescribeLiveStreamWatermarks

Last Updated:Sep 20, 2024

Queries watermark templates.

Usage notes

You can call this operation to query watermark templates. You can use the PageNumber parameter to view results on separate pages. Make sure that you configure parameters properly when you call this operation.

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

Domain String No live.yourdomain.com

The main streaming domain.

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

The keyword used in the query. You can specify a template ID or name. Fuzzy search is supported for the name.

PageNumber Integer No 1

The page number. If you do not specify this parameter, the default value 1 is used.

PageSize Integer No 100

The number of entries per page. If you leave this parameter empty, the default value 100 is used.

Response parameters

Parameter

Type

Example

Description

Total Integer 100

The total number of entries that meet the specified conditions.

RequestId String 5c6a2a0df228-4a64- af62-20e91b9676b3

The request ID.

WatermarkList Array of Watermark

The watermark templates.

Watermark
Type Integer 0

The watermark type.

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

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.
RefWidth Integer 1920

The width of the background video. Unit: pixels.

YOffset Float 100.0

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.
Height Integer 200

The height of the watermark. Unit: pixels.

RefHeight Integer 1080

The height of the background video. Unit: pixels.

PictureUrl String http://example.com

The URL of the watermark image.

Transparency Integer 255

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

Description String my watermark

The description 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.
RuleCount Integer 12

The number of watermark rules configured for the domain name.

Name String livewatermark****

The name of the watermark.

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

The ID of the watermark template.

Examples

Sample requests

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

Sample success responses

XML format

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

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

JSON format

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

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

Error codes

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