Video File
Video File
Video File is an input node which will scan a file and load the Video Information (codecs/tracks etc) for processing in the flow.
Variables
Variable | Description | Type | Example |
---|---|---|---|
vi.VideoInfo | VideoInfo object | object | See Below |
vi.Width | Width of video | number | 1920 |
vi.Height | Height of video | number | 1080 |
vi.Duration | Duration of video in seconds | number | 60 |
vi.Video.Codec | Codec of video | string | hevc |
vi.Audio.Codec | Codec of audio | string | eac3 |
vi.Audio.Channels | Number of audio channels of first audio track | number | 5.1 |
vi.Audio.Language | Language of audio of first audio track | string | en |
vi.Audio.Codecs | List of all audio of audio tracks | string | eac3, ac3, aac, dts |
vi.Audio.Languages | List of all of audio track languages | string | en, deu, mao |
vi.Resolution | Computed resolution of file (4K, 1080p, 720p, 480p, SD) | string | 4K |
class VideoInfo
{
FileName: string;
Bitrate: number;
VideoStreams: VideoStream[];
AudioStreams: AudioStream[];
SubtitleStreams: SubtitleStream[];
Chapters: Chapter[];
}
class VideoFileStream
{
// overall index of this stream
Index: number;
// the index relative to the stream type
TypeIndex: number;
// the title of hte video
Title: string;
// the video bitrate
Bitrate: number;
// the codec used
Codec: string;
// if this stream is an image stream
IsImage: boolean;
// the formated index as a FFmpeg string
IndexString: string;
// the index of the input file
InputFileIndex: number;
}
class VideoStream extends VideoFileStream
{
// if this is HDR or not
HDR: boolean;
// if this is dolby vision or not
DolbyVision: boolean;
// the width in pixels
Width: number;
// the height in pixels
Height: number;
// the number of frames per second
FramesPerSecond: number;
// the duration of the video in seconds
Duration: number;
// the bits of the video if detected, 0 if undetected
Bits: number;
}
class AudioStream extends VideoFileStream
{
Language: string;
Channels: number;
Duration: number;
SampleRate: number;
}
class SubtitleStream extends VideoFileStream
{
Language: string;
Forced: boolean;
}
class Chapter
{
Title: string;
Start: number;
End: number;
}