Split Video
Split Video cuts on breaths, not timestamps — and it's a demucs-powered party trick
- scene_list
- VHS_FILENAMES
Split Video is the second half of the ComfyUI-pyscenedetect pack and the part that's actually interesting. Feed it the SCENE_LIST from Scene Detect and it cuts the video at those boundaries with ffmpeg, producing one .mp4 clip per scene. That alone is useful. But its headline feature is intelligent sub-splitting: when a single scene runs too long, it re-splits it at speech pauses - breath points - so your dialogue clips don't land mid-word. It's the node you reach for when the footage is people talking: interviews, podcasts, lectures, voiceover, streamer highlights.
How the breath-point splitting works
The flow for any scene longer than max_scene_len:
- ffmpeg extracts that scene's audio to a temp WAV.
- demucs runs in
--two-stems=vocalsmode to strip background music and noise, leaving vocals only. This is the clever part: silence detection on raw audio is useless when there's a beat underneath, but on the vocal stem, gaps between sentences stand out. - pydub's
detect_silencefinds quiet stretches in the vocal track. - For each ideal cut position, the node looks back up to
max_lookbackseconds for the nearest silence and cuts there. No silence in the window? It force-cuts at the ideal position anyway.
Set max_scene_len to 0 and all of this disappears - you get exact scene-boundary splits, no audio analysis, no demucs. Worth remembering, because it's also the escape hatch for everything that makes this node heavy.
Inputs that matter
scene_list(required) - theSCENE_LISToutput from Scene Detect. It carries the video path, FPS, and timecodes.max_scene_len- maximum scene length in seconds before sub-splitting kicks in. 0 disables it. For dialogue, 10–30s is the sweet spot; start at 15.breath_threshold- silence cutoff in dBFS, default -40.0. Lower (e.g. -50) counts quieter gaps as "breath"; higher only catches loud pauses.min_silence_duration- how long a silence must last to count, in ms, default 150. Raise it if cuts feel twitchy.max_lookback- seconds to search backward for a breath point, default 2.0.min_segment_len- minimum clip length, default 2.0s. Short segments get merged into neighbors, so you don't get 0.8-second slivers.
output_dir and filename_prefix control where clips land and what they're called ({prefix}-Scene-001.mp4 …); the prefix defaults to the source video's name. The default output directory is an output/scene_videos folder relative to the pack - you'll probably want to set output_dir to something you can actually find.
Outputs
VHS_FILENAMES - the same list format VideoHelperSuite uses. Because the node declares OUTPUT_IS_LIST, ComfyUI automatically iterates any downstream node over every clip. That's the advertised integration: wire it into an OSS/cloud video uploader and each split clip gets uploaded on its own. It's a clean way to hand a big file to an uploader as many small pieces.
Where people get burned
- No audio track +
max_scene_len > 0→ hard error, because breath-point splitting needs audio to exist. Setmax_scene_len = 0to skip it entirely. - ffmpeg not on your PATH → the node refuses to run, and no amount of pip installs fixes that. Install ffmpeg (the README links it) and make sure it resolves from the terminal.
- First run downloads a demucs model (~2GB per the README) and demucs itself pulls PyTorch in via
requirements.txt. If your ComfyUI venv already has torch, pip usually reuses it, but this is a heavyweight install - expect a long firstpip install, and a slow, CPU-hungry run if demucs ends up on CPU. - It's slow - demucs runs per long scene. A two-hour video with
max_scene_len=15will churn for a while. If you just want scene-accurate cuts, leavemax_scene_len = 0and it's nearly instant.
Installing
ComfyUI Manager → search ComfyUI-pyscenedetect, or:
cd ComfyUI/custom_nodes
git clone https://github.com/z2661326707-sudo/ComfyUI-pyscenedetect
cd ComfyUI-pyscenedetect
pip install -r requirements.txt
then restart ComfyUI. The requirements.txt pulls demucs, pydub, and scenedetect[opencv]; make sure ffmpeg is installed separately. The demucs model downloads on first use of the sub-split path, not at install time - so the first "real" run is the slow one. Honest take: the breath-point splitting is a genuinely thoughtful feature for dialogue work, but it's the whole reason this pack has the footprint it does. Knowing you can switch it off is half the battle.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| scene_list | SCENE_LIST | — | |
| output_diropt | STRING | /tmp/ComfyUI/custom_nodes/output/scene_videos | — |
| filename_prefixopt | STRING | — | |
| max_scene_lenopt | FLOAT | 0.00–600 | — |
| breath_thresholdopt | FLOAT | -40-80–0 | — |
| min_silence_durationopt | INT | 15050–1000 | — |
| max_lookbackopt | FLOAT | 2.00.5–10 | — |
| min_segment_lenopt | FLOAT | 2.00.5–60 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| VHS_FILENAMES | VHS_FILENAMES | — |