Nodes/MKRShift_Nodes/Video Split At Times
ComfyUI Node

Video Split At Times

Split one clip into several at a list of timestamps — and get a manifest back

By criskb·Created 7 months ago·Updated 5 months ago· 0
Video Split At Times
  • video
  • first_clip
  • clips_json
  • clip_count
  • summary
split_times_json[]
fallback_fps24.0
output_formatauto
filename_prefixMKR_split_video
subfolder
overwritefalse

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 - an MKR_VIDEO payload 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 - an INT, 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.

CategoryMKRShift Nodes/Media/Video/Edit

Inputs (7)

NameTypeDefaultDescription
video*
split_times_jsonSTRING[]
fallback_fpsFLOAT24.01–240
output_formatCOMBOauto6 options: auto, gif, webp, mp4, mov, webm
filename_prefixSTRINGMKR_split_video
subfolderSTRING
overwriteBOOLEANfalse

Outputs (4)

NameTypeDescription
first_clipMKR_VIDEO
clips_jsonSTRING
clip_countINT
summarySTRING