Advanced Folder Video Combiner
Turn a folder into one edited video
- music_track
- output_path
The simple version of this pack's combiner just concatenates the MP4s in a folder. This one is the "make me an actual edit" version: it takes every video in a directory, normalizes them to one resolution and FPS, splices them with crossfades, adds fade-in/fade-out from a color, optionally mixes in a music track, and writes out a single finished video. It's the node you reach for when you've batch-rendered a pile of clips and want a compilation with transitions without touching a timeline editor.
It wears its inspiration on its sleeve - the README credits DarioFT's ComfyUI-VideoDirCombiner - and it's a genuinely configurable little editor: alphabetical or randomized order (with a seed), no repeated clips, per-clip trimming, resolution normalization with crop-or-pad, and audio handling that accepts VideoHelperSuite's audio format.
The default that will surprise you
Before the inputs, the one thing to fix: width defaults to 1080 and height to 1920 - portrait. Every clip gets normalized to that. If your videos are landscape, change width/height to 1920×1080 (or whatever matches) on your first run, or your "compilation" comes out vertical. Also note random_order defaults to true and sort_files to false, so out of the box it shuffles your clips. Both defaults are easy to miss and both change the result dramatically.
Inputs that matter
directory_path,output_filename,file_pattern(default*.mp4) - what to combine and what to call it.clip_duration- random segment length in seconds (0 = full video, default 5).width/height/resize_mode(croporpadding) /resize_padding_color- the normalization target. Crop trims to fill; padding letterboxes with the hex color.transition(none/fade) andtransition_duration- crossfade between clips.- Optional:
sort_files,random_order,seed,music_track(AUDIO - a VideoHelperSuite audio object or a path),trim_to_audio,fade_in_enabled/fade_in_color/fade_in_duration,fade_out_enabled/fade_out_color/fade_out_duration,use_gpu.
The single output output_path is the path string to the finished video.
How it works
Internally it probes every clip's duration in parallel (ThreadPoolExecutor), detects the first clip's resolution/FPS as the reference, then builds an ffmpeg complex filter graph: chained xfade transitions between clips, color sources for the fades, fps/size normalization on each segment, and amix for the music. Music in VideoHelperSuite's tensor form (waveform + sample rate) is written to a temp WAV first via soundfile, then mixed in. Temporary files are cleaned up automatically, and fades clamp so they never exceed clip length.
Installing it
Ships with the Simple Video Effects pack:
cd ComfyUI/custom_nodes
git clone https://github.com/scofano/ComfyUI-Simple-video-effects
cd ComfyUI-Simple-video-effects
pip install -r requirements.txt
Restart ComfyUI, or install via ComfyUI Manager ("Simple Video Effects"). No models. Heavy ffmpeg user - keep the binaries on your PATH.
Common issues
Besides the portrait-default trap, the usual suspects: a clip_duration of 0 means "use full clips" while 5 means 5-second random slices, so long clips get cut to 5s unless you change it; music_track needs an actual VideoHelperSuite AUDIO object or a valid path or it bails; and fade/transition durations longer than a clip get auto-clamped (by design). If your output has timing problems, check that all source clips share a sensible FPS - the node normalizes, but wildly mixed FPS sources (24/30/60) can still produce the occasional odd frame.
Inputs (22)
| Name | Type | Default | Description |
|---|---|---|---|
| directory_path | STRING | — | |
| output_filename | STRING | combined_output.mp4 | — |
| file_pattern | STRING | *.mp4 | — |
| clip_duration | FLOAT | 5.00–3600 | — |
| width | INT | 10801–8192 | — |
| height | INT | 19201–8192 | — |
| resize_mode | COMBO | crop | 2 options: crop, padding |
| resize_padding_color | STRING | #000000 | — |
| transition | COMBO | fade | 2 options: none, fade |
| transition_duration | FLOAT | 0.50.1–2 | — |
| sort_filesopt | BOOLEAN | false | — |
| random_orderopt | BOOLEAN | true | — |
| seedopt | INT | -1-1–2147483647 | — |
| music_trackopt | AUDIO | — | |
| trim_to_audioopt | BOOLEAN | true | — |
| fade_in_enabledopt | BOOLEAN | true | — |
| fade_in_coloropt | STRING | #000000 | — |
| fade_in_durationopt | FLOAT | 0.50.1–10 | — |
| fade_out_enabledopt | BOOLEAN | true | — |
| fade_out_coloropt | STRING | #000000 | — |
| fade_out_durationopt | FLOAT | 0.50.1–10 | — |
| use_gpuopt | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output_path | STRING | — |