Text watermark template parameters

更新时间:
复制 MD 格式

This topic describes a sample Intelligent Media Services (IMS) text watermark template and the template parameters.

Parameter

Data type

Required

Description

Example

Content

string

No

The text of the watermark. The value is encoded in UTF-8 instead of Base64.

Test watermark

FontName

string

No

The font of the text watermark. Default value: SimSun. For more information, see FontName.

SimSun

FontColor

string

No

The font color. For more information, see the font colors.

#006400

FontAlpha

number

No

The transparency of the text watermark.

  • Valid values: (0,1].

  • Default value: 1.0.

1.0

Top

number

No

The top margin of the text watermark.

  • Default value: 0.

  • Valid values: [0,4096].

10

Left

number

No

The left margin of the text watermark.

  • Default value: 0.

  • Valid values: [0,4096].

10

FontSize

integer

No

The font size.

  • Default value: 16.

  • Valid values: (4,120).

16

BorderWidth

integer

No

The outline width of the text watermark.

  • Default value: 0.

  • Valid values: (0,4096].

1

BorderColor

string

No

The outline color of the text watermark. Default value: #000000 (Black). For more information, see the outline colors.

#006400

Adaptive

boolean

No

Specifies whether to adjust the font size based on the output video size. Default value: false. Valid values:

  • true

  • false

false

FontName

Font name

SimSun

WenQuanYi Zen Hei

WenQuanYi Zen Hei Mono

WenQuanYi Zen Hei Sharp

Yuanti SC

Sample template

{
  "Left": 300,
  "Top": 300,
  "FontSize": 30,
  "Content": "Sample text watermark",
  "FontName": "WenQuanYi Zen Hei",
  "FontColor": "Darkorange",
  "BorderColor": "DarkCyan",
  "BorderWidth": 10
}