Create reusable and dynamic watermark settings

The idea behind watermark templates is that you can keep the layout and style of the watermark consistent while making the content dynamic. Templates support placeholders. So, you can define variables that will be replaced with values at watermark time.

The following is a simple example that shows what a template could look like supporting a dynamic name:

{
  "name": "my-example-watermark-temaplte",
  "settings": [
    {
      "content": "{name}"
    }
  ]
}

Template Options

This section provides example settings and templates that can be used to meet most common watermarking scenarios. The SafeStream template API provides many customization options that allow you to go beyond the templates listed here.

Property NameRequiredExampleDescription
nameYesMy TemplateThe name of the template. This should be unique per account.
descriptionNoThis is a description of my templateA description of the template.
settingsYesAn array of Objects describing the watermarks on the template.The watermark settings.

Settings is an array of objects, where each object matches the following description.

Property NameRequiredExampleDescription
contentYesUser Name: [%firstName%] [%lastName%]Plain text, such as a users' name or email address
fontColorNo0xFFFFFFThe hexadecimal color value for the content
fontOpacityNo0.50xFFFFFF
fontSizeNo0.5Value between 0 and 1. The ensure that watermark text is place within the frame of the video, the font size is relative to the width of the video. For most videos a font size between 0.05 and 0.15 is reasonable.
xNo0.5Relative horizontal position of the text. The position is relative to the size of the video. So, an x value of 0.5 will position the text in the horizontal center of the video.
yNo0.5Relative vertical position of the text. The position is relative to the size of the video. So, a y value of 0.5 will position the text in the vertical center of the video.
alignNoCENTER
LEFT
RIGHT
Relative horizontal position of the text. The position is relative to the size of the video. So, an x value of 0.5 will position the text in the horizontal center of the video.
verticalAlignNoTOP
CENTER
BOTTOM
Relative vertical position of the text. The position is relative to the size of the video. So, a y value of 0.5 will position the text in the vertical center of the video.
shadowColorNo0x000000The hexadecimal color value for the shadow
shadowOffsetXNo0.08Percentage offset from the main text
shadowOffsetYNo0.08Percentage offset from the main text
shadowOpacityNo0.33333334Opacity of the shadow, value between 0-1.

Advanced Settings:

{
  	"name": "A brand new template",
  	"description": "Here, we can describe our new template",
    "settings": [
           {
      "content": "[%firstName%] [%lastName%]",
      "fontColor": "FFFFFF",
      "y": 0.02,
      "x": 0.02,
      "fontOpacity": 0.5,
      "fontSize": 0.04,
      "align": "LEFT",
      "verticalAlign": "TOP",
      "shadowColor": "000000",
      "shadowOffsetX": 0.08,
      "shadowOffsetY": 0.08,
      "shadowOpacity": 0.33
    },
    {
      "content": "ACME Studios",
      "fontColor": "FFFFFF",
      "y": 0.02,
      "x": 0.98,
      "fontOpacity": 0.5,
      "fontSize": 0.04,
      "align": "RIGHT",
      "verticalAlign": "TOP",
      "shadowColor": "000000",
      "shadowOffsetX": 0.08,
      "shadowOffsetY": 0.08,
      "shadowOpacity": 0.33
    },
      {
      "content": "PROPERTY OF ACME",
      "fontColor": "FFFFFF",
      "y": 0.5,
      "x": 0.5,
      "fontOpacity": 0.1,
      "fontSize": 0.1,
      "align": "CENTER",
      "verticalAlign": "MIDDLE",
      "shadowColor": "000000",
      "shadowOffsetX": 0.08,
      "shadowOffsetY": 0.08,
      "shadowOpacity": 0.33
    },
    {
      "content": "DO NOT DISTRIBUTE",
      "fontColor": "FFFFFF",
      "y": 0.96,
      "x": 0.98,
      "fontOpacity": 0.5,
      "fontSize": 0.04,      
      "align": "RIGHT",
      "verticalAlign": "MIDDLE",
      "shadowColor": "000000",
      "shadowOffsetX": 0.08,
      "shadowOffsetY": 0.08,
      "shadowOpacity": 0.33
    }        
    ]
}
Language
Credentials
Click Try It! to start a request and see the response here!