Merge Videos
Stitch Two Clips Together, Frame by Frame
- video_1
- video_2
- VIDEO
The glue for "generate a clip per segment, then join them"
Long-form video from AI models is a lie - you don't generate ten seconds in one pass, you generate a bunch of short compatible clips and stitch them. This node is the stitcher: it takes two VIDEO inputs and concatenates them into one, end to end. That's the entire job, and it does it without ever touching FFmpeg.
The pack's own multi-segment workflows lean on exactly this idea. Its MultiTrack/Timeline editors split a longer video into segments, generate each segment separately, and this node (or its path-based cousin) is what turns the pieces back into a finished clip.
How it works
The mechanism is pure tensor work, which is why it's fast and has no FFmpeg dependency for the basic path:
- Each input is split into its components (frames + audio) via
get_components. - The image frames are concatenated with
torch.catalong the time axis - every clip's frames, in order. - If both clips carry audio, the waveforms are concatenated too, and the merged output keeps the first clip's frame rate and the audio sample rate.
Before all that, it validates compatibility - and this is the part you need to care about, because it's where the node pushes back.
Inputs and output
video_1(required) - the clip that plays first.video_2(required) - the clip that plays second.VIDEOout - the concatenated result.
That's it. Two in, one out, no settings. If you have more than two clips, chain it: merge A+B, then merge the result with C.
Setup and where it refuses to work
Install comes with the pack: ComfyUI Manager → ComfyUI-Easy-Media, or git clone into custom_nodes + restart.
The compatibility check is the real gotcha. All clips must share the same fps, dimensions, and audio configuration. Try to concatenate a 1280x720@30fps clip with a 512x512@24fps clip and it will refuse - and that refusal is doing you a favor, because a naive concat of mismatched clips produces stuttering, letterboxed garbage with silent audio.
The practical implications:
- Generate at the same resolution and fps across all your segments, or your merge will just error out.
- Match the audio config - a mono clip into a stereo chain will complain. If your segments have differing audio, extract and normalize first (the pack's
easy getAudioFromVideo+easy audioMergecan help). - Need a transition, not a hard cut? This node is pure concat - no crossfade. The path-based
easy mergeVideosFromPathsis the better fit when you're merging files from disk, and its FFmpeg path has the muscle for trimming.
It's not glamorous, but when your multi-shot workflow finally stitches cleanly you'll appreciate that the only decision it makes is "these clips match, good." Most nodes that promise glue can't even do that honestly.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| video_1 | VIDEO | — | |
| video_2 | VIDEO | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| VIDEO | VIDEO | — |