-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add video operator to fulfil unstructured data process (#238)
Because - we want to make vdp process all types of unstructured data This commit - add video operator to subsample video to video or images for different use cases
- Loading branch information
1 parent
8648326
commit a1459d7
Showing
10 changed files
with
606 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
--- | ||
title: "Video" | ||
lang: "en-US" | ||
draft: false | ||
description: "Learn about how to set up a VDP Video component https://github.com/instill-ai/instill-core" | ||
--- | ||
|
||
The Video component is an operator component that allows users to extract and manipulate video from different sources. | ||
It can carry out the following tasks: | ||
|
||
- [Subsample Video](#subsample-video) | ||
- [Subsample Video Frames](#subsample-video-frames) | ||
|
||
|
||
|
||
## Release Stage | ||
|
||
`Alpha` | ||
|
||
|
||
|
||
## Configuration | ||
|
||
The component configuration is defined and maintained [here](https://github.com/instill-ai/component/blob/main/operator/video/v0/config/definition.json). | ||
|
||
|
||
|
||
|
||
|
||
## Supported Tasks | ||
|
||
### Subsample Video | ||
|
||
Subsample video into a new video | ||
|
||
|
||
| Input | ID | Type | Description | | ||
| :--- | :--- | :--- | :--- | | ||
| Task ID (required) | `task` | string | `TASK_SUBSAMPLE_VIDEO` | | ||
| Video (required) | `video` | string | Base64 encoded video | | ||
| FPS (required) | `fps` | number | Frames per second | | ||
| Start time | `start-time` | string | Start time in seconds, format is hh:mm:ss | | ||
| Duration | `duration` | string | Duration in seconds, format is hh:mm:ss | | ||
|
||
|
||
|
||
| Output | ID | Type | Description | | ||
| :--- | :--- | :--- | :--- | | ||
| Video | `video` | string | Base64 encoded sub-sampled video | | ||
|
||
|
||
|
||
|
||
|
||
|
||
### Subsample Video Frames | ||
|
||
Subsample video into frames | ||
|
||
|
||
| Input | ID | Type | Description | | ||
| :--- | :--- | :--- | :--- | | ||
| Task ID (required) | `task` | string | `TASK_SUBSAMPLE_VIDEO_FRAMES` | | ||
| Video (required) | `video` | string | Base64 encoded video | | ||
| FPS (required) | `fps` | number | Frames per second | | ||
| Start time | `start-time` | string | Start time in seconds, format is hh:mm:ss | | ||
| Duration | `duration` | string | Duration in seconds, format is hh:mm:ss | | ||
|
||
|
||
|
||
| Output | ID | Type | Description | | ||
| :--- | :--- | :--- | :--- | | ||
| Frames | `frames` | array[string] | Base64 encoded sub-sampled frames | | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"availableTasks": [ | ||
"TASK_SUBSAMPLE_VIDEO", | ||
"TASK_SUBSAMPLE_VIDEO_FRAMES" | ||
], | ||
"documentationUrl": "https://www.instill.tech/docs/component/operator/video", | ||
"icon": "assets/video.svg", | ||
"id": "video", | ||
"public": true, | ||
"spec": {}, | ||
"title": "Video", | ||
"type": "COMPONENT_TYPE_OPERATOR", | ||
"uid": "f0be2fd3-7266-4eeb-88eb-3bbbcc2a6b32", | ||
"version": "0.1.0", | ||
"sourceUrl": "https://github.com/instill-ai/component/blob/main/operator/video/v0", | ||
"description": "Extract and manipulate video from different sources", | ||
"releaseStage": "RELEASE_STAGE_ALPHA" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,182 @@ | ||
{ | ||
"TASK_SUBSAMPLE_VIDEO": { | ||
"instillShortDescription": "Subsample video into a new video", | ||
"input": { | ||
"description": "Factor to be used for sub-sampling the video", | ||
"instillEditOnNodeFields": [ | ||
"video", | ||
"fps" | ||
], | ||
"instillUIOrder": 0, | ||
"properties": { | ||
"video": { | ||
"description": "Base64 encoded video", | ||
"instillAcceptFormats": [ | ||
"video/*" | ||
], | ||
"instillUIOrder": 0, | ||
"instillUpstreamTypes": [ | ||
"reference" | ||
], | ||
"title": "Video", | ||
"type": "string" | ||
}, | ||
"fps": { | ||
"description": "Frames per second", | ||
"instillAcceptFormats": [ | ||
"number", | ||
"integer" | ||
], | ||
"instillUIOrder": 1, | ||
"instillUpstreamTypes": [ | ||
"reference", | ||
"value" | ||
], | ||
"title": "FPS", | ||
"type": "number" | ||
}, | ||
"start-time": { | ||
"description": "Start time in seconds, format is hh:mm:ss", | ||
"instillAcceptFormats": [ | ||
"string" | ||
], | ||
"instillUIOrder": 2, | ||
"instillUpstreamTypes": [ | ||
"reference", | ||
"value" | ||
], | ||
"title": "Start time", | ||
"type": "string" | ||
}, | ||
"duration": { | ||
"description": "Duration in seconds, format is hh:mm:ss", | ||
"instillAcceptFormats": [ | ||
"string" | ||
], | ||
"instillUIOrder": 3, | ||
"instillUpstreamTypes": [ | ||
"reference", | ||
"value" | ||
], | ||
"title": "Duration", | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"video", | ||
"fps" | ||
], | ||
"title": "Input", | ||
"type": "object" | ||
}, | ||
"output": { | ||
"instillUIOrder": 1, | ||
"properties": { | ||
"video": { | ||
"description": "Base64 encoded sub-sampled video", | ||
"instillFormat": "video/*", | ||
"instillUIOrder": 0, | ||
"title": "Video", | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"video" | ||
], | ||
"title": "Output", | ||
"type": "object" | ||
} | ||
}, | ||
"TASK_SUBSAMPLE_VIDEO_FRAMES": { | ||
"instillShortDescription": "Subsample video into frames", | ||
"input": { | ||
"description": "Factor to be used for sub-sampling the video into frame", | ||
"instillEditOnNodeFields": [ | ||
"video", | ||
"fps" | ||
], | ||
"instillUIOrder": 0, | ||
"properties": { | ||
"video": { | ||
"description": "Base64 encoded video", | ||
"instillAcceptFormats": [ | ||
"video/*" | ||
], | ||
"instillUIOrder": 0, | ||
"instillUpstreamTypes": [ | ||
"reference" | ||
], | ||
"title": "Video", | ||
"type": "string" | ||
}, | ||
"fps": { | ||
"description": "Frames per second", | ||
"instillAcceptFormats": [ | ||
"number", | ||
"integer" | ||
], | ||
"instillUIOrder": 1, | ||
"instillUpstreamTypes": [ | ||
"reference", | ||
"value" | ||
], | ||
"title": "FPS", | ||
"type": "number" | ||
}, | ||
"start-time": { | ||
"description": "Start time in seconds, format is hh:mm:ss", | ||
"instillAcceptFormats": [ | ||
"string" | ||
], | ||
"instillUIOrder": 2, | ||
"instillUpstreamTypes": [ | ||
"reference", | ||
"value" | ||
], | ||
"title": "Start time", | ||
"type": "string" | ||
}, | ||
"duration": { | ||
"description": "Duration in seconds, format is hh:mm:ss", | ||
"instillAcceptFormats": [ | ||
"string" | ||
], | ||
"instillUIOrder": 3, | ||
"instillUpstreamTypes": [ | ||
"reference", | ||
"value" | ||
], | ||
"title": "Duration", | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"video", | ||
"fps" | ||
], | ||
"title": "Input", | ||
"type": "object" | ||
}, | ||
"output": { | ||
"instillUIOrder": 1, | ||
"properties": { | ||
"frames": { | ||
"description": "Base64 encoded sub-sampled frames", | ||
"instillFormat": "image/*", | ||
"instillUIOrder": 0, | ||
"items": { | ||
"type": "string", | ||
"title": "Frame" | ||
}, | ||
"title": "Frames", | ||
"type": "array" | ||
} | ||
}, | ||
"required": [ | ||
"frames" | ||
], | ||
"title": "Output", | ||
"type": "object" | ||
} | ||
} | ||
} |
Oops, something went wrong.