🔥SingleCuttingVideo
Cut one slice out of a video, fast and lossless
- video_complete_path
SingleCuttingVideo extracts a single time range from a video - from 10 seconds in, to the 5-minute mark, say - and saves it as its own file. This is the "trim" node, and it's one of the most-used utilities in the pack because it's the fastest possible way to carve an AI clip down to its good 2 seconds, or to slice a reference video into a training-friendly segment. Two timestamps, one output, done.
How it works
One FFmpeg call: -ss <start_time> -to <end_time> -c copy. The -c copy part is the whole story - no re-encoding, so the cut is essentially instant and the video quality is untouched. The trade-off is that with stream copy, cuts are keyframe-snapped: the actual start may land on the nearest preceding keyframe rather than exactly on your timestamp, so you might get a few frames earlier than requested. For most editing purposes that's invisible; if you need frame-exact cuts, you'd be re-encoding (which this node doesn't do).
The inputs that matter
- video_path - the source.
- start_time / end_time - both in
HH:MM:SSformat.00:00:10is 10 seconds in;00:05:00is five minutes. The node validates the format, and if end_time is before start_time, FFmpeg will just give you nothing - check your numbers. - output_path - existing directory; the result is timestamp-named.
Outputs
A single video_complete_path string.
Install
Pack-wide standard: FFmpeg on PATH is the real requirement, the requirements.txt is a one-liner. 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
- Keyframe snapping is the big one. If you cut at
00:00:10and the nearest keyframe before it is at00:00:08, your clip starts at 8 seconds. If that matters, nudge your start time or accept the slop. This is inherent to-c copy, not a bug in the node. - The output keeps the original video's codec (stream copy again), so a
.mkvsource stays.mkv- the timestamp-named output keeps whatever extension the source had. - End-time format has a quirk:
HH:MM:SSmeans the seconds field is00–59or a two-digit number; the node's validator is permissive about that, but FFmpeg is the final arbiter. If a cut seems off, double-check you didn't write00:10:00when you meant00:00:10- easy swap, totally different result.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| video_path | STRING | C:/Users/Desktop/video.mp4 | — |
| output_path | STRING | C:/Users/Desktop/output | — |
| start_time | STRING | 00:00:00 | — |
| end_time | STRING | 00:00:10 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| video_complete_path | STRING | — |