Nodes/ComfyTV/Mux Audio
ComfyUI Node

Mux Audio

Drop the music bed onto the silent clip

By jtydhr88·Created 3 months ago·Updated about 15 hours ago· 725
Mux Audio
  • video
  • audio
  • video
force_run_token0
project_id
parent_output_id0
modereplace
offset_s0.00

You've got the picture and you've got the soundtrack, and they're two separate things sitting on the canvas. Mux Audio is the stage that fuses them into one deliverable clip. If you generated a music bed in a Music Stage or pulled a voice-over from Speech, this is how it gets onto the video.

What it does

It takes a COMFYTV_VIDEO and a COMFYTV_AUDIO, muxes them together via PyAV on ▶ Run, and saves a new video snapshot with the audio baked in. Both inputs are required - if either is missing, the run errors out rather than guessing.

The controls:

  • mode - replace (default) discards the clip's original audio and uses only the incoming track; mix blends the incoming audio with whatever the clip already has. Replace is the workhorse; mix is for ambience plus a music bed.
  • offset_s - shifts the incoming audio in time, −600 to +600 seconds. Positive delays it (starts later), negative pushes it earlier. This is your sync knob for lining up speech with lip movement.

The output is video (COMFYTV_VIDEO) - the clip with the new or mixed audio, saved as a snapshot.

How it fits the pack

The common pattern is a chain, not a one-off: Video Concat assembles the sequence of clips first, then a single Mux Audio lays one soundtrack across the whole assembly - one audio file, one mux, done. Or use Video Volume to set the clip's own audio level before mixing, so the incoming bed sits on top at the right balance. For voice-over work, the offset step dance - small nudges until speech lands on the mouth movement - is the part you'll iterate on.

Since audio here is COMFYTV_AUDIO, everything from the pack's audio suite (Stem Split, Loudness, EQ, Denoise) can process the track before you mux it, which is a genuinely nice workflow: clean the audio, then attach it.

Install and troubleshooting

Standard pack install: git clone https://github.com/jtydhr88/ComfyTV into ComfyUI/custom_nodes, restart, under ComfyTV → Video. No models, no GPU - PyAV media processing.

  • Run errors "needs both an upstream video and an upstream audio" - one of the wires is empty. Check that the audio stage was actually run; ComfyTV audio stages produce snapshots that this node can read.
  • Audio and picture out of sync - that's what offset_s is for. Small steps, then re-run.
  • Hearing both tracks when you wanted only the new one - you're on mix; switch to replace.
  • Can't wire a native ComfyUI AUDIO tensor here - use a Bridge; this socket expects COMFYTV_AUDIO.

The output is a COMFYTV_VIDEO snapshot, so native-node consumers need a ← ComfyTV Video Bridge. For everything inside the pack, it just connects.

CategoryComfyTV/Video

Inputs (7)

NameTypeDefaultDescription
force_run_tokenINT00–2147483647Internal — bumped on Run to invalidate ComfyUI's input cache.
project_idSTRINGInternal — populated by the projectStore on the frontend.
parent_output_idINT00–2147483647Internal — lineage parent set by spawn handlers on the frontend.
modeCOMBOreplace2 options: replace, mix
offset_sFLOAT0.00-600–600
videooptCOMFYTV_VIDEO
audiooptCOMFYTV_AUDIO

Outputs (1)

NameTypeDescription
videoCOMFYTV_VIDEO