đź’€Video Crop
Crop a whole clip, not just one frame
- video
- image
- Frame sequence
Most ComfyUI crop nodes assume you're cropping one image. đź’€Video Crop does the same thing to every frame of a clip, which is exactly what you want when a video model needs a specific aspect ratio and your footage has letterbox bars or a subject sitting off-center. It's from the S4Motion pack, and it's the "reframe the whole thing" tool.
It accepts either a video (VIDEO object) or an image (IMAGE sequence) and outputs Frame sequence - every frame cropped the same way, as a batch.
The inputs are few and self-explanatory:
- crop_x / crop_y - the top-left corner of the crop box.
- crop_width / crop_height - the size of the box. Default 512x512, range 1–8192.
- background_type -
transparent(default) orsolid_color. This is for what happens where the crop box pokes past the edge of the frame, which you'll do constantly when reframing to an unusual ratio. - background_color - the hex fill for
solid_color,#000000default.
So the workflow is: work out the box (maybe use đź’€Video Info to check your source dimensions first), set the crop, and if your box extends off the edge, pick transparent to keep alpha or solid_color to fill it. Transparent is nice if you're stacking the result on a background later in the graph.
Under the hood it's the same pattern as the rest of the video nodes: VIDEO input is decoded through OpenCV frame by frame, IMAGE input is handled with Pillow, and each frame gets the identical crop. The background_type/background_color logic is shared with đź’€Video Frames, so behavior is consistent across both.
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 requirement again - connecting a VIDEO input without
opencv-pythoninstalled throws "OpenCV is required for video processing but not available". Image sequences don't need it. - The crop is static across the whole clip. If you need the crop box to move over time, this isn't the node - the motion effectors (đź’€Motion Position etc.) handle movement, and the crop nodes don't animate. Keep them separate.
- Coordinates are top-left origin, and out-of-bounds regions are handled by your
background_type, not by clamping. Expect the edge fill to appear if your box overhangs.
There's essentially no discussion of this node anywhere - the whole pack is quiet on reddit - so treat the examples in the pack's examples/ folder (there's a Crop_Video.png and Crop_Webp.png there) as your best documentation. It's a small, boring utility node, and it does its one job without surprises once you remember the background fill setting.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| crop_x | INT | 00–8192 | — |
| crop_y | INT | 00–8192 | — |
| crop_width | INT | 5121–8192 | — |
| crop_height | INT | 5121–8192 | — |
| background_type | COMBO | transparent | 2 options: transparent, solid_color |
| background_color | STRING | #000000 | — |
| videoopt | VIDEO | — | |
| imageopt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| Frame sequence | IMAGE | — |