Video Player

Plays a video file as a texture.

Outputs

NameTypeDescription
OutputTextureThe frame of the file at the current position.

Parameters

NameTypeDescription
SizeoutputVector 2 IntThe width and height of the frames in pixels.
PositionoutputFloatThe current position in the file, in seconds from its start.
DurationoutputadvancedFloatThe length of the file in seconds, or 0 until a file that does not state its length has played to its end once.
Frame RateoutputadvancedFloatThe frames per second the file states, or 0 when it does not say.
DirectionoutputadvancedIntWhich way the position moves, 1 forwards, -1 backwards and 0 while it stands still.
End ReachedoutputadvancedTriggerFires each time the position reaches an end of the file, or of the trim range.
File PathStringThe video file to play.
Play ModeEnumWhat moves the position.Choices: Automatic, Manual
Manual PositionFloatThe position to show, in seconds from the start of the file. Only present when Play Mode is Manual.
PlayBoolWhether the position moves. While off, the current frame stays.
RestartTriggerPuts the position at the start of the file, or of the trim range.
SpeedFloatHow many seconds of the file pass per second, with a negative value playing backwards.
At EndEnumWhat happens when the position reaches an end of the file, or of the trim range. Stop stops there, Loop jumps to the other end and Ping-Pong turns around.Choices: Stop, Loop, Ping-Pong
TrimBoolWhether only a part of the file plays.
Trim In / OutVector 2The start and the end of the part to play, in seconds. Only present when Trim is on.
DecoderadvancedEnumWhether the graphics card or the processor decodes the file. Auto uses the graphics card when it can.Choices: Auto, Hardware, Software

The Video Player operator plays a video file as a texture. Any common container and codec plays, including H.264, HEVC, ProRes, DNxHR and MJPEG, and animated GIFs too.

In Automatic mode, the position moves with the graph’s clock at the chosen speed. In Manual mode, Manual Position sets the position every frame, and Play, Speed and At End have no effect. Connect a signal to Manual Position to scrub through the file.

After a jump, the nearest earlier keyframe shows at once and the exact frame follows a moment later. Scrubbing and playing backwards are smooth on codecs where every frame is a keyframe, such as ProRes, DNxHR, HAP and MJPEG. On H.264 and HEVC, playing backwards shows only a keyframe every few frames, so convert such a file to ProRes or HAP for scrubbing. Decoding on the graphics card is available on Windows and macOS, and in Hardware mode a file the graphics card cannot decode does not play.

Keywords: movie, clip, film, mp4, mov, scrub, loop, reverse, playback