Nodes/ComfyUI-Automation/Video Concatenation
ComfyUI Node

Video Concatenation

Stitching your batch renders into a real video

By franciscotorrado·Created 7 months ago·Updated 7 months ago· 0
Video Concatenation
  • video1
  • video2
  • video3
  • video4
  • video5
  • video
transition_typenone
transition_time1.0
output_formatmp4

So you batch-generated a bunch of video clips - one per scene, each with its own prompt - and now you've got a folder of separate files that are supposed to be one video. That's the exact gap Video Concatenation fills. It takes up to five clips, joins them in sequence, optionally crossfades between them, and hands you a single video object you can save or preview. It's the end of the assembly line for the ComfyUI-Automation iterator system, but honestly it's useful standalone whenever you need to glue clips together inside ComfyUI instead of hopping to a video editor.

How it works

Under the hood it's ffmpeg, driven through the ffmpeg-python wrapper - no manual CLI, no file juggling. With transition_type set to none it does a plain concatenation of the video and audio streams. Pick a transition and it gets clever: it probes each clip's duration first (that's the ffprobe part), then builds an xfade filter chain between the clips with an acrossfade on the audio track to match. If anything in that chain fails - an unreadable clip, a probe that comes back empty - it falls back to a hard-cut concat rather than dying on you. Result gets written to ComfyUI's temp directory under a timestamped filename, and what comes out of the video output is a small wrapper object that Save Video and Preview nodes know how to handle.

One genuinely nice detail: the input parsing is flexible. It accepts raw file paths, lists of them, VHS-style dicts with a filenames key, ComfyUI's newer video objects that expose get_stream_source, and even its own output object - which means you can chain two concat nodes together if you somehow have more than five clips.

The inputs that matter

  • transition_type - 17 options, default none. fade and dissolve are the ones you'll actually use; the rest are slide/wipe directions, circlecrop, distance, radial, pixelize, hblur.
  • transition_time - seconds per transition, 0.1 to 10, default 1. Longer than 1–2s on short clips and it starts to feel less like a transition and more like the video is broken.
  • output_format - mp4, mkv, mov, webm, avi, or gif. Default mp4, and for most purposes that's where you should leave it.
  • video1 through video5 - the clips. Any subset works; unused slots are skipped.

Output: video, a VIDEO-typed object you feed into your save/preview node.

Installing it

The pack's one real dependency is an ffmpeg wrapper, which trips people up:

cd ComfyUI/custom_nodes
git clone https://github.com/franciscotorrado/ComfyUI-Automation
pip install -r requirements.txt

Restart ComfyUI. ComfyUI Manager users: search "ComfyUI-Automation". Note the README's install snippet shows a placeholder repo URL - the real one is above.

Common issues

The big one: requirements.txt is just ffmpeg-python, and that package only calls ffmpeg - the actual ffmpeg and ffprobe binaries have to exist on your system PATH. ComfyUI bundles ffmpeg for its own video nodes, but ffmpeg-python shells out to a standalone executable, so on a bare Linux box or a slim Windows install you can hit "ffmpeg not found"-flavored errors. Install ffmpeg system-wide and make sure it's on PATH before you blame the node.

Second, concatenation assumes your clips agree with each other - same resolution, framerate, and codec family. Hard cuts are forgiving-ish, but xfade gets genuinely picky; mismatched clips are the most common reason the transition path silently falls back to none. For a batch loop, generate all clips at the same settings and you'll be fine.

Finally, the output filename is timestamped to the second, and the file lives in ComfyUI's temp directory - so don't go hunting for your final render in your output folder. It's a temp artifact by design; save it properly with a Save Video node downstream.

CategoryVideo Concatenation

Inputs (8)

NameTypeDefaultDescription
transition_typeCOMBOnone17 options: none, fade, slideleft, slideright, slideup, slidedown, +11
transition_timeFLOAT1.00.1–10
output_formatCOMBOmp46 options: mp4, mkv, mov, webm, avi, gif
video1optVIDEO
video2optVIDEO
video3optVIDEO
video4optVIDEO
video5optVIDEO

Outputs (1)

NameTypeDescription
videoVIDEO