Video Stitcher
Stitch up to four clips into one video, transition included
- image1
- image2
- audio
- image3
- image4
- image
- audio
Concatenating clips in ComfyUI is usually "append the tensors and pray," which gives you a hard cut and a resolution mismatch if the clips disagree. This node does it properly: it resizes everything to one target size, chains two to four clips end-to-end, and drops an actual transition at each join - slide, crossfade, barn door, or crunch. The author's framing is right: it doubles as a quick slideshow maker. Fourth node in the TKVideoZoom pack, pure OpenCV/PIL frame work, nothing to download.
How it works
All input clips are resize-and-crop'd to targetWidth × targetHeight (aspect-correct, so wide and tall clips get center-cropped to fit rather than squashed), then appended into one long frame sequence. At each boundary the node runs a 16-frame transition that blends the tail of the previous clip with the head of the next:
- slide left / slide up - the new clip pushes the old one off in that direction.
- crossfade - a straightforward dissolve over those 16 frames.
- barn door - the new clip opens from the center like a curtain.
- crunch - the new clip squeezes in from both edges, CRT-style.
Inputs and outputs
Required: transition, targetWidth (default 500), targetHeight (default 500), image1, image2. Optional: audio, image3, image4. So you can stitch up to four clips in one pass - leave image3/image4 unplugged for a simple two-clip join. Outputs are image and audio.
Wiring is the pack pattern, just with extra loaders:
VHS_LoadVideo ─image1─┐
VHS_LoadVideo ─image2─┤
VHS_LoadVideo ─image3─┤ TKVideoStitcher ─image─> VHS_VideoCombine
VHS_LoadVideo ─image4─┘
Where people get burned
- The 500×500 default. If you don't set
targetWidth/targetHeightto your clips' real resolution, everything gets center-cropped to a 500×500 square. That's the #1 "why did it eat my footage" report waiting to happen. Set both to your source resolution (or a fixed output you want). - One audio track, passed through.
audiois a single optional input that flows straight out untouched. It does not mix each clip's soundtrack - feed it the audio from your first clip and it plays over the whole stitch. Multi-clip audio needs separate handling. - The first clip gets its opening trimmed. Reading the source: the first ~16 frames of the combined sequence are skipped, so your output starts a beat into clip one. If the very first frames matter, add a second of headroom or edit accordingly. It's a quirk, not a bug you did something to cause.
- Clips of different lengths just end. There's no stretch-to-match; the stitch is however long the clips are. That's usually what you want, but if one clip is 2 seconds and another is 20, the transition point is wherever they land.
Install
ComfyUI Manager → search "TKVideoZoom" → install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/trashkollector/TKVideoZoom
Restart. No models, no keys. Like the rest of the pack it needs OpenCV (cv2) to import, and the pack's requirements.txt torch pins should be ignored - stock ComfyUI plus cv2 is the whole dependency story. And if this node vanishes from your menu, the others in the pack have too: they all live in one zoomcontrols.py module and load together.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| transition | COMBO | 5 options: slide left, slide up, crossfade, barn door, crunch | |
| targetWidth | INT | 500 | — |
| targetHeight | INT | 500 | — |
| image1 | IMAGE | — | |
| image2 | IMAGE | — | |
| audioopt | AUDIO | — | |
| image3opt | IMAGE | — | |
| image4opt | IMAGE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| audio | AUDIO | — |