Nodes/ComfyUI-FFmpeg/🔥SingleCuttingVideo
ComfyUI Node

🔥SingleCuttingVideo

Cut one slice out of a video, fast and lossless

By MoonHugo·Created 2 years ago·Updated 4 months ago· 146
🔥SingleCuttingVideo
    • video_complete_path
    video_pathC:/Users/Desktop/video.mp4
    output_pathC:/Users/Desktop/output
    start_time00:00:00
    end_time00:00:10

    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:SS format. 00:00:10 is 10 seconds in; 00:05:00 is 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:10 and the nearest keyframe before it is at 00: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 .mkv source stays .mkv - the timestamp-named output keeps whatever extension the source had.
    • End-time format has a quirk: HH:MM:SS means the seconds field is 0059 or 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 write 00:10:00 when you meant 00:00:10 - easy swap, totally different result.
    Category🔥FFmpeg

    Inputs (4)

    NameTypeDefaultDescription
    video_pathSTRINGC:/Users/Desktop/video.mp4
    output_pathSTRINGC:/Users/Desktop/output
    start_timeSTRING00:00:00
    end_timeSTRING00:00:10

    Outputs (1)

    NameTypeDescription
    video_complete_pathSTRING