Video Crop
Crop by dragging a rectangle on the node itself
- video
- video
Cropping video is the classic "just remove the parts you don't want" operation, and most ComfyUI crops make you type four numbers and pray they match the frame. Video Crop does it the sane way: you drag a rectangle on the node's preview, and the node crops to exactly that region.
It's a ComfyTV Video stage - wire a video in, define the crop box, hit Run, get the cropped clip downstream as a snapshot.
The inputs
- x, y (0–8192) - top-left corner of the crop region.
- w, h (0–8192) - width and height of the crop region.
- video (optional) - the upstream clip; required to run.
Here's the thing about those numbers: you're not meant to type them. The tooltip-adjacent reality is in the error message the node throws if you try to run with no region set - "drag the rectangle on the node first." The x/y/w/h fields are the persisted state of the rectangle you drag in the node's preview. Type them if you love pixel coordinates; drag if you're normal. The project_id / parent_output_id / force_run_token inputs are internal frontend bookkeeping - ignore them.
How it works
The node passes the region to the pack's ffmpeg-based crop runner and emits a new clip sized to the box. Because cropping discards pixels rather than scaling them, it's also a legitimate (if crude) reframing tool - crop to a 9:16 region of a 16:9 source and you've made yourself a vertical clip for short-form platforms without any AI in the loop.
Install
ComfyTV ships ~190 stages in one pack, so installing the pack installs this node too.
cd ComfyUI/custom_nodes
git clone https://github.com/jtydhr88/ComfyTV
Restart ComfyUI fully and look under ComfyTV → Video. ComfyUI Manager finds it by searching "ComfyTV". No model downloads, no extra Python deps. On ComfyUI Desktop or macOS, clone into the running instance's absolute path from the startup log rather than trusting the relative cd.
Troubleshooting
- "no crop region set - drag the rectangle on the node first." - you ran without drawing a box. Drag on the preview, then Run.
- Cropped output is the wrong aspect. The box is what it is - a wider drag gives a wider crop. For a specific output ratio, match the box to it on the preview.
- No output. Wire a video into
videofirst.
It's a simple node with a genuinely better interaction than the norm. Drag, run, done - and the same move gets you a reframed clip for free.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| force_run_token | INT | 00–2147483647 | Internal — bumped on Run to invalidate ComfyUI's input cache. |
| project_id | STRING | Internal — populated by the projectStore on the frontend. | |
| parent_output_id | INT | 00–2147483647 | Internal — lineage parent set by spawn handlers on the frontend. |
| x | INT | 00–8192 | — |
| y | INT | 00–8192 | — |
| w | INT | 00–8192 | — |
| h | INT | 00–8192 | — |
| videoopt | COMFYTV_VIDEO | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| video | COMFYTV_VIDEO | — |