ComfyUI Node

Tween Concat Videos

The ffmpeg node that stitches your interpolated segments back into one video

By ethanfel·Created 7 months ago·Updated about a month ago· 18
Tween Concat Videos
  • model
  • video_path
output_directory
filename_prefixsegment
output_filenamefinal_video.mp4
delete_segmentsfalse

The Segment Interpolate nodes in the Tween pack exist because one video is too big to interpolate in one shot. That means you end up with a dozen mp4s named segment_00001.mp4, segment_00002.mp4, and so on - which is exactly what Tween Concat Videos exists to glue back together. It's a one-shot ffmpeg wrapper: no video is loaded, no frames are touched, it just takes your numbered segment files and concatenates them into a single video using ffmpeg's concat demuxer with -c copy, meaning zero re-encoding - fast, lossless, and it won't give you a generation-quality surprise.

How you use it. After a chain of Segment Interpolate nodes, each ending in a Video Helper Suite Video Combine that saves segment_00001.mp4, segment_00002.mp4, etc., you drop this node at the end:

  • model (any type) - connect this from the last Segment Interpolate's model output. The node doesn't actually need the model for anything except ordering: this wire guarantees concatenation only runs after every segment has been saved. If you don't do it, the concat can fire before the last segment exists and you'll get a "no segment files found" error.
  • output_directory - where the segments live. Empty uses ComfyUI's default output directory; relative paths resolve from there too.
  • filename_prefix (default segment) - must match what Video Combine used as its filename prefix, so the node can find segment_* files.
  • output_filename (default final_video.mp4) - the concatenated result, saved in the same directory.
  • delete_segments (off by default) - deletes the individual segment files after a successful concat. Turn it on once you trust the output; otherwise they pile up and pollute the next run, because the node grabs every file matching the prefix.

It outputs a single video_path string, which is mainly useful if you're building a workflow that logs or displays the result.

Install. It ships in the Tween pack - search "Tween" in ComfyUI Manager, or:

cd ComfyUI/custom_nodes
git clone https://github.com/Ethanfel/ComfyUI-Tween
pip install -r requirements.txt

Restart and the node appears under video/Tween. It needs an ffmpeg binary; it checks your PATH first and falls back to the one bundled with imageio-ffmpeg if you've got that installed. On most ComfyUI setups ffmpeg is already there via other dependencies - if the node errors with "ffmpeg not found," install it system-wide or pip install imageio-ffmpeg.

Gotchas. Files are matched with prefix_* across .mp4, .webm, and .mkv, and sorted by the number in the filename - so keep your naming scheme consistent or the order goes weird. The output filename must be a plain name without path tricks or newlines; the node is deliberately strict about that. And the -c copy concat only works cleanly when every segment shares the same codec, resolution, and frame rate - which is automatic if they all came from the same Video Combine settings, and a disaster if you changed settings halfway through the chain.

Categoryvideo/Tween

Inputs (5)

NameTypeDefaultDescription
model*Connect from the last Segment Interpolate's model output (any model type). This ensures concatenation runs only after all segments are saved.
output_directorySTRINGDirectory containing the segment video files. Leave empty to use ComfyUI's default output directory. Relative paths are resolved from the output directory.
filename_prefixSTRINGsegmentFilename prefix used when saving segments with VHS Video Combine. Matches files like segment_00001.mp4, segment_00002.mp4, etc.
output_filenameSTRINGfinal_video.mp4Name of the concatenated output file. Saved in the same directory.
delete_segmentsBOOLEANfalseDelete the individual segment files after successful concatenation. Useful to avoid leftover files that would pollute the next run.

Outputs (1)

NameTypeDescription
video_pathSTRING