Nodes/MediaForge/πŸ”— Concat Videos
ComfyUI Node

πŸ”— Concat Videos

Stitch clips end-to-end, instant or transcoded β€” with transitions if you want them

By leon80148Β·Created 4 months agoΒ·Updated 2 months agoΒ· 0
πŸ”— Concat Videos
  • frames
  • audio
  • final_video_path
β—„video_pathsinput/clip1.mp4 input/clip2.mp4β–Ί
β—„filename_prefixMediaForge/concatβ–Ί
β—„modetranscodeβ–Ί
β—„transition_sec0.00β–Ί
β—„transition_typefadeβ–Ί
β—„fps30.0β–Ί
β—„width1920β–Ί
β—„height1080β–Ί
β—„crf18β–Ί
β—„codech264 NVIDIA GPU (h264_nvenc)β–Ί
β—„presetmediumβ–Ί
β—„tensor_fps30.0β–Ί

MF_ConcatVideos joins video files end-to-end at the file level - the thing VideoHelperSuite can't do, since VHS only stitches image batches. You give it a list of paths (one per line), pick a mode, and it hands back a single output file. The two modes are the whole story: copy is a lightning-fast no-reencode stitch for clips that are already compatible, transcode is the always-works path that re-encodes and can even add an xfade transition between clips.

How it works

  • copy - uses FFmpeg's concat demuxer with stream copy. No re-encode, near-instant. The catch: all inputs must actually be compatible, and the node runs a preflight probe that checks codec, dimensions, pixel format, profile, and audio/sample/channel fields per stream before FFmpeg runs. Mismatch β†’ it raises, instead of silently producing a corrupt file past the first segment (which is what concat + copy on mismatched inputs used to do - exit 0, glitched output). Extra streams like GoPro/DJI timecode data or embedded thumbnails are skipped with a warning; the concat demuxer can't carry them.
  • transcode - builds a filter_complex graph with optional xfade. Always works on mixed sources, always re-encodes. Missing audio on some clips is auto-padded with silence, so the output doesn't drift out of sync.

Copy mode's output extension follows the first input's extension - two ProRes .mov clips give you a .mov, not .mp4 (the mp4 muxer has no ProRes tag and would fail).

The inputs that matter

  • video_paths - one path per line; you need at least 2.
  • mode - copy (fast, strict) or transcode (safe). Default is transcode, which is the right default for people who don't know their clips are compatible.
  • transition_sec / transition_type - transcode only. 0 = hard cut; >0 gives an xfade (fade, wipeleft, slideleft, dissolve, etc.).
  • fps / width / height - transcode target dims.
  • codec / crf / preset - transcode encode settings.

The dual-input twist: wire frames + tensor_fps + audio and the tensor becomes path[0] - prepended to your list. Good for "my AI-generated intro, then these real clips."

Install

Part of MediaForge:

cd ComfyUI/custom_nodes
git clone https://github.com/leon80148/comfyui_MediaForge.git
# restart ComfyUI

Or ComfyUI Manager β†’ "MediaForge".

Common issues

The copy-mode raise listing per-file codec/dim differences is expected behavior, not a bug - that's the preflight working. Fix by normalizing sources with MF_SaveVideoFrames first, or just switch to transcode. And don't reach for copy when your clips come from different cameras or different encoding runs; it's for same-source footage (same camera, same settings). The pack's own framing: copy for joining clips from the same camera, transcode for stitching different codecs or resolutions.

CategoryMediaForge/Video

Inputs (14)

NameTypeDefaultDescription
video_pathsSTRINGinput/clip1.mp4 input/clip2.mp4β€”
filename_prefixSTRINGMediaForge/concatβ€”
modeCOMBOtranscode2 options: copy, transcode
transition_secFLOAT0.000–5β€”
transition_typeCOMBOfade8 options: fade, wipeleft, wiperight, slideleft, slideright, circleopen, +2
fpsFLOAT30.01–240β€”
widthINT192016–7680β€”
heightINT108016–4320β€”
crfINT180–51β€”
codecCOMBOh264 NVIDIA GPU (h264_nvenc)7 options: h264 (libx264), hevc (libx265), av1 (libsvtav1), prores (prores_ks), h264 NVIDIA GPU (h264_nvenc), hevc NVIDIA GPU (hevc_nvenc), +1
presetCOMBOmedium9 options: ultrafast, superfast, veryfast, faster, fast, medium, +3
framesoptIMAGEβ€”
tensor_fpsoptFLOAT30.01–240β€”
audiooptAUDIOβ€”

Outputs (1)

NameTypeDescription
final_video_pathSTRINGβ€”