Nodes/ComfyUI_AceNodes/πŸ… Video Concat
ComfyUI Node

πŸ… Video Concat

Stitch two video files with ffmpeg β€” vertical, horizontal, or back-to-back

By hay86Β·Created 2 years agoΒ·Updated about a year agoΒ· 96
πŸ… Video Concat
    • STRING
    β—„video1β€”β–Ί
    β—„video2β€”β–Ί
    β—„methodverticalβ–Ί
    β—„audiovideo1β–Ί
    β—„seam_size1024β–Ί

    There are two kinds of "concat" in the video world: appending clip A then clip B into one longer video, and stacking them side-by-side or top-and-bottom into a comparison frame. ACE_VideoConcat does both, plus a horizontal stack, all by shelling out to ffmpeg. It's the "before/after reel" node - the thing you reach for when you want one side-by-side video of your source and your result.

    It's part of πŸ… Ace Nodes (hay86/ComfyUI_AceNodes), a one-author grab-bag. And it's one of the more opinionated nodes in the pack, because it's built around specific assumptions you should know about.

    How it works

    You hand it two video paths (strings - wire them from ACE_VideoLoad, which is why that node exists) and pick:

    • method - vertical stacks clip 2 below clip 1; horizontal puts them side by side; append plays them back-to-back as one continuous video.
    • audio - whose audio to keep: video1 or video2. (For append, audio is always mixed from both.)
    • seam_size - the width (vertical stack) or height (horizontal stack) that each clip is scaled to before stacking. Default 1024. Both clips get resized to match, which is also how mismatched resolutions get reconciled.

    The node builds an ffmpeg filter_complex command, runs it with os.system, and outputs the path to the result in ComfyUI's temp folder. Encode is hardcoded: libx264 video, aac audio, 25 fps.

    The sharp edges - read these before you run it

    • It calls /usr/bin/ffmpeg - hardcoded. If you're on Windows, or your ffmpeg lives elsewhere, this fails outright. The stack branches (vertical/horizontal) also shell out to ffprobe and awk to cap the output at the shorter clip's duration. This is very much a "Linux box with standard installs" node.
    • You need ffmpeg installed. ComfyUI ships without it by default; apt install ffmpeg (or your platform equivalent) is a prerequisite.
    • No error handling. It prints the command and runs it via os.system; if ffmpeg fails, you get a temp path pointing at a file that was never created. Check the console log for the actual ffmpeg error.
    • The output is a STRING path - feed it to ACE_VideoPreview to play it, or grab the file from ComfyUI/temp.

    Installing

    ComfyUI Manager β†’ search ComfyUI_AceNodes, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/hay86/ComfyUI_AceNodes
    

    Then restart. The pack's requirements.txt drags in the usual heavy list, but this node needs nothing beyond a working ffmpeg/ffprobe on PATH.

    Should you use it?

    For the exact job of "make a comparison video from two existing files," it's fine on Linux. But if you want to process video - frames in, frames out, encode options, GPU encoding - it's the wrong layer entirely, and VideoHelperSuite or a dedicated video-tools pack will serve you better. The hardcoded /usr/bin/ffmpeg is the tell: this is a convenience wrapper, not a general video tool. Keep expectations at that level and it'll do what it says.

    CategoryAce Nodes

    Inputs (5)

    NameTypeDefaultDescription
    video1STRINGβ€”
    video2STRINGβ€”
    methodCOMBOvertical3 options: vertical, horizontal, append
    audioCOMBOvideo12 options: video1, video2
    seam_sizeINT10241–2048β€”

    Outputs (1)

    NameTypeDescription
    STRINGSTRINGβ€”