Output multiple thumbnails
Create thumbnails from different timecodes of the video you are transcoding - easily.

Using the API

With the RESTful API, in the request body, you can add the "thumbnails" array to tell the transcoding process to output the thumbnails you define. In the example below, we are outputting two thumbnails - one at 10 seconds, and the other at 20 seconds. Both of which are 720p resolution, and are being stored as the corresponding "key" in the same bucket at you should have setup in the credentials object of the request.
1
{
2
...
3
// Add this section
4
"thumbnails": [
5
{
6
"key": "thumbnails/thumb-1.png",
7
"at": "00:10",
8
"size": "1280x720"
9
},
10
{
11
"key": "thumbnails/thumb-2.png",
12
"at": "00:20",
13
"size": "1280x720"
14
}
15
]
16
// END
17
}
Copied!

Using the SDK

With the SDK (any of our supported languages), it's a lot easier to take thumbnails, 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 thumbnails
8
const builder = new JobBuilder(client)
9
...
10
.takeThumbnails([
11
{ key: "thumbnails/thumb-1.png", at: "00:10", size: "1280x720" },
12
{ key: "thumbnails/thumb-2.png", at: "00:20", size: "1280x720" },
13
]);
Copied!

Without JobBuilder

1
const { Client } = require("@vencode/sdk");
2
3
const client = new Client({
4
...
5
});
6
7
await client.encode({
8
...
9
thumbnails: [
10
{ key: "thumbnails/thumb-1.png", at: "00:10", size: "1280x720" },
11
{ key: "thumbnails/thumb-2.png", at: "00:20", size: "1280x720" },
12
],
13
});
Copied!
This feature is not apart of the Python SDK just yet. We are working on adding it!