video

package
v0.27.0-beta Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2024 License: MIT Imports: 12 Imported by: 0

README

---
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 |







Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(bc base.Component) *component

Types

type Frame

type Frame string

Base64 encoded frame

type SubsampleVideoFramesInput

type SubsampleVideoFramesInput struct {
	Video     Video  `json:"video"`
	Fps       int    `json:"fps"`
	StartTime string `json:"start-time"`
	Duration  string `json:"duration"`
}

type SubsampleVideoFramesOutput

type SubsampleVideoFramesOutput struct {
	Frames []Frame `json:"frames"`
}

type SubsampleVideoInput

type SubsampleVideoInput struct {
	Video     Video  `json:"video"`
	Fps       int    `json:"fps"`
	StartTime string `json:"start-time"`
	Duration  string `json:"duration"`
}

type SubsampleVideoOutput

type SubsampleVideoOutput struct {
	Video Video `json:"video"`
}

type Video

type Video string

Base64 encoded video

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL