ComfyTV/Videogenerated

Video Crop(VideoCropStage)

Video Crop (class VideoCropStage, category ComfyTV/Video) is a ComfyTV video-processing stage that crops a COMFYTV_VIDEO to the rectangular region defined by x, y, w, and h.

Video Crop Stage

video
video
x
0
y
0
w
0
h
0
ComfyTV

Description

Video Crop (class VideoCropStage, category ComfyTV/Video) is a ComfyTV video-processing stage that crops a COMFYTV_VIDEO to the rectangular region defined by x, y, w, and h. Use it to remove unwanted borders or isolate part of a video before passing the result to downstream video nodes.

Inputs

Required Inputs

InputTypeDefaultRangeDescription
xINT00 to 8192Horizontal offset, in pixels, from the left edge of the source frame to the left edge of the crop rectangle.
yINT00 to 8192Vertical offset, in pixels, from the top edge of the source frame to the top edge of the crop rectangle.
wINT00 to 8192Width, in pixels, of the crop rectangle.
hINT00 to 8192Height, in pixels, of the crop rectangle.

Optional Input

InputTypeDescription
videoCOMFYTV_VIDEOThe source video to crop. This socket is optional in the node definition. In a typical workflow, connect an upstream ComfyTV video node or preceding video stage here.

Outputs

OutputTypeDescription
videoCOMFYTV_VIDEOThe cropped video, using the same ComfyTV video type so it can be connected to downstream video nodes and stages.

Usage Notes

  • The crop origin is controlled by x and y. The default values of 0 place the origin at the top-left corner of the source video.
  • Set w and h explicitly to the crop dimensions you want. They also default to 0, so they should not normally be left unchanged when building a crop.
  • Coordinates and dimensions are expressed in pixels. Although the widgets allow values up to 8192, the requested crop should still fit within the actual dimensions of the input video.
  • The same crop parameters are applied to the video as it passes through this stage, producing a COMFYTV_VIDEO output for further processing.

Comments

Sign in with GitHub to join the discussion.

Loading comments…