This topic describes how to create a watermark template in the ApsaraVideo Media Processing (MPS) console and configure relevant parameters.
Background information
MPS allows you to show brand and copyright information and increase product recognition by using visible watermarks, such as enterprise logos and TV station logos.
A watermark template specifies the settings of multiple parameters, such as the parameters that determine the location and size of watermarks. You can use a watermark template to simplify watermark development.
A watermark template is applicable only to image watermarks and is not applicable to text watermarks. When you call the SubmitJobs operation, you can specify the WaterMarks parameter to add text watermarks.
A watermark template specifies only watermark attributes, such as the location and size, but does not specify watermark content. You need to specify watermark content when you submit a watermark job.
You can create a watermark template in the MPS console or by calling the AddWaterMarkTemplate operation.
Limits
By default, up to 10 watermark templates can be created in each region within each Alibaba Cloud account. To create more watermark templates, submit a ticket to contact Alibaba Cloud technical support.
Procedure
Log on to the MPS console.
In the top navigation bar, select a region from the drop-down list.
In the left-side navigation pane, choose .
On the Watermark Templates page, click Create Watermark Template.
Configure the watermark template parameters that are described in the following table.
Parameter
Description
Template Name
The name of the template.
Size (Width x Height)
The width and height of the watermark. Valid values: 8 to 4096. Unit: pixel. The value must be an even number.
NoteIf you do not specify the Width or Height parameter, the watermark width is 0.12 times the width of the output video resolution, and the watermark height is proportionally scaled based on the watermark width and the aspect ratio of the original image.
If you specify only one of the Width and Height parameters, the value of the other parameter is proportionally scaled based on the aspect ratio of the original image.
If you specify both the Width and Height parameters, the size of the watermark is based on the values of the parameters.
Location
The location of the watermark. You can move the watermark to the vertices of the output video image. The upper-right, upper-left, lower-right, and lower-left corners are supported.
Horizontal Offset
The horizontal or vertical offset of the watermark relative to the output video image. You can enter a value in the field. Valid values: 8 to 4096. Unit: pixel. Default value: 0. The following figure shows the offsets of the watermark.
Vertical Offset
Click Create.
What to do next
View the watermark template: You can view the created watermark template on the Watermark Templates page.
Modify or delete the watermark template: On the Watermark Templates page, find the watermark template and click Edit or Delete in the Actions column.
Use the watermark template: When you create a transcoding job or create a workflow, enable the watermark feature, select a watermark template, and then upload a watermark image.
Related API operations
MPS allows you to manage watermark templates by calling API operations. For example, you can create, delete, modify, and query a watermark template. For more information, see Watermark template management.