Nodes/comfy_Pond_Nodes/🐳Video Frame Range Extractor
ComfyUI Node

🐳Video Frame Range Extractor

Turn a clip into a subsampled image batch

By Pondowner857·Created about a year ago·Updated 21 days ago· 45
🐳Video Frame Range Extractor
  • video
  • image
start_frame0
end_frame10
step1

Video Frame Range Extractor is the batch sibling of the pack's frame extractor: instead of pulling one frame out of a video, it pulls a run of frames and hands them back as a single IMAGE batch. Same input convention, same logic - the video input is a frame-sequence tensor from a video loader, not a file path. You tell it where to start, where to stop, and how many to skip, and you get a subsampled version of the clip.

The three inputs are self-explanatory: start_frame (default 0), end_frame (default 10), and step (default 1). It slices the tensor from start to end inclusive, walking by step - so start 0, end 30, step 5 gives you frames 0, 5, 10, 15, 20, 25, 30. Both ends clamp to the actual video length, so an overlong end_frame just stops at the last frame rather than erroring. Output is a single image output: the selected frames stacked into one IMAGE batch.

Why would you subsample a video? Three reasons, all practical. First, saving VRAM and time: a 24fps clip of a hundred frames is a heavy batch to run through img2img or a detailer; grabbing every 3rd or 4th frame gives you a representative set at a third of the cost. Second, building input batches for video-to-video work: many pipelines want a thinned sequence as conditioning rather than the full clip. Third, contact-sheet style review - extract a spread of frames across the clip and eyeball them in one preview instead of scrubbing.

The step knob is where the thinking happens. step 1 gives you the full contiguous range - that's the "cut a segment out of a clip" use (trim the first 30 frames and pass the rest onward). Larger steps are the "thinning" use. If you want an even spread across the whole clip rather than a fixed range, note this node doesn't do percentage math - that's the single-frame extractor's job - so you'll set start/end by frame number.

Honest limits: it's a dumb slice, no interpolation, no smart frame selection, no dedup. If end_frame is below start_frame the code forces end >= start, which means you can't easily reverse a clip with this - use a different node for that. And it operates on the tensor you give it, so the loader's framerate is on you. For a clean subsampling tool in a video pipeline, it does exactly the job with no surprises.

Install

Part of Pond Nodes:

cd ComfyUI/custom_nodes
git clone https://github.com/Pondowner857/comfy_Pond_Nodes
cd comfy_Pond_Nodes
pip install -r requirements.txt

Restart after (or Manager → "comfy_Pond_Nodes"). No models, no optional deps. The pack-wide README caveat: console spam if comfyui_HiDream-Sampler is also installed.

Category🐳Pond/video

Inputs (4)

NameTypeDefaultDescription
videoIMAGE
start_frameINT00–9999
end_frameINT100–9999
stepINT11–100

Outputs (1)

NameTypeDescription
imageIMAGE