K3NK Video Concat Simple
Stitch Video Segments Into One File Without Leaving ComfyUI
- output_path
Every long-form video workflow ends the same way: you've got forty MP4 segments on disk and you need one continuous file, and your options are a terminal command you'll have to look up again or a video editor you didn't open for this. K3NK Video Concat Simple is the in-graph version - it globs the MP4s in a folder, sorts them, and hands them to FFmpeg's concat demuxer. That's the whole job, and it does it cleanly.
It's the natural closing move for the K3NK pipeline: Image Grab pulls the last frames, the loader blends the seams, and this node welds the segments back into a single deliverable. Given the pack's origins in K3NK3's Wan 2.2 extend/loop workflows, this is the node that turns a folder of takes into the final video.
How it works
It looks for *.mp4 files in directory_path, sorts them by the number embedded in the filename (so seg_001.mp4 lands before seg_002.mp4), writes an FFmpeg concat list to a temp file, and runs ffmpeg -f concat -safe 0. Two modes, chosen by reencode:
- Copy stream (off) - fast, near-instant, no quality loss. Files just get spliced by their container timestamps. Works for mp4/avi/mkv/mov.
- Re-encode (on, default) - slow, but output is a clean H.264+AAC stream (or VP9+Opus for webm). This is the safe choice when your segments came from different sources with mismatched codecs or frame rates.
The output lands in ComfyUI's output directory as {output_filename}.{output_format} unless you set output_absolute_path, and the node returns the full output_path as a string - wire it into a text display or a save-to-path consumer.
Format notes worth knowing before you click: GIF always re-encodes (there's no copy-stream GIF), and it's forced to 10 fps via a filter - expect chunky, small, old-school GIFs, which is probably what you want a GIF for anyway. And WebM doesn't support copy stream (it requires VP9+Opus), so the node silently falls back to saving an MP4 instead rather than failing. That's a deliberate, sensible degradation - but it means your output filename will be .mp4, not .webm, which surprises people.
The inputs that matter
directory_path- folder with the MP4s. Note: it only globs*.mp4for input, regardless of whatoutput_formatyou choose.output_filename- base name (no extension).output_format- mp4 / avi / webm / mov / mkv / gif.reencode- the fast-vs-safe toggle above.
Installing it
Part of the K3NK pack. ComfyUI Manager → search ComfyUI-K3NKImageGrab, or:
cd ComfyUI/custom_nodes
git clone https://github.com/K3NK3/ComfyUI-K3NKImageGrab
The real requirement here is FFmpeg on your system PATH - the node shells out to it, it doesn't bundle it. If ComfyUI runs but this node errors with "FFmpeg not found"-ish output, that's a system install (winget install ffmpeg, brew install ffmpeg, or your package manager of choice), not a node problem.
Where people get burned
The *.mp4-only input glob is the first surprise - if your folder has .webm or .mov segments, this node won't see them, and it silently grabs just the MP4s. Second: sorted-by-number means the same filename-numbering rules as the rest of the pack apply; files without a trailing number sort to the start (number defaults to 0), so a stray intro.mp4 can jump the line. And copy-stream is only safe when your inputs share codecs and timing - if the output is glitchy at the joins, flip reencode on and let it fix the container instead of fighting it.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| directory_path | STRING | — | |
| output_filename | STRING | concatenated_video | — |
| output_format | COMBO | mp4 | 6 options: mp4, avi, webm, mov, mkv, gif |
| output_absolute_pathopt | STRING | — | |
| reencodeopt | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output_path | STRING | — |