🔥MultiCuttingVideo
Chop a video into segments of roughly N seconds
- video_complete_path
MultiCuttingVideo slices one video into a series of shorter clips, each around the length you specify. This is the bulk-splitter: feed it a long recording and get N segments back, which is exactly what you want when a long video is really several shots stuck together, or when you're splitting footage into chunks for per-segment processing. It's the multi-clip sibling of SingleCuttingVideo and shares its philosophy - fast, lossless, and keyframe-bound.
How it works
One FFmpeg call using the segment muxer: -f segment -segment_time <seconds> -reset_timestamps 1 -c copy. As with SingleCuttingVideo, -c copy means no re-encoding - this is fast and quality-preserving. The segment muxer cuts at keyframes, and the README is refreshingly honest about what that means: segment lengths won't be exactly your segment_time, just the closest cut points the keyframes allow. And because a segment only starts at a keyframe, making segment_time too short means some segments may be longer than expected or even miss - the README's own guidance is "don't set it too short."
The inputs that matter
- video_path - the file to split.
- segment_time - target seconds per segment, integer, min
1, default10. - output_path - existing directory. Segments are named after the source file with an 8-digit counter:
video_00000001.mp4,video_00000002.mp4, and so on.
Outputs
One video_complete_path string - the pattern of the generated segment files, so you know where they are. To count or further process the pieces, you're on your own (LoadImageFromDir-style path handling is for images).
Install
Same as the rest of the pack. FFmpeg on PATH is the actual dependency (requirements.txt is one line - pathlib). ComfyUI Manager → search "ComfyUI-FFmpeg", or:
cd ComfyUI/custom_nodes
git clone https://github.com/MoonHugo/ComfyUI-FFmpeg
cd ComfyUI-FFmpeg
pip install -r requirements.txt
Restart ComfyUI.
Gotchas
- Don't set segment_time too short. The README calls this out directly: segments cut on keyframes, so a 1-second target on a video with keyframes every 4 seconds gives you ~4-second chunks, not 1-second ones. For tight splits, re-encode with denser keyframes first - but that's outside this node's scope.
- The last segment is whatever's left over, often shorter than the others. That's expected, not an error.
- If your source has B-frames, stream-copied segments occasionally start on a frame that needs context from the previous segment, producing a brief glitch at the segment start. It's rare with typical mp4 settings; if you hit it, that's the trade-off of
-c copy.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| video_path | STRING | C:/Users/Desktop/video.mp4 | — |
| output_path | STRING | C:/Users/Desktop/output | — |
| segment_time | INT | 10 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| video_complete_path | STRING | — |