ComfyTV/Videogenerated

Mux Audio(VideoMuxAudioStage)

Mux Audio combines a video stream with an audio stream, producing a single video output that carries both.

Video Mux Audio Stage

video
audio
video
mode
replace
offset_s
0.00
ComfyTV

Description

Mux Audio combines a video stream with an audio stream, producing a single video output that carries both. It is the stage in the ComfyTV/Video pipeline responsible for attaching or blending a soundtrack onto video before it is saved or passed further downstream.

The node offers two combination modes. In replace mode the supplied audio takes the place of whatever audio (if any) is already carried by the input video. In mix mode the supplied audio is blended together with the video's existing audio, so both are audible in the result. The offset_s control shifts the audio in time relative to the video, which is useful for correcting sync drift or for deliberately delaying or advancing the sound.

Both media inputs are optional, so the node can also be used as a pass-through or as a timing adjustment stage when only one side is connected.

Inputs

mode

  • Type: COMBO
  • Default: replace
  • Options: replace, mix

Controls how the audio input is combined with the audio already present in the video input.

  • replace swaps out any existing audio track and uses the audio input as the soundtrack of the output video. This is the default and the usual choice when adding a fresh voiceover, music bed, or sound effect track.
  • mix blends the audio input with the video's existing audio, keeping both. Use this to lay music under an existing recording or to layer additional sound onto a clip that already has sound.

If the input video has no audio of its own, both modes behave the same way: the audio input simply becomes the output soundtrack.

offset_s

  • Type: FLOAT
  • Default: 0
  • Range: -600 to 600
  • Step: 0.05

Shifts the audio relative to the start of the video, measured in seconds.

  • A value of 0 aligns the audio with the beginning of the video.
  • A positive value delays the audio, so it starts later than the video.
  • A negative value advances the audio, so it starts earlier than the video (the leading part of the video may then be silent or carry only the original audio, depending on mode).

The range covers plus or minus 600 seconds (10 minutes), with a resolution of 0.05 seconds (50 ms), which is fine enough to correct small sync errors between separately generated video and audio.

video

  • Type: COMFYTV_VIDEO
  • Required: No

The video stream to which audio will be attached. Its existing audio, if any, is either replaced or mixed depending on mode. If this input is left unconnected, there is no video timeline to carry the result, so connect it for any meaningful muxing operation.

audio

  • Type: COMFYTV_AUDIO
  • Required: No

The audio stream to place onto the video. How it is used depends on mode: it becomes the new soundtrack in replace mode, or is blended with the existing audio in mix mode. Its start is shifted by offset_s. If left unconnected, there is nothing to add, and the video passes through with its original audio unchanged.

Outputs

COMFYTV_VIDEO

A video stream containing the visual track from the video input together with the resulting audio. The output is ready for downstream nodes such as video preview or save stages.

Usage Notes

  • Connect the video first, then the audio you want to add. The node is primarily a combination stage, so at least the video input is normally expected.
  • Use replace when the source clip's own audio is unwanted or nonexistent, and mix when you want to preserve it and layer something on top.
  • A small nonzero offset_s is the usual fix for audio that consistently runs slightly ahead of or behind the picture. Values around a few hundredths of a second are common; large values are useful for structural edits such as starting music after an intro.
  • Because both media inputs are optional, the node can act as a pass-through: leaving audio disconnected returns the video essentially unchanged apart from any timing adjustment.
  • Keep the two streams roughly the same duration in mind. Audio longer than the video will extend beyond the picture, and audio shorter than the video will leave the tail silent (or, in mix mode, leave only the original audio there).

Comments

Sign in with GitHub to join the discussion.

Loading comments…