Nodes/comfyui-video-crop-trim/Video Crop & Trim (FFmpeg)
ComfyUI Node

Video Crop & Trim (FFmpeg)

A ComfyUI node in video/processing with 15 inputs and 2 outputs.

By RiverSide71·Created 3 months ago·Updated 3 months ago· 2
Video Crop & Trim (FFmpeg)
  • video
  • frames
  • audio
crop_x0
crop_y0
crop_width512
crop_height512
trim_mode
trim_start0.00
trim_end0.00
output_format
codec
quality23
audio_mode
video_path
fps30.000
extra_ffmpeg_args
Categoryvideo/processing

Inputs (15)

NameTypeDefaultDescription
crop_xINT00–8192Left edge of the crop region (pixels, even numbers only)
crop_yINT00–8192Top edge of the crop region (pixels, even numbers only)
crop_widthINT5122–8192Width of the crop region (pixels, even numbers only)
crop_heightINT5122–8192Height of the crop region (pixels, even numbers only)
trim_modeCOMBOHow trim_start / trim_end are interpreted
trim_startFLOAT0.000–86400Start of the kept region (seconds or frame index)
trim_endFLOAT0.000–86400End of the kept region (seconds or frame index). 0 = until end of video.
output_formatCOMBO4 options: mp4, webm, avi, mov
codecCOMBO4 options: libx264, libx265, libvpx-vp9, prores
qualityINT230–51CRF value - lower = better quality / larger file
audio_modeCOMBOstrip – discard audio entirely (video frames only). extract – trim audio to match the video clip and output it as a separate AUDIO tensor compatible with VHS Video Combine.
videooptIMAGEConnect IMAGE frames here (takes priority over video_path)
video_pathoptSTRINGVideo file path. Can be filled automatically using the Upload Your Video button.
fpsoptFLOAT30.0001–240Output framerate (also used to convert frame-based trim values)
extra_ffmpeg_argsoptSTRINGExtra ffmpeg output arguments passed verbatim

Outputs (2)

NameTypeDescription
framesIMAGE
audioAUDIO