NEW: Apply a watermark
Apply watermarks (overlays) to your video outputs.
NOTE: A watermark is applied to ALL video outputs.
Applying a watermark to an output is easy, all you need to do is add the watermark configuration section to the JobBuilder or API Body.

Using the API

With the RESTful API, in the request body, you can add the "watermark" Object to your outputs. View the example below...
1
{
2
...
3
"outputs": [
4
{
5
"encode": {
6
"format": "mp4",
7
...
8
},
9
// Add this section
10
"watermark": {
11
"imageUrl": "https://link-to-image.com/image.png",
12
"position": "top-left",
13
"size": "220x220",
14
"opacity": "0.5"
15
}
16
// END
17
},
18
]
19
}
Copied!

Using the SDK

With the SDK (any of our supported languages), it's a lot easier to apply watermarks, although most of which is relatively the same. Check out the examples below!
NodeJS / JavaScript
Python

With JobBuilder

1
const { Client, JobBuilder } = require("@vencode/sdk");
2
3
const client = new Client({
4
...
5
});
6
7
// Create a builder instance with a watermark
8
// NOTE: This example will apply a watermark to ALL outputs
9
10
const builder = new JobBuilder(client)
11
...
12
.applyWatermarkUrl(
13
"https://test.com/image.png",
14
{ position: "center", size: "220x220", opacity: "0.3" }
15
);
Copied!

Without JobBuilder

1
const { Client } = require("@vencode/sdk");
2
3
const client = new Client({
4
...
5
});
6
7
await client.encode({
8
...
9
outputs: [
10
{
11
key: "testing/sdk/webm.webm",
12
encode: { format: "webm", res: "1920x1080" },
13
14
// Watermark section - START
15
watermark: {
16
imageUrl: "https://test.com/image.png",
17
position: "center",
18
size: "220x220",
19
opacity: "0.3"
20
}
21
// Watermark section - END
22
},
23
],
24
});
Copied!
This feature is not in the Python SDK right now. We are working on adding it!