Video

The Video component is an operator component that allows users to operate video data. It can carry out the following tasks:

#Release Stage

Alpha

#Configuration

The component definition and tasks are defined in the definition.json and tasks.json files respectively.

#Supported Tasks

#Segment

Split a video into multiple shorter clips based on user-defined time segments. This task takes a video input and an optional list of time ranges, then produces an array of video segments corresponding to those ranges. Each segment becomes a separate video clip, enabling precise extraction of specific portions from the original content for targeted use or analysis.

InputIDTypeDescription
Task ID (required)taskstringTASK_SEGMENT
Video (required)videostringThe source video file to be segmented. This video will be split into multiple clips based on the specified time segments.
Segmentssegmentsarray[object]An array of time segments defining the portions of the video to be extracted. Each segment specifies a start and end time, and the task will create separate video clips for each of these segments. If not provided, the entire video will be treated as a single segment.
Input Objects in Segment

Segments

An array of time segments defining the portions of the video to be extracted. Each segment specifies a start and end time, and the task will create separate video clips for each of these segments. If not provided, the entire video will be treated as a single segment.

FieldField IDTypeNote
End Timeend-timenumberThe number of seconds from the beginning of the audio file to the end of this segment.
Start Timestart-timenumberThe number of seconds from the beginning of the audio file to the start of this segment.
OutputIDTypeDescription
Videosvideo-segmentsarray[string]An array of video clips resulting from the segmentation process. Each element in this array corresponds to one of the input segments and contains the video data for that specific time range from the original video.

#Subsample

Reduce video file size by adjusting frame rate, bitrate, and dimensions while maintaining visual content. This task optimizes storage and bandwidth requirements with minimal quality loss.

InputIDTypeDescription
Task ID (required)taskstringTASK_SUBSAMPLE
Video (required)videostringThe source video file to be subsampled.
FPSfpsnumberThe target frame rate for the subsampled video, in frames per second. Determines the number of frames in the output video. Must provide at least one of: video-bitrate, audio-bitrate, fps, width, or height.
Video Bitratevideo-bitratenumberThe target video bitrate for the subsampled video, in bits per second. Controls the output video's data rate, affecting file size and quality. Must provide at least one of: video-bitrate, audio-bitrate, fps, width, or height.
WidthwidthintegerThe width of the subsampled video, in pixels. Controls the output video's horizontal resolution. If only width is provided, height is auto-calculated to maintain aspect ratio. Must provide at least one of: video-bitrate, audio-bitrate, fps, width, or height.
Audio Bitrateaudio-bitratenumberThe target audio bitrate for the subsampled video, in bits per second. Controls the output video's audio data rate, affecting file size and quality. Must provide at least one of: video-bitrate, audio-bitrate, fps, width, or height.
HeightheightintegerThe height of the subsampled video, in pixels. Controls the output video's vertical resolution. If only height is provided, width is auto-calculated to maintain aspect ratio. Must provide at least one of: video-bitrate, audio-bitrate, fps, width, or height.
OutputIDTypeDescription
VideovideostringThe subsampled video data, processed according to the specified input parameters. Maintains the content of the original video with potentially reduced file size due to changes in frame rate, bitrate, or dimensions.

#Extract Audio

Extract the audio track from a video file, creating a standalone audio output. This task takes a video input and isolates its sound component, removing all visual elements. The resulting audio data is provided as a single output, suitable for further audio processing, analysis, or use in audio-only applications.

InputIDTypeDescription
Task ID (required)taskstringTASK_EXTRACT_AUDIO
Video (required)videostringThe source video file from which the audio will be extracted. The video's visual content will be discarded, and only the audio track will be processed.
OutputIDTypeDescription
AudioaudiostringThe extracted audio data from the input video. This is a standalone audio file containing only the sound component of the original video, with all visual elements removed. The audio format may vary depending on the original video's audio codec and the extraction process.

#Extract Frames

Extract image frames from a video at regular intervals or specified timestamps. This task takes a video input and either an interval value or a list of timestamps. It then produces an array of image frames corresponding to these specifications, allowing for precise capture of key moments or creation of a sequence of still images from the video content.

InputIDTypeDescription
Task ID (required)taskstringTASK_EXTRACT_FRAMES
Video (required)videostringThe source video file from which frames will be extracted.
IntervalintervalnumberThe time interval between extracted frames, in seconds. If specified, frames will be extracted at regular intervals throughout the video. This parameter is mutually exclusive with timestamps.
TimestampstimestampsarrayAn array of specific timestamps (in seconds) at which to extract frames from the video. If provided, frames will be extracted only at these exact times. This parameter is mutually exclusive with interval.
OutputIDTypeDescription
Framesframesarray[string]Extracted video frames.