Nodes/ComfyTV/Video Crop
ComfyUI Node

Video Crop

Crop by dragging a rectangle on the node itself

By jtydhr88·Created 3 months ago·Updated about 15 hours ago· 725
Video Crop
  • video
  • video
force_run_token0
project_id
parent_output_id0
x0
y0
w0
h0

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 video first.

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.

CategoryComfyTV/Video

Inputs (8)

NameTypeDefaultDescription
force_run_tokenINT00–2147483647Internal — bumped on Run to invalidate ComfyUI's input cache.
project_idSTRINGInternal — populated by the projectStore on the frontend.
parent_output_idINT00–2147483647Internal — lineage parent set by spawn handlers on the frontend.
xINT00–8192
yINT00–8192
wINT00–8192
hINT00–8192
videooptCOMFYTV_VIDEO

Outputs (1)

NameTypeDescription
videoCOMFYTV_VIDEO