Nodes/VRGameDevGirl Video Enhancement Nodes/๐ŸŽฌ VRGDG Combine Videos V3
ComfyUI Node

๐ŸŽฌ VRGDG Combine Videos V3

Stitch 16 Scene Videos Into One Timed Sequence

By vrgamegirl19ยทCreated about a year agoยทUpdated about 20 hours agoยท 682
๐ŸŽฌ VRGDG Combine Videos V3
  • audio_meta
  • video_1
  • video_2
  • video_3
  • video_4
  • video_5
  • video_6
  • video_7
  • video_8
  • video_9
  • video_10
  • video_11
  • video_12
  • video_13
  • video_14
  • video_15
  • video_16
  • blended_video_frames
โ—„fps25.00โ–บ
โ—„duration4.00โ–บ
โ—„index0โ–บ
โ—„total_sets1โ–บ
โ—„groups_in_last_set16โ–บ

The music-video workflow generates a video per scene, and at some point those scenes have to become one continuous video. VRGDG_CombinevideosV3 is the stitching node: it takes up to 16 IMAGE video inputs, trims or pads each to the duration your audio says it should be, and outputs a single blended frame sequence. The "v3" in the name is earned - this is the combine node that's been through the wars of the pack's music-video pipeline, and it's built to match video lengths to actual audio durations, not assumptions.

Here's the key mechanism: it doesn't just concatenate. Each scene's target length comes from audio_meta (the dict produced by the pack's audio splitter, e.g. VRGDG_LoadAudioSplitUpload), read per-scene at your fps. A scene that came out too long gets trimmed; a scene that came out too short gets... left alone (the source deliberately doesn't pad under-length videos - it warns and returns as-is, because inventing frames is worse than a short scene). Then it layers the trimmed scenes into one IMAGE tensor you can save or encode.

The inputs that matter

  • fps - frames per second (25 default), used to convert scene durations to frame counts.
  • audio_meta - the DICT from your audio splitter; this is what drives per-scene durations. Wire it or the sync breaks.
  • index / total_sets / groups_in_last_set - the batching bookkeeping. Because a song has more scenes than 16, the pipeline processes them in sets; index says which set you're on, total_sets how many there are, and groups_in_last_set how many scenes are in the final (partial) set. The node uses these to know which video_N inputs are actually populated.
  • duration - per-group duration in seconds (4 default), used when durations aren't available in frames.

Optional inputs: video_1..video_16, the scene videos themselves (IMAGE). Only the ones present get combined.

Output: blended_video_frames - one IMAGE tensor with all the frames concatenated, ready for a VHS save/encode node.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/vrgamegirl19/comfyui-vrgamedevgirl

Or search vrgamedev in ComfyUI Manager. No special dependencies.

Common issues

  • Final video is the wrong length / out of sync: audio_meta isn't connected, or doesn't match the audio you split. The durations have to come from the same split that produced the scene audios.
  • A scene silently ends early: that's the "don't pad short videos" behavior. Check your video generation for that scene - it came out under-length, and the node deliberately won't fabricate frames.
  • Only the first set combines: total_sets / index are wrong. If the song has more scenes than 16, this node handles one set per run; the rest are other runs of the same node with incremented index.
  • 16 inputs and you have 17 scenes: the cap is hard. That's what the sets system is for.

Honest take: combine nodes are everywhere, but this one's value is the wiring - it speaks the pack's audio_meta language so scene lengths come from the actual audio timing instead of you hand-entering each one. If you're using the VRGameDevGirl music-video flow, this is the node that turns 16 separately-generated scenes into one video that actually lines up with the song.

CategoryVideo

Inputs (22)

NameTypeDefaultDescription
fpsFLOAT25.00โ€”
durationFLOAT4.00โ€”
audio_metaDICTโ€”
indexINT0โ€”
total_setsINT1โ€”
groups_in_last_setINT160โ€“16โ€”
video_1optIMAGEโ€”
video_2optIMAGEโ€”
video_3optIMAGEโ€”
video_4optIMAGEโ€”
video_5optIMAGEโ€”
video_6optIMAGEโ€”
video_7optIMAGEโ€”
video_8optIMAGEโ€”
video_9optIMAGEโ€”
video_10optIMAGEโ€”
video_11optIMAGEโ€”
video_12optIMAGEโ€”
video_13optIMAGEโ€”
video_14optIMAGEโ€”
video_15optIMAGEโ€”
video_16optIMAGEโ€”

Outputs (1)

NameTypeDescription
blended_video_framesIMAGEโ€”