Video Get Frame
Pull out one frame from anywhere in a long video — cheaply
- video
- image
VideoGetFrame is the poster-frame node: give it a video and an index, and it hands you that one frame as an image. The thing that makes it worth using over a screenshot tool is the lazy-decode mechanism underneath. It decodes only the frame you asked for via PyAV, so grabbing frame 4,200 out of an hour-long 4K video costs about the same as grabbing frame 1. No full-file materialization, no OOM wall you hit at "video is too long."
How it works
One required input, one output:
video(VIDEO) - from Video Load Preview, like every node in this pack.frame_index(INT) - 0-indexed, default 0. Frame 0 is the first frame of the file.- Output:
image(IMAGE) - a single-frame batch, which is exactly what ComfyUI image nodes expect, so you can drop it straight into an upscaler, a VAE encode, a ControlNet preprocessor, or Save Image.
Behind the scenes it checks the video's total count, confirms your index is in range, then decodes just that one frame. If your video is already an in-memory tensor (say it came out of ImageToVideo), it just slices the tensor instead - same result, even cheaper.
Why you'd reach for it
The obvious job: previewing a moment without scrubbing through everything, or generating a poster/thumbnail for a clip. But it's also the workhorse for "extract this exact frame, process it, put it back" pipelines - match a style reference, inspect the last frame of a generated clip to decide whether to regenerate, or pull the frame where something visually interesting happens and feed it into an image-to-video node as a start image.
Common issues
- "Frame index out of range." If
frame_index≥ the video's total frames, it raises. This is the one error you'll actually see. Wire inVideoGetTotalFramesfrom the same pack to clamp the index, or just check your number. - Negative indices don't work. It's 0-indexed from the start; there's no "count from the end" convenience. Want the last frame?
frame_index = total_frames - 1. - The output is still a batch of one. If something downstream expects a batch, you're fine. If you need a plain array of pixels for a non-ComfyUI tool, unwrap it first.
Install
The standard pack install:
cd ComfyUI/custom_nodes/
git clone https://github.com/guchendesigndog/comfyui-video-edit.git
pip install -r comfyui-video-edit/requirements.txt
Or search "ComfyUI-Video-Edit" in ComfyUI Manager and restart ComfyUI. The only hard dependency is PyAV (av>=10.0.0), which needs FFmpeg on your system. It's a small MIT-licensed pack from a solo author, and this node is its cheapest and most reliable member - when the whole pack is overkill but you just need one frame out of a long clip, this is the node you'll actually reach for.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| video | VIDEO | — | |
| frame_index | INT | 00–99999 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |