Video Output
There are some filters you can apply to the output video. You can use only filters, you can transcode only, or you can transcode and apply filters.
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": "video",
"reference_id" : "<your_reference_id>",
"target_path" : "/outputs/thumbnails/interval",
"type_specific_config" : {
"container":"mp4",
"codec":"h264",
"subtitles":true,
"filters" : {
"resize" : {
"width": 300,
"height": 250,
"aspect_ratio" : true
},
"clip" : {
"from": 130,
"to": 160,
//"duration": 20
},
"overlay_image": {
"url": "https://<your_image_url>/overlay_1.png",
"coordinate_x": 16,
"coordinate_y": 16,
"between_seconds": "10-14"
},
"crop" : {
"width":300,
"height": 300,
"coordinate_x":500,
"coordinate_y":200
}
},
"audio": {
"codec":"aac",
"bitrate":128
}
}
}
]
}
type_specific_config Object for Video
Field | Required | Default | Available Values | Description |
---|---|---|---|---|
container | NO | mp4 | mp4, webm, mov, mkv | If the codec and container you send are not compatible, we will automatically choose the compatible codec. The codec will be changed according to the container field you provided |
codec | NO | h264 | h264, h265, vp8, vp9, prores | Output video codec |
subtitles | NO | false | true, false | If this field is true, VimQu will create ai generated subtitle files in target_path directory. The file names will be subtitle.vtt and subtitle.srt |
filters | NO | null | filters object | Please look filters object |
filters object
resize
Field | Required | Default | Available Values | Description |
---|---|---|---|---|
width | NO | Input video width | integer or null | Output video width. |
height | NO | Input video height | integer or null | Output video height. |
aspect_ratio | NO | true | boolean or null | If you send true, the aspect ratio will not change and it will scale with the width height values you give. Black background will be used. @TODO |
crop
Field | Required | Default | Available Values | Description |
---|---|---|---|---|
width | YES | - | integer | Output video width |
height | YES | - | integer | Output video height |
coordinate_x | NO | 1 | integer | Horizontal coordinate of input video |
coordinate_y | NO | 1 | integer | Vertical coordinate of input video |
clip
Field | Required | Default | Available Values | Description |
---|---|---|---|---|
from | NO | 0 | integer or null | Start time for clip (seconds) |
to | NO | Input file last second | integer or null | Start time for clip (seconds) |
duration | NO | Input file last duration | integer or null | Duration for clip. Only one of "to" or "duration" can be used. You should use "to" for the exact end time. With "duration" you can specify how many seconds to cut from the start |
overlay_image
Field | Required | Default | Available Values | Description |
---|---|---|---|---|
url | YES | Image URL | Valid URL | You can use jpg, png, webp, ico images |
width | NO | Original Image Size | integer or null | Overlay image width |
height | NO | Original Image Size | integer or null | Overlay image height |
between_seconds | NO | null | string or null | The range in which the image will be shown. Format must be: first_soconds-last_second, 35-250 |
Response
tip
When you create a Video output, you will get a "Common Task Result Object". Please check it.