Nodes/MiniMaxRefDirector-ComfyUI/Merge Videos From Paths
ComfyUI Node

Merge Videos From Paths

Stitch your H3 segments back into one film, in the order you picked

By eaglering·Created 19 days ago·Updated about 11 hours ago· 23
Merge Videos From Paths
  • audio
  • VIDEO
paths
frame_count-1
audio_modemerge

A multi-shot workflow that only gives you loose clips has failed at the last step. Merge Videos From Paths is the pack's closer: it takes a list of video paths - or URLs, or glob patterns - loads them, and concatenates them into one VIDEO output in exactly the order you list them. Which matters more than it sounds, because the Director front-end lets you select materials and this node is what honors the "merge in selected order" promise from the README.

The mechanism is straightforward file assembly. paths takes one path per line or comma-separated: ComfyUI input/output/temp paths (including subdirectories and ** globs), absolute local paths, or HTTP(S) URLs. Each source is resolved, optionally trimmed, loaded as a video, and concatenated in list order. The constraint is the usual one - all clips must share the same fps, dimensions, and audio configuration. Mix a 24fps 768×1344 clip with a 16:9 24fps clip and the concat will not be happy; normalize before you merge.

The two controls you'll touch: frame_count caps how many frames survive after merging (-1 keeps everything, and -1 is the default, so you only set it when you want a hard trim), and audio_mode decides what happens to sound - merge combines the optional audio input with the clips' existing audio, override replaces it. That optional audio input (type AUDIO) is the interesting part: this node will take audio from elsewhere in your graph and lay it onto the merged video with ffmpeg. For the H3 flow, that's how you attach your final master audio to the stitched film instead of trusting each segment's own mix.

Under the hood it does real work rather than a toy concat: progress bars, temp-file cleanup for downloaded URLs, and a single-video fast path that just loads and trims if you only gave it one path. It also has a companion API route in the pack's server that the Director's front-end calls when you merge from the UI - same logic, invoked without a prompt running.

Where it sits in the workflow: you run it after the loop finishes, at the very end. The Guide node has been writing per-segment files via VHS VideoCombine and back-filling them into the Director's material track; you multi-select those, hit merge, and this node produces the full film. If you're not using the pack's UI flow, you can still feed it any paths or URLs by hand - the node doesn't care where the clips came from.

Install is the pack's shared story: ComfyUI Manager or git clone https://github.com/eaglering/MiniMaxRefDirector-ComfyUI into custom_nodes, pip install -r requirements.txt (only PyAV is new), restart. One gotcha grounded in the code: if a path resolves to nothing, it raises "At least 1 video path is required" - empty or typo'd path lists fail loudly, not silently, which is the good kind of failure. And while it's tempting to blame this node when the audio drifts, the root cause is usually mismatched clip metadata, so check fps and resolution before you start swapping merges.

Categoryminimaxrefdirector

Inputs (4)

NameTypeDefaultDescription
pathsSTRINGOne path per line (or comma-separated). Accepts ComfyUI input/output/temp paths (including subdirectories and ** globs), absolute paths, or URLs.
frame_countINT-1Maximum frames to keep after merging. Use -1 to keep all frames.
audio_modeCOMBOmergeMerge the AUDIO input with the video's existing audio, or override it.
audiooptAUDIOOptional audio to replace or add to the final merged VIDEO using FFmpeg.

Outputs (1)

NameTypeDescription
VIDEOVIDEO