VRGDG_CreateFinalVideo
Concatenate all the set videos and glue the clean audio back on — the last node
- trigger
- audio
This is the finish line. VRGDG_CreateFinalVideo is an output node that takes every completed set video sitting in video_folder, concatenates them into one clip, and then muxes the original clean audio back on top - producing FINAL_VIDEO.mp4. It's the terminal step of the VRGameDevGirl music-video pipeline: after you've generated and combined all the sets, this is the node that makes it a watchable song instead of a folder of clips.
It has no outputs, because it's the end of the line. It writes files and pops a green "VIDEO COMPLETE!" toast in the UI via ComfyUI's server. If you've seen the pack's workflow run end-to-end, this is where the confetti lands.
How it works
Like the load-gate nodes, it's triggered by a VHS_FILENAMES input (from VideoHelperSuite's Combine Video) so it runs after the videos are written, and it has a threshold guard: only proceed if at least that many -audio.mp4 files exist in video_folder (default 3). Below threshold, it silently returns.
When it does run, the assembly is two ffmpeg passes:
- Concatenate - all matching
-audio.mp4files go into a concat demuxer list, joined with-c:v copy(no re-encode, so it's fast) and-an(audio stripped). - Mux - the concatenated silent video is combined with the
audioinput, which should be the clean original track (run it throughVRGDG_CleanAudiofirst for a consistent 48kHz stereo form). Video is copied, audio is encoded to AAC,-shortesttrims to the shorter of the two, and the result is written asFINAL_VIDEO.mp4in the same folder.
It needs ffmpeg - the pack checks for a system ffmpeg first and falls back to the imageio-bundled binary. Either works; system ffmpeg with NVENC is faster on the AAC/encode side, but with -c:v copy on both passes the encode cost is minimal anyway.
Inputs and gotchas
trigger(VHS_FILENAMES) - required, from VHS Combine Video.audio(AUDIO) - the clean original audio to re-attach.threshold- minimum set count to proceed.video_folder- where the sets live; relative paths resolve against ComfyUI's output directory.
The trap: the audio you feed it replaces the per-set audio. Each set video was generated with its own audio, but the final node strips all of it and lays the original track back over the concatenation. Feed it the right, clean, frame-aligned audio or the whole song's sync is off. And if FINAL_VIDEO.mp4 already exists, it gets deleted before the new one is written - the SRT variant below handles the "don't clobber my good take" problem.
Install
ComfyUI Manager → search "vrgamedev", or git clone https://github.com/vrgamegirl19/comfyui-vrgamedevgirl into ComfyUI/custom_nodes, restart. Pack requirements (kornia, librosa, imageio) plus ffmpeg. If you need rerun/redo support with numbered outputs, use VRGDG_CreateFinalVideo_SRT instead.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| trigger | VHS_FILENAMES | — | |
| audio | AUDIO | — | |
| threshold | INT | 3 | — |
| video_folder | STRING | video_output | — |
Outputs (0)
No outputs