ComfyUI-LoadVideoCrop Introduction
ComfyUI-LoadVideoCrop extends ComfyUI’s native Load Video node with visual cropping and trimming. You can choose the part of a video frame you want by moving and resizing a rectangle directly on the preview, then select the portion of the clip you want using an editor-style timeline. The node outputs a cropped VIDEO that matches the area you framed.
This is useful when you want to turn a wide clip into a portrait composition, focus on one subject, or remove unwanted edges without guessing crop coordinates. It also provides the currently displayed frame as IMAGE outputs for workflows that need a still image alongside the video.
The node works with both classic ComfyUI nodes and ComfyUI 2.0 Vue nodes. It retains the familiar Load Video file picker, drag-and-drop behavior, and video preview.
How ComfyUI-LoadVideoCrop Works
Think of the crop rectangle as a fixed window placed over your video. You position that window on the preview, and the node uses the same window for every frame of the output video. The crop does not follow a moving subject automatically: if your subject crosses the frame, check that it remains inside your chosen area throughout the clip.
The timeline selects when the output begins and ends; the rectangle selects what part of each frame appears. Together, they let you prepare a shorter, reframed clip in one node. For example, you could mark a five-second section of a landscape video and frame its subject inside a 9:16 portrait crop.
The node saves a cropped video from the source file frame by frame, rather than loading the entire video into memory just to perform the crop. Nodes that later turn the video into image tensors, such as Get Video Components, may still use memory for those frames, but they receive the cropped region.
ComfyUI-LoadVideoCrop Features
Crop directly on the preview
Choose an Aspect Ratio to control the shape of the crop:
- Original is the default. It passes the video through uncropped and shows no crop rectangle.
- Locked ratios keep the selected shape as you adjust the rectangle:
1:1,2:3,3:2,3:4,4:3,9:16,16:9, and21:9. For example, choose1:1for a square frame or9:16for a portrait frame. - Free (Custom) lets you choose any rectangular shape instead of locking its proportions.
With a crop selected, drag the rectangle to move it. Place your pointer over it and use the mouse wheel to enlarge or shrink it around the pointer. In Free (Custom) mode, you can also drag its four corner handles to resize it freely; the opposite corner stays in place. The size displayed on the rectangle shows the resulting output dimensions.
While your pointer is over the crop, the mouse wheel adjusts the crop rather than zooming or panning the ComfyUI canvas. Clicking or dragging the rectangle also avoids triggering the video player’s click-to-play or pause behavior. The output is aligned to dimensions required by the video encoder, so the saved result matches the framed area as closely as those requirements allow.
Trim with the timeline
The timeline below the preview helps you find and select the part of the video you want:
- Filmstrip: Shows real frames sampled across the clip, giving you a quick visual guide to its contents. Thumbnails appear progressively as they are captured.
- Audio waveform: Shows the audio’s loudness beneath the filmstrip when available. It may be skipped for very long clips to limit memory use.
- Mark-in and mark-out: Drag the left or right marker to set the selected section. As you drag a marker, the preview pauses and shows the frame at that position. The shortest selectable section is 0.05 seconds. Drag the markers themselves—the middle of the selected window is not draggable.
- Playhead: The white line follows playback. Click anywhere on the timeline to seek to that point.
- Keyboard shortcuts: With the preview in view, press
Ito set mark-in orOto set mark-out at the current playhead.
During playback, the marks define the playback range. Playback before the mark-in jumps to it; reaching the mark-out loops back to the mark-in, unless the mark-out is at the end of the clip, in which case playback stops. You can still seek anywhere in the clip while paused.
The timeline resizes with the node, but its appearance does not change the underlying trim times. Selecting a different video resets the trim window to that file’s full length unless saved settings for that file are restored.
For workflows or API scripts, trimming uses the same values as ComfyUI’s core Trim Video node: start_time is measured in seconds (negative values count from the end), duration is measured in seconds (0 means until the end), and strict_duration controls what happens if the requested section exceeds the remaining clip. When strict_duration is false, the section is shortened to fit; when true, the node fails instead.
Use or save the displayed frame
The node has two standard IMAGE outputs for the frame currently shown in the preview:
- Full frame: The frame before cropping.
- Cropped frame: That same frame with your selected crop applied. In Original mode, both outputs are identical.
The outputs use the last frame at or before the preview’s current time. When you queue a workflow, they correspond to the frame displayed at that moment; pausing the player is an easy way to keep your choice stable. The hidden frame_time input can also select a time through a workflow or API script.
To download the displayed frame instead, click 💾 Frame at the top-left of the preview. Your browser downloads a full-frame PNG and, when a crop is active, a cropped PNG at the output dimensions. In Original mode, it downloads only the full frame. Filenames include the source name and timecode, and the button briefly reports whether saving succeeded.
Show or hide video controls
Click ⏯ beside the Frame button to show or hide the video player’s native controls, such as play, seek, and volume. The node’s own timeline already provides seeking and trim selection, so hiding the native controls can make corner-resizing easier when those controls overlap the crop.
Keep your choices between sessions
The aspect ratio, crop, trim marks, and video-controls preference are remembered per file in your browser’s local storage. They can be restored after a page reload or when switching tabs. If a workflow already contains crop or trim values, those workflow values take priority. A newly selected file uses its own remembered settings, if any, rather than inheriting another file’s crop.
The workflow also stores the crop and trim settings through hidden inputs. The normalized crop_x, crop_y, crop_w, and crop_h crop values range from 0 to 1, allowing an API script to set the crop without dragging the rectangle.
Troubleshooting ComfyUI-LoadVideoCrop
No crop rectangle appears. What should you check?
- Check Aspect Ratio. Original intentionally shows no rectangle and leaves the video uncropped.
- Select a locked ratio or Free (Custom) to display and adjust a crop.
The crop does not follow the subject. Is that expected?
Yes. The rectangle stays in the same position across every frame. Scrub through the selected clip and adjust the rectangle so the important content remains inside it, or choose a wider crop if the subject moves substantially.
Corner handles are missing. How do you resize freely?
Select Free (Custom). Its four corners provide resize handles. Locked aspect ratios keep their proportions; use the mouse wheel over the rectangle to change its size.
The player controls get in the way of cropping. What can you do?
Click ⏯ to hide the native video controls. You can continue to seek using the timeline.
The node fails when saving a cropped video. Could the source format be the cause?
The extension’s cropped-video streaming save supports 8-bit SDR sources. Rotated, 10-bit, and HDR sources are rejected with an error. If you need to use one of those sources without cropping, select Original to use the core save path.
Why did a trim end early—or fail instead?
Check the requested start_time, duration, and strict_duration if they were set through a workflow or API script. When the requested duration extends past the end of the clip, strict_duration: false shortens it to fit; strict_duration: true makes the node fail.
Why are the two IMAGE outputs the same?
With Original selected, no crop is applied, so the full-frame and cropped-frame IMAGE outputs are identical.
Learn More about ComfyUI-LoadVideoCrop
The demonstration video shows the node in use and is a helpful visual reference for adjusting the crop and working with the preview.
