Thumbnail Output
You can use the following 3 methods to create a thumbnail from a video.
1- Number
Creates number
of thumbnails from the video. For example: if the video duration is 100 seconds and number
is 2, the first image is taken at second 0 and the second image at second 50.
Request
POST https://vimqu.com/api/task
{
"input": {
"source_type": "storage",
"storage_id": "<your_ftp_storage_id>",
"path": "/itx_case_4k.webm"
},
"outputs": [
{
"storage_id": "820a-4c46-bfb9-698d32ec1388",
"type": "thumbnail",
"reference_id" : "<your_reference_id>",
"target_path" : "/outputs/thumbnails/number",
"type_specific_config": {
"number": 10,
"container": "png",
"width" : 110,
"height": 110
}
}
]
}
type_specific_config Object for Number
Field | Required | Default | Available Values | Description |
---|---|---|---|---|
number | YES | - | integer | output image count |
container | NO | jpg | jpg, png, webp | output image format |
width | NO | original video size | integer | output image width |
height | NO | original video size | integer | output image height |
2- Exact Seconds
Generates images from exactly the given seconds
Request
POST https://vimqu.com/api/task
{
"input": {
"source_type": "storage",
"storage_id": "<your_ftp_storage_id>",
"path": "/itx_case_4k.webm"
},
"outputs": [
{
"storage_id": "820a-4c46-bfb9-698d32ec1388",
"type": "thumbnail",
"reference_id" : "<your_reference_id>",
"target_path" : "/outputs/thumbnails/exact_seconds",
"type_specific_config": {
"exact_seconds": [14,160,500],
"container": "png",
"width" : 110,
"height": 110
}
}
]
}
type_specific_config Object for Exact Seconds
Field | Required | Default | Available Values | Description |
---|---|---|---|---|
exact_seconds | YES | - | array of integer | output image seconds |
container | NO | jpg | jpg, png, webp | output image format |
width | NO | original video size | integer | output image width |
height | NO | original video size | integer | output image height |
3- Interval
Takes images for video at certain intervals
POST https://vimqu.com/api/task
{
"input": {
"source_type": "storage",
"storage_id": "<your_ftp_storage_id>",
"path": "/itx_case_4k.webm"
},
"outputs": [
{
"storage_id": "820a-4c46-bfb9-698d32ec1388",
"type": "thumbnail",
"reference_id" : "<your_reference_id>",
"target_path" : "/outputs/thumbnails/interval",
"type_specific_config": {
"interval": 5,
"container": "png",
"width" : 110,
"height": 110
}
}
]
}
type_specific_config Object for Interval
Field | Required | Default | Available Values | Description |
---|---|---|---|---|
interval | YES | - | integer | interval seconds |
container | NO | jpg | jpg, png, webp | output image format |
width | NO | original video size | integer | output image width |
height | NO | original video size | integer | output image height |
If you want to use some of these together, you can send a request like this:
Request
POST https://vimqu.com/api/task
{
"input": {
"source_type": "storage",
"storage_id": "<your_ftp_storage_id>",
"path": "/itx_case_4k.webm"
},
"outputs": [
{
"storage_id": "820a-4c46-bfb9-698d32ec1388",
"type": "thumbnail",
"reference_id" : "<your_reference_id>",
"target_path" : "/outputs/thumbnails/interval",
"type_specific_config": {
"interval": 5,
"container": "png",
"width" : 110,
"height": 110
}
},
{
"storage_id": "820a-4c46-bfb9-698d32ec1388",
"type": "thumbnail",
"reference_id" : "<your_reference_id>",
"target_path" : "/outputs/thumbnails/number",
"type_specific_config": {
"number": 10,
"container": "png",
"width" : 110,
"height": 110
}
}
]
}
Response
tip
When you create a Thumbnail output, you will get a "Common Task Result Object". Please check it.