Nodes/ComfyTV/Extract Frames
ComfyUI Node

Extract Frames

Mark a timeline, get a batch of stills back

By jtydhr88·Created 3 months ago·Updated about 15 hours ago· 725
Extract Frames
  • video
  • images
force_run_token0
project_id
parent_output_id0
marks

Single-frame extraction is handy, but sometimes you need a half-dozen stills from the same clip - reference frames for a style pass, key moments to compare, a row of thumbnails for a contact sheet. That's what Extract Frames is for. Where its sibling grabs one frame with a dropdown, this one lets you mark several timestamps and get them back as one batch.

What it does

The node body has a marker strip over the clip preview. You drop marks at the moments you want, hit ▶ Run, and the server decodes each marked frame via PyAV and saves them as a COMFYTV_IMAGES batch snapshot. The strip is the entire interface - it drives a hidden marks field containing a JSON list of timestamps in seconds. You are not meant to hand-edit that JSON, and if no valid marks are set, the run errors out rather than silently returning nothing.

Inputs and outputs, honestly:

  • marks (hidden) - the JSON list of seconds the marker strip writes. Duplicate and negative times get cleaned up.
  • video - upstream COMFYTV_VIDEO.
  • Output: images - the extracted stills as a COMFYTV_IMAGES batch.

There's a cap on how many frames one run extracts (the docs say "up to a few dozen"), so mark what you actually need instead of sampling densely.

When to reach for it

The straightforward answer: when "one frame" isn't enough. Pull key stills to seed several I2V continuations, sample a shot at different moments to judge composition, or grab frames for an Image Picker to run a compare. For the single-frame case - especially "grab the last frame and extend" - use Extract Frame instead; it has the first/middle/last presets and a custom timestamp, which is friendlier than dragging markers.

One thing the docs are upfront about: the output is COMFYTV_IMAGES, a project snapshot type. If your downstream expects native IMAGE tensors, insert a Bridge. Inside ComfyTV, the batch feeds Image Picker and the image edit stages natively.

Install and gotchas

Standard pack install - git clone https://github.com/jtydhr88/ComfyTV into ComfyUI/custom_nodes, restart, and it's under ComfyTV → Video. No models to download; this is pure PyAV media processing with no GPU involved.

Troubleshooting is short because the node is small:

  • Run errors "no valid marks" - you marked nothing (or the strip state didn't sync). Drop at least one marker and re-run.
  • The marks field looks scary - leave it alone; it's a readout of the strip, not a text box you're supposed to type into.
  • Wanted a specific single frame - that's the other node (Extract Frame). This one's for batches.

It's a thin utility, but once you're doing multi-shot work - storyboard refs, per-shot stills for a director-style pipeline - it earns its place on the canvas.

CategoryComfyTV/Video

Inputs (5)

NameTypeDefaultDescription
force_run_tokenINT00–2147483647Internal — bumped on Run to invalidate ComfyUI's input cache.
project_idSTRINGInternal — populated by the projectStore on the frontend.
parent_output_idINT00–2147483647Internal — lineage parent set by spawn handlers on the frontend.
marksSTRINGJSON list of timestamps (seconds) — driven by the marker strip in the node body.
videooptCOMFYTV_VIDEO

Outputs (1)

NameTypeDescription
imagesCOMFYTV_IMAGES