Skip to main content

Watermarks

LightFlow supports adding one or more watermarks to your assets. A watermark is an image overlaid on a video, often used for security and/or branding. You can add watermarks to your video using the watermarks filter (output > filters > watermarks) of the Create Asset API method. You will need to indicate from where the overlay image should be retrieved (HTTP URL or using any of the storage providers supported by LightFlow) and the watermark placement options.


BASH
curl -XPOST 'https://api.lightflow.media/assets' \
  -H 'authorization: Bearer API_TOKEN' \
  -H 'content-type: application/json' \
  -d '{ \
      "parameters": { \
          "input": { \
              "urlPath": "http://someserver.com/VideoSample.mp4" \
            }, \
            "output": { \
              "filters": { \
                  "watermarks": [{ \
                      "input": { \
                          "urlPath": "https://dashboard.lightflow.media/assets/img/lightflow-135x42-bw.png" \
                      }, \
                      "config": { \
                          "opacity": 100, \
                          "top": "100", \
                          "left": "100", \
						  "timeRanges": [{ \
                              "start": 10, \
                              "end": 90 \
                          }] \                         
                      } \
                    }] \
                } \
            }, \
            "perceptual-quality": { \
              "h264": { \
                  "maxBitrate": 8000, \
                    "minBitrate": 250, \
                    "maxResolution": 1080, \
                    "targetQuality": 100 \
                } \
            } \
      } \
    }'

Placement settings

  • opacity: How opaque the overlay should appear on a scale from 0-100, where 0 is fully transparent.
  • top: Top position of the watermark as a percent of the video height (e.g. "5%") or as an absolute pixel value (e.g. "100").
  • bottom: Bottom position of the watermark as a percent of the video height (e.g. "5%") or as an absolute pixel value (e.g. "100").
  • left: Left position of the watermark as a percent of the video width (e.g. "5%") or as an absolute pixel value (e.g. "100").
  • right: Right position of the watermark as a percent of the video width (e.g. "5%") or as an absolute pixel value (e.g. "100").
  • width: Width of the watermark as a percent of the video width (e.g. "20%") or as an absolute pixel value (e.g. "120"). If both width and height are empty, source image width and height will be used. If only height is specified, width is automatically calculated to keep aspect ratio.
  • height: Height of the watermark as a percent of the video width (e.g. "20%") or as an absolute pixel value (e.g. "150"). If both width and height are empty, source image width and height will be used. If only width is specified, height is automatically calculated to keep aspect ratio.
  • timeRanges: Array specifying the range of time during which the watermark is shown (floating point numbers allowed). It is defined by start and end point marks.



JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.