đź’€Video Frames
Pull a slice of the timeline out of your clip
- video
- image
- Frame
Sometimes you don't want the whole clip - you want a window out of the middle of it. đź’€Video Frames grabs a slice of a video or image sequence by frame range and hands you just those frames. It's the S4Motion node you reach for when you need a single still for a dataset, or a shorter segment to feed to a model that caps its input length.
It takes a video (VIDEO object) or an image (IMAGE sequence) and outputs one Frame output - the extracted batch.
Inputs that matter:
- start_frame - where to begin. Default 0.
- frame_count - how many frames to take. Default 1, so with defaults it returns a single still. That's a legit use: pull one frame out of a clip for a thumbnail or a training sample.
- background_type / background_color - same as đź’€Video Crop.
transparent(default) keeps alpha,solid_colorfills the frame's background with your hex color. This matters when the extracted frames carry alpha or when you want them composited onto a solid backdrop before they go downstream.
The mechanism is the pack standard: VIDEO input gets decoded via OpenCV, IMAGE input via Pillow, and then the node returns frames from start_frame up to start_frame + frame_count. Frames outside that window are simply not loaded - extraction is a slice, not a re-encode.
Install
ComfyUI Manager → search "S4Motion" → install → restart, or:
cd ComfyUI/custom_nodes/
git clone https://github.com/S4MUEL-404/ComfyUI-S4Motion.git
pip install -r ComfyUI-S4Motion/requirements.txt
Gotchas
- OpenCV is required for VIDEO input. Feed it a video object without
opencv-pythoninstalled and you'll get the pack's standard "OpenCV is required for video processing but not available" error. IMAGE sequences work with Pillow only. - The background settings apply to the extracted frames, which is a slightly different job than the crop node's job. If your source frames are RGB,
transparentwon't add an alpha channel out of nowhere - it mostly matters for sources that already have alpha. - No frame-rate awareness. The range is in raw frame indexes, not seconds. To pull frames from 1.0s to 1.5s of a 30fps clip, that's start_frame 30, frame_count 15 - use đź’€Video Info's
fpsoutput if you don't want to do the math in your head.
The whole pack is basically un-discussed on reddit, and this node is one of the quieter members, so there's no lore to learn - it's a plain slice tool. Use it with Video Info to check counts and you'll never have to guess your range again.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| start_frame | INT | 00–9999 | — |
| frame_count | INT | 11–9999 | — |
| background_type | COMBO | transparent | 2 options: transparent, solid_color |
| background_color | STRING | #000000 | — |
| videoopt | VIDEO | — | |
| imageopt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| Frame | IMAGE | — |