๐ฌ VRGDG Combine Videos V3
Stitch 16 Scene Videos Into One Timed Sequence
- 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
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;
indexsays which set you're on,total_setshow many there are, andgroups_in_last_sethow many scenes are in the final (partial) set. The node uses these to know whichvideo_Ninputs 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_metaisn'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/indexare 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 incrementedindex. - 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.
Inputs (22)
| Name | Type | Default | Description |
|---|---|---|---|
| fps | FLOAT | 25.00 | โ |
| duration | FLOAT | 4.00 | โ |
| audio_meta | DICT | โ | |
| index | INT | 0 | โ |
| total_sets | INT | 1 | โ |
| groups_in_last_set | INT | 160โ16 | โ |
| video_1opt | IMAGE | โ | |
| video_2opt | IMAGE | โ | |
| video_3opt | IMAGE | โ | |
| video_4opt | IMAGE | โ | |
| video_5opt | IMAGE | โ | |
| video_6opt | IMAGE | โ | |
| video_7opt | IMAGE | โ | |
| video_8opt | IMAGE | โ | |
| video_9opt | IMAGE | โ | |
| video_10opt | IMAGE | โ | |
| video_11opt | IMAGE | โ | |
| video_12opt | IMAGE | โ | |
| video_13opt | IMAGE | โ | |
| video_14opt | IMAGE | โ | |
| video_15opt | IMAGE | โ | |
| video_16opt | IMAGE | โ |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| blended_video_frames | IMAGE | โ |