Video Merger
Stitch every clip in a folder into one file with ffmpeg
- audio
- output_path
Video Merger is the assembly step at the end of this pack's pipeline. Point it at a directory full of video clips, and it concatenates them into one output file with proper encoding - codec, quality, resolution, optional audio - and writes the result into your ComfyUI output folder. Where VibeMusicEngine plans the cuts and MovingTitles adds the subtitles, VideoMerger is what turns the pieces back into a watchable thing.
It works by shelling out to ffmpeg via the ffmpeg-python library: it scans the input directory for video files, sorts them, builds a concat list, and runs ffmpeg's concat demuxer, re-encoding everything to a consistent output (or stream-copying with zero re-encode if you pick the copy codec). It even probes each file first and will swap to a compatible output format if your chosen codec doesn't support the container you picked - pick VP9 and forget to choose webm, and it silently corrects you.
The inputs that matter
input_path(STRING) - must be a directory containing the clips, not a file and not a list of paths. It globs.mp4,.mkv,.mov,.avi,.webmin that folder. If it's empty or missing, you get an error string back, not a crash.output_filename(defaultFinalVideo) - the base name for the merged file.fps(default 25),video_bitrate(default8M),audio_bitrate(default192k) - encoding parameters.output_format(mp4/mkv/mov/avi/webm),video_codec(h264/h265/vp9/mpeg4/copy),video_quality(medium/slow/veryslow/fast/veryfast/ultrafast) - the important choices. For most people: mp4 + h264 + medium, and you're done.copyis the fast path - no re-encode, near-instant - but it only works cleanly when all your clips already share the same codec and settings.save_mode(overwrite/iterate) - replace the output or keep numbered versions.- Optional
audio(AUDIO) plusaudio_codec(aac/mp3/ac3/PCM variants) - attach a soundtrack to the merge, which pairs naturally with the pack's audio work.
Output: output_path (STRING) - where the merged file landed.
Install & the one real gotcha
Pack install as usual: Manager search "videoclipgenerator", or git clone https://github.com/lazniak/videoclipgenerator into custom_nodes + pip install -r requirements.txt, restart.
The one thing that will actually bite you: ffmpeg must be installed on your system and on your PATH. The ffmpeg-python dependency is just a wrapper - it calls the ffmpeg binary, it doesn't bundle one. If you get a "No such file or directory" or a shutil/executable error, install ffmpeg (on Windows the cleanest route is winget install ffmpeg or a static build; on Linux sudo apt install ffmpeg) and restart ComfyUI. Also worth knowing: clips of wildly different resolutions or frame rates are the other common failure - the merger re-encodes to a common output, but feeding it mismatched streams can still produce a failed concat, so normalize your inputs first. And as with everything in this pack, the buy_me_a_coffee checkbox opens a browser tab when ticked - leave it false.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| input_path | STRING | — | |
| output_filename | STRING | FinalVideo | — |
| fps | FLOAT | 25.01–120 | — |
| output_format | COMBO | 5 options: mp4, mkv, mov, avi, webm | |
| video_codec | COMBO | 5 options: h264, h265, vp9, mpeg4, copy | |
| video_quality | COMBO | 6 options: medium, veryslow, slow, fast, veryfast, ultrafast | |
| video_bitrate | STRING | 8M | — |
| save_mode | COMBO | 2 options: overwrite, iterate | |
| buy_me_a_coffee | BOOLEAN | false | Support development with a coffee! ☕ |
| usage_counter | STRING | Usage count: 0 | Tracks how many times this node has been used across all your projects |
| audioopt | AUDIO | — | |
| audio_codecopt | COMBO | 6 options: aac, mp3, ac3, pcm_s16le, pcm_s24le, pcm_f32le | |
| audio_bitrateopt | STRING | 192k | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output_path | STRING | — |