FL Video Cut Detector
FL_VideoCut — detect scene cuts and split a clip into separate MP4s
- images
- video_paths
- output_folder
Got a long video that's really several shots strung together, and you want each shot as its own file? FL_VideoCut watches a sequence of frames, finds the points where the picture changes enough to count as a scene cut, and writes each detected scene out as a separate MP4. It's automatic shot detection plus splitting, in one node.
This is the useful inverse of everything else in the video-editing corner. Other nodes join and crossfade clips together; this one takes a stitched-together clip apart. Handy when you've generated or imported a montage and want to grab individual scenes, or when you're building a dataset and need each shot isolated.
How it works
It compares consecutive frames looking for big jumps. You pick the detection method: intensity (overall brightness change), histogram (color-distribution change), or hybrid (both, and the default). When the difference between two frames crosses your threshold, that's a cut. It then hands off to FFmpeg - running several encodes in parallel - to write each scene to disk, piping frames straight through for speed.
The inputs and outputs
images- the frame batch to analyze.threshold(1–100, default 30) - sensitivity. Lower = more sensitive = more cuts detected. This is the knob you'll actually tune.min_scene_length(default 12 frames) - ignore scenes shorter than this, so a single flickery frame doesn't spawn its own file.detection_method-intensity,histogram, orhybrid.fps- frame rate for the output MP4s.output_folder- where the split files land (default./output/scene_cuts).output_quality,max_workers,downsample_detection,use_gpu_acceleration- encode quality and performance tuning.
Outputs: video_paths (the paths to the files it wrote) and output_folder (where they went).
How to install it
Part of filliptm's Fill-Nodes pack. ComfyUI Manager → search ComfyUI_Fill-Nodes → Install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/filliptm/ComfyUI_Fill-Nodes
pip install -r ComfyUI_Fill-Nodes/requirements.txt
It shells out to FFmpeg for the encoding, so you need FFmpeg installed and on your PATH. Most ComfyUI setups already have it (plenty of video nodes need it), but if the split step errors, that's the first thing to check.
Common issues & troubleshooting
Too many cuts, or not enough. This is entirely a threshold game and it's content-dependent. A high-motion clip trips intensity detection constantly, so raise the threshold; a subtle documentary-style edit needs it lowered. Try histogram if intensity is fooled by lighting flicker, or hybrid to split the difference. Expect a couple of trial runs to dial it in.
Files aren't where I expected. The MP4s go to output_folder, which is relative to ComfyUI's working directory unless you give an absolute path. On a hosted or headless runner, that folder lives on the server, not your local machine - the video_paths output tells you exactly where they landed.
The split step fails. Almost always FFmpeg - missing, or not on PATH. Confirm ffmpeg -version works in the same environment ComfyUI runs in.
A hard cut got missed. If two shots happen to have similar brightness and color, even hybrid can miss the boundary. There's no perfect threshold for mixed content; for anything you care about, treat the auto-detection as a first pass and spot-check the results.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| output_folder | STRING | ./output/scene_cuts | — |
| fps | INT | 241–120 | — |
| threshold | FLOAT | 30.01–100 | — |
| min_scene_length | INT | 122–1000 | — |
| output_quality | INT | 851–100 | — |
| detection_method | COMBO | hybrid | 3 options: intensity, histogram, hybrid |
| max_workers | INT | 41–16 | — |
| downsample_detection | BOOLEAN | true | — |
| use_gpu_acceleration | BOOLEAN | true | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| video_paths | STRING | — |
| output_folder | STRING | — |