Mux Audio
Drop the music bed onto the silent clip
- video
- audio
- video
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;mixblends 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_sis for. Small steps, then re-run. - Hearing both tracks when you wanted only the new one - you're on
mix; switch toreplace. - 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.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| force_run_token | INT | 00–2147483647 | Internal — bumped on Run to invalidate ComfyUI's input cache. |
| project_id | STRING | Internal — populated by the projectStore on the frontend. | |
| parent_output_id | INT | 00–2147483647 | Internal — lineage parent set by spawn handlers on the frontend. |
| mode | COMBO | replace | 2 options: replace, mix |
| offset_s | FLOAT | 0.00-600–600 | — |
| videoopt | COMFYTV_VIDEO | — | |
| audioopt | COMFYTV_AUDIO | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| video | COMFYTV_VIDEO | — |