VideoContent

Bring in a movie file and cut it into your video, or pull single frames and its sound into a script.

A VideoContent points at a video file (MP4, MOV, WebM, GIF and more), read through ffmpeg, which has to be installed. The file stays on disk; the project keeps only its path. FrameCount, FPS, Size and Duration come from the file. video:GetFrame(i) returns frame i as an ImageContent and video:GetSound() its sound as a SoundContent. Dropped on a video or the Cook window it becomes a clip at the playhead, with its sound, decoded at the size it is drawn.

Properties

File

NameTypeDefaultDescription
DurationnumberThe video's duration, read from the file.
FPSnumberThe video's frames per second, read from the file.
FrameCountnumberThe number of frames in the video, read from the file.
PathstringThe path to the video file, read through ffmpeg.
Resolutionread-only textProperties window only

Scripts

SizeVector2scripts onlyThe video's size, read from the file.

Methods

NameArgumentsReturnsDescription
GetFrame(index: number, into: ImageContent?)ImageContentDecodes frame i of the video and gives it as an ImageContent; recent frames are cached.
GetSound()SoundContentGives a SoundContent on the same file, one per video.
From Instance 22