ComfyUI Node

AudioVideoCombine

Swap a video's audio track for a new one

By christian-byrne·Created 2 years ago·Updated 4 months ago· 591
AudioVideoCombine
  • audio
  • video
  • video
video_start_time0:00
video_end_time

AudioVideoCombine takes a video and a new audio track and hands you back the video with that audio dropped in. That's the whole job - no re-encoding the visuals, no messing with framerate, just "replace this video's soundtrack." It sounds small, but it's the node that turns the rest of the audio-separation-nodes-comfyui pack into an actual video-editing pipeline instead of just an audio toolkit.

Why you'd reach for it

This shows up whenever you've generated or edited audio and now need it back on a video. The pack's own README walks through it: separate a video's audio with AudioSeparation, generate new background music with something like Stable Audio (keeping denoise low so it stays sonically close to the original - a handy trick for dodging a copyright claim on BGM without re-shooting anything), then use AudioVideoCombine to marry the new BGM back onto the original footage. It also comes up as a plain "how do I combine audio and video" answer on r/comfyui - when someone asked exactly that, this node pack (and this node specifically) is what got recommended, ahead of rolling your own solution with a generic video-combine node.

Dubbing, replacing a placeholder audio track with a final mix, or just re-attaching separated vocals to their source video after processing - same node, same job.

How it works

It leans on moviepy (one of the pack's listed dependencies) to splice a new audio stream onto an existing video container. You're not editing the video frames at all - just the audio channel that rides along with them.

The inputs and outputs that matter

Two required inputs:

  • audio - the AUDIO track you want on the final video.
  • video - the VIDEO you're replacing the audio on.

And two optional ones for trimming the video side before the swap:

  • video_start_time - default "0:00". Per the tooltip, the video is trimmed to start here; format is MM:SS.
  • video_end_time - default empty (""). Leave it blank to use the video's full duration, or set an MM:SS end point to trim it short.

Note these two only trim the video - if your audio track is a different length than the (possibly trimmed) video, that's on you to sort out beforehand, e.g. with AudioCrop.

Output is a single video (VIDEO type), described in the node itself simply as "the combined video" - wire it into a video preview/save node like you would any other VIDEO output.

Installing it

Search audio-separation-nodes-comfyui in ComfyUI Manager, or do it by hand: cd ComfyUI/custom_nodes && git clone https://github.com/christian-byrne/audio-separation-nodes-comfyui, cd into it, pip install -r requirements.txt, restart ComfyUI. That requirements file pulls in moviepy, which is what this specific node depends on most directly - librosa and torchaudio matter more for AudioSeparation and the tempo nodes than for this one.

Common issues

There's no model download here - this node doesn't touch Demucs, so the pack's documented BadZipFile checkpoint-corruption issue doesn't apply to it. If you're trying to load a video directly into a LoadAudio node elsewhere in your graph (say, to extract its audio before feeding a new track back through this node), know that stock ComfyUI's LoadAudio doesn't accept video extensions out of the box - you'd need to edit nodes_audio.py to add them. AudioVideoCombine sidesteps that entirely since it takes VIDEO as a first-class input, which is arguably the cleaner reason to reach for this node instead of hacking LoadAudio to accept .mp4 files.

Otherwise, keep an eye on time formats - both trim fields are MM:SS, not raw seconds, same convention as the rest of the pack.

Categoryaudio

Inputs (4)

NameTypeDefaultDescription
audioAUDIO
videoVIDEO
video_start_timeoptSTRING0:00The video will be trimmed to start at this time. The format is MM:SS.
video_end_timeoptSTRINGThe video will be trimmed to end at this time. Leave blank to use the full duration.

Outputs (1)

NameTypeDescription
videoVIDEOThe combined video.