Join Videos In Directory
Stitch a folder of clips into one file
- audio_input_options
Video workflows love to produce clips in pieces. You render a long animation in chunks to stay inside your VRAM budget, or a batch job spits out a numbered sequence of .mp4 files, and now you've got a folder full of fragments that are supposed to be one video. Join Videos In Directory concatenates them: point it at the directory, give it an output path, and it welds the clips into a single file. It's the "put it back together" step at the end of a segmented video pipeline.
This is a housekeeping node, not a creative one, but it saves you from opening a video editor just to append three clips. If you're doing long-form generation with Wan, LTX, or any frame-batched setup that writes out pieces, this closes the loop.
How it works
It reads the video files in the directory you name, joins them in order into one output file at the path you specify, and - because it's an output node - that write is the whole point of running it. There's an audio hook via a companion node, and an option to clean up the source folder once the join succeeds. Under the hood this kind of node leans on ffmpeg to do the actual muxing, which is why the pack ships a requirements.txt you'll want installed.
The inputs and outputs that matter
directory_containing_videos- the folder holding the clips to join. The default is a placeholder/path/; you have to set a real one.output_file_path- where the joined video gets written. Again, replace the/path/placeholder.audio_input_options- anAUDIO_INPUT_OPTIONSbundle from the Audio Input Options node, if you want a soundtrack muxed onto the result. Wire that node in when you need audio.delete_directory_containing_videos- off by default, and leave it off until you trust the output. When true, it deletes the source folder after joining. Convenient for temp chunks, a footgun for anything you can't regenerate.
There are no output pins - this is an output node whose product is the file on disk.
How to install it
ComfyUI Manager, search JNodes, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/JaredTherriault/ComfyUI-JNodes
pip install -r ComfyUI-JNodes/requirements.txt
Don't skip the pip install here - video muxing needs the pack's dependencies (and a working ffmpeg on the system), which the prompt-only nodes don't.
Common issues & troubleshooting
Clips joined in the wrong order. Directory joins go by filename order, so name your chunks with zero-padded numbers (clip_001, clip_002) - otherwise clip_10 sorts before clip_2 and your video jumps around.
Nothing in the folder / empty output. The placeholder /path/ was left in, or the directory has no video files the node recognizes. Set a real absolute path that actually contains the clips.
delete_directory_containing_videos ate my files. It does exactly what it says. Verify the joined output first, then enable deletion only for throwaway temp folders. There's no undo.
Running on a cloud/serverless ComfyUI. Path-based directory nodes assume a persistent local filesystem. On an ephemeral runner the folder you're pointing at may not survive between steps or between runs - make sure the clips are written to and read from a path that actually exists for the lifetime of the job.
Codec or mismatch errors. ffmpeg concatenation is happiest when the clips share codec, resolution, and framerate. Wildly different source clips can fail or produce a broken file; normalize them upstream if the join complains.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| directory_containing_videos | STRING | /path/ | — |
| output_file_path | STRING | /path/ | — |
| audio_input_options | AUDIO_INPUT_OPTIONS | — | |
| delete_directory_containing_videos | BOOLEAN | false | — |
Outputs (0)
No outputs