This topic describes a sample Intelligent Media Services (IMS) image watermark template and the template parameters.
Parameter | Data type | Required | Description | Example |
Width | number | Yes | The width of the watermark in the output video. The value can be an integer or a decimal number.
| 32 |
Height | number | Yes | The height of the watermark image in the output video. The value can be an integer or a decimal number.
| 32 |
Dx | number | No | The horizontal offset of the watermark relative to the output video. Default value: 0. The value can be an integer or a decimal number.
| 10 |
Dy | number | No | The vertical offset of the watermark relative to the output video. Default value: 0. The value can be an integer or a decimal number.
| 10 |
ReferPos | string | Yes | The position of the watermark. Default value: TopRight. Valid values:
| TopLeft |
Timeline | JSON | No | The time configurations for the animated watermark display. For more information, see Timeline. | {"Start":"00:00:05","Duration":"ToEND"} |
File | JSON | No | The watermark image file. For more information, see File. | {"Type":"OSS","Media":"oss://examplebucket/path/to/image****.png"} |
Timeline
Parameter | Data type | Required | Description | Example |
Start | string | Yes | The beginning of the time range in which the watermark is displayed.
| 00:00:05 |
Duration | string | No | The time range in which the watermark is displayed.
| ToEND |
File
Parameter | Data type | Required | Description | Example |
Type | string | Yes | The type of the media object. Valid values:
| OSS |
Media | string | Yes | The information about the media object.
| oss://examplebucket/path/to/image****.png |
Sample template
{
"Dx": 120,
"Dy": 130,
"Height": 30,
"ReferPos": "BottomLeft",
"File": {
"Type": "OSS",
"Media": "https://sample-bucket.oss-cn-shanghai.aliyuncs.com/sample.gif"
},
"Width": 20
}