Video Split At Times
Split one clip into several at a list of timestamps — and get a manifest back
- video
- first_clip
- clips_json
- clip_count
- summary
MKRVideoSplitAtTimes cuts a single clip into several clips at a list of timestamps and writes each segment as its own file. If you've rendered one long video and want it as individual shots - one take, four deliverables, a sequence of stills-to-clips - this is the node that does the cutting for you and hands back a manifest of what it made.
You give it split_times_json, a list of times in seconds, and it slices at those points. For example:
[2.5, 7.0]
turns a clip into three files: 0–2.5s, 2.5–7s, and 7s–end. Each segment is written with a numbered suffix on the filename_prefix (MKR_split_video_000.mp4, _001, _002), and the output folder is your ComfyUI output directory (plus any subfolder you set).
The mechanism is a clean frame-based pass: decode all frames, convert the timestamps to frame boundaries at the source frame rate, write each segment via the standard encode path. Split points outside the clip's duration are ignored.
The outputs that matter
This is one of the few MKR video nodes with more than the standard three outputs, and they're the useful part:
first_clip- anMKR_VIDEOpayload for the first segment, so you can chain it onward (preview, further processing).clips_json- a JSON list, one entry per clip:index,path,start_sec,end_sec,duration_sec,frame_count. This is the manifest. It plugs straight into this pack's publish/manifest tooling.clip_count- anINT, the number of clips written. Handy as a check or as a loop bound.summary- the usual JSON summary plus warnings.
The main input besides the timestamps: video (any resolvable video), plus the standard fallback_fps, output_format, filename_prefix, subfolder, overwrite.
Install
Ships in MKRShift Nodes - install the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes
or ComfyUI Manager → search MKRShift_Nodes → restart. mp4/mov/webm output needs system ffmpeg on PATH; gif/webp work without it. No pip dependencies.
Where people get burned
Three things. Empty split_times_json ([]) is a no-op that passes the whole clip through as one file - if you "split" and get one output, that's why. Second, the overwrite flag applies per clip file, so with it off and stale _000/_001 files around, segments can silently skip. And each segment is re-encoded from the decoded frames - splitting doesn't do fast stream-copy cuts the way MKRTrimVideoByTime can with reencode off, so don't use this for lossless surgical cuts. That, and no audio is carried through, standard for this pack's frame-based nodes.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| video | * | — | |
| split_times_json | STRING | [] | — |
| fallback_fps | FLOAT | 24.01–240 | — |
| output_format | COMBO | auto | 6 options: auto, gif, webp, mp4, mov, webm |
| filename_prefix | STRING | MKR_split_video | — |
| subfolder | STRING | — | |
| overwrite | BOOLEAN | false | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| first_clip | MKR_VIDEO | — |
| clips_json | STRING | — |
| clip_count | INT | — |
| summary | STRING | — |