Nodes/comfyui-huyl2-nodes/Video Scene Splitter
ComfyUI Node

Video Scene Splitter

Cuts on visual changes, not fixed intervals — looks like a PySceneDetect wrapper

By huyl3-cpu·Created 9 months ago·Updated 4 months ago· 1
Video Scene Splitter
  • video_frames
  • output_message
prefix10001
save_dir/content/ComfyUI/output/
threshold28.00
min_scene_len6

Most of this pack's video-splitting tools cut on fixed durations (SplitMP3's flat 7 minutes, SplitMP3V2's configurable minutes). This one is different: it splits a video wherever the visual content changes significantly - a real scene-cut detector, not a stopwatch.

Unlike most of this pack's video nodes, it takes video_frames, an IMAGE input, rather than a file path - meaning you decode the video first (with a video-load node) and hand this node the resulting frame batch, not a path on disk.

How it works

Two parameters, threshold (default 28, range 1200) and min_scene_len (default 6 frames, range 1100), and their naming and numeric range line up closely with PySceneDetect's content-based scene detector - a real, still-used tool in the wider video-processing community (confirmed via a targeted search: it comes up in current discussion around AI-video workflows, not just as a historical reference). A lower threshold flags a scene change on a smaller visual jump between frames, giving you more, shorter scenes; a higher one requires a bigger jump before calling it a cut, giving you fewer, longer scenes. min_scene_len is a floor that stops a one-frame flicker or a fast pan from registering as its own scene.

I can't confirm from the schema alone that this literally wraps the scenedetect Python package rather than reimplementing similar logic from scratch, but the parameter names and default scale are a strong match either way - treat the PySceneDetect documentation's guidance on threshold tuning as a reasonable starting point if you're unsure where to set it.

The inputs and outputs that matter

  • video_frames - IMAGE, the decoded frame batch to analyze.
  • prefix - default "10001", used to name the output scene files/folders sequentially.
  • save_dir - default /content/ComfyUI/output/.
  • threshold - FLOAT, default 28, range 1200.
  • min_scene_len - INT, default 6, range 1100.

One output: output_message - a STRING status report. Notably, that's all you get back into the graph - no IMAGE or video data. The detected scenes are written to disk under save_dir; if you want to keep working with them in ComfyUI, you load them back in with a separate video-load node afterward.

Where it fits

Use it when you want to chop a long piece of footage into per-shot clips automatically instead of eyeballing timestamps - before per-scene captioning, per-scene regeneration, or just cataloguing a long generated or sourced video into its component shots.

Installing it

ComfyUI Manager: search comfyui-huyl2-nodes, install, restart. By hand:

cd ComfyUI/custom_nodes
git clone https://github.com/huyl3-cpu/comfyui-sortlist

restart. Not documented in the pack's README. If this errors with an import failure, pip install scenedetect (or whatever underlying detection library it actually depends on) is the first thing worth trying - it's not something the README mentions bundling.

Common issues & troubleshooting

Threshold is genuinely footage-dependent, and a wrong count is usually a tuning problem, not a broken node. Fast-cut or high-motion content will trip a threshold of 28 constantly and hand you far more scenes than expected; static, low-motion footage might barely trigger it at all and come back as one giant "scene." If your split count looks way off in either direction, adjust threshold before assuming something's failed.

An empty save_dir after a run doesn't necessarily mean an error - check output_message first. Since this node reports through a status string rather than throwing on "no scene changes detected," a video that never crosses your threshold will finish "successfully" while producing nothing, which reads very differently from an actual crash.

Categoryvideo/split

Inputs (5)

NameTypeDefaultDescription
video_framesIMAGE
prefixSTRING10001
save_dirSTRING/content/ComfyUI/output/
thresholdFLOAT28.001–200
min_scene_lenINT61–100

Outputs (1)

NameTypeDescription
output_messageSTRING