ComfyTV/Videogenerated

Extract Frames(VideoFramesStage)

The Extract Frames node (class VideoFramesStage) pulls individual frames from a video at user-defined timestamps and returns them as an image batch.

Video Frames Stage

video
images
marks
STRING
ComfyTV

Description

The Extract Frames node (class VideoFramesStage) pulls individual frames from a video at user-defined timestamps and returns them as an image batch. Timestamps are supplied as a JSON list of seconds through the marks input, which is normally populated by the interactive marker strip embedded in the node body. This makes it a convenient way to grab stills for thumbnails, contact sheets, keyframe inspection, or any workflow that needs a few representative frames rather than the full video stream.

Inputs

marks

Required. A JSON-formatted string containing a list of timestamps in seconds, for example [0, 1.5, 3.2]. Each entry identifies one frame to extract. The default is an empty string, which yields no frames. In normal use you do not need to type this JSON by hand: the node's marker strip drives the value as you add, move, or remove markers, and the string is updated automatically. Frames are returned in the same order as the timestamps in the list.

video

Optional COMFYTV_VIDEO input. This is the source video from which frames are sampled. Although the socket is optional at the connection level, you need to supply a video for the node to produce any frames. Connect a video produced or loaded by another ComfyTV video node.

Outputs

images

A COMFYTV_IMAGES output containing the extracted frames, ordered to match the marks list. Because this is a ComfyTV-specific image type rather than the standard IMAGE type, downstream nodes should be ComfyTV-compatible or accept COMFYTV_IMAGES directly.

Usage Notes

  1. Connect a COMFYTV_VIDEO source to the video input.
  2. Set the desired extraction points using the marker strip in the node body. Each marker corresponds to one timestamp in marks.
  3. Queue the prompt. The node returns one frame per timestamp, in list order.

Points to keep in mind:

  • Timestamps are interpreted in seconds from the start of the video, and fractional values (for example 2.75) select sub-second positions.
  • An empty marks value means no frames are requested; make sure at least one marker exists or the JSON list is non-empty.
  • If you edit the JSON manually, it must remain valid JSON (a flat list of numbers) or the node will fail to parse it.
  • The output order follows the order of the marks list, so reordering timestamps reorders the resulting frames without needing to change the video input.

Comments

Sign in with GitHub to join the discussion.

Loading comments…