Nodes/Trent Nodes/Chop Cuts
ComfyUI Node

Chop Cuts

Split a clip into per-scene MP4s without leaving the graph

By TrentHunter82·Created 11 months ago·Updated a day ago· 42
Chop Cuts
  • images
  • video_paths
  • output_folder
  • report
  • num_scenes
◄output_folder./output/chop_cuts►
◄base_filenamescene►
◄fps24►
◄threshold30.0►
◄min_scene_frames12►
◄quality85►
◄detection_methodhybrid►
◄max_workers4►
◄downsample_detectiontrue►
◄use_gputrue►

Shot-boundary detection is the unglamorous prep step of every video pipeline that cares about shots: find the cuts, then do something per-scene - keyframe each scene, generate per-shot prompts, split a long render into usable clips. Chop Cuts is the "do something" node: it takes a frame batch, detects the scene cuts, and exports each scene as its own MP4 with FFmpeg, plus a report of where every cut landed.

The detection is multi-metric, GPU-accelerated, and honest about its options. detection_method picks between hybrid (default, intensity + edge combined via Sobel), intensity (plain frame-difference), histogram (color-distribution shift), and adaptive (for fast camera motion, where the other methods misfire). threshold (default 30) sets how big a difference counts as a cut, and min_scene_frames (default 12) prevents micro-scenes - a threshold spike that lasts two frames is usually a flash frame, not a scene. downsample_detection (on by default) analyzes a downscaled copy for speed and applies the result to the full frames, which is why it can chew through big renders.

The honest framing from the pack

The README is unusually candid here: for cut detection alone, the pack's own Cut Detective is substantially more accurate - it runs a neural detector (TransNetV2 or the optional OmniShotCut) and labels dissolve/wipe/fade transitions, not just hard cuts. Chop Cuts' reason to exist is that it's the node that actually splits the clip into per-scene MP4 files with clean sequential filenames (scene_001.mp4, scene_002.mp4...). If you need accurate cut times to feed a VLM prompt generator, use Cut Detective. If you need the scenes exported as files, this is the one. Pick the tool by the job.

Inputs and outputs

The required list is: images, output_folder (default ./output/chop_cuts), base_filename (default scene), fps (default 24), threshold, min_scene_frames, quality (1–100, default 85, for the MP4 encode), detection_method, max_workers (parallel export workers, default 4), downsample_detection, and use_gpu (default true; falls back to CPU if CUDA isn't available).

Outputs: video_paths (the list of written files), output_folder, report (cut locations and timestamps, human-readable), and num_scenes. The report is the part to keep - it's your shot list, and you can feed it into per-scene processing downstream.

Gotchas

  • FFmpeg is a hard requirement. The export path shells out to FFmpeg (subprocess in the source), so a ComfyUI install without FFmpeg on PATH gets a clean error at export time. On most desktop installs it's already there.
  • use_gpu doesn't invent a GPU. It checks torch.cuda.is_available() and silently falls back to CPU - good behavior, but a 4K batch on CPU detection is slow. Downsample is on by default for a reason.
  • Threshold is scene-dependent. Fast-cut action footage wants a lower threshold; slow interviews want higher. Run a short pass and read the report before committing to the full batch.

It's part of TrentNodes - ComfyUI Manager (search "Trent Nodes"), or clone + pip install -r requirements.txt. No model downloads for Chop Cuts itself (transnetv2-pytorch in the pack requirements serves the sibling Cut Detective). For splitting, this is the straightforward option.

CategoryTrent/Video

Inputs (11)

NameTypeDefaultDescription
imagesIMAGEVideo frames to scan for cuts and split into scenes.
output_folderSTRING./output/chop_cutsFolder for the scene MP4 files. Relative paths resolve from the ComfyUI working directory; the folder is created if missing.
base_filenameSTRINGsceneFilename prefix for each scene, saved as <prefix>_001.mp4, <prefix>_002.mp4, and so on.
fpsINT241–120Frame rate of the exported videos and of the timestamps in the report.
thresholdFLOAT30.01–100Frame difference (0-255 scale) needed to count as a cut. Lower finds more cuts.
min_scene_framesINT122–1000Minimum frames between cuts. Scenes shorter than this, including a short final scene, are not exported.
qualityINT851–100Export quality from 1 to 100, mapped to an x264 CRF. Higher means better quality and larger files.
detection_methodCOMBOhybridhybrid mixes intensity and edge changes; intensity uses brightness only; histogram compares color histograms on CPU; adaptive uses a rolling local threshold for fast camera motion.
max_workersINT41–16Number of scene videos encoded with FFmpeg at the same time.
downsample_detectionBOOLEANtrueShrink frames larger than 640px to 640px for detection only. Exported videos keep full resolution.
use_gpuBOOLEANtrueRun detection on CUDA when available. Falls back to CPU otherwise.

Outputs (4)

NameTypeDescription
video_pathsSTRING—
output_folderSTRING—
reportSTRING—
num_scenesINT—