Nodes/OmniNodes/Video Mux Audio πŸ”Š
ComfyUI Node

Video Mux Audio πŸ”Š

Put sound on your generated video

By TensorVizionΒ·Created 3 months agoΒ·Updated about 8 hours agoΒ· 0
Video Mux Audio πŸ”Š
  • images
  • audio_samples
  • saved_path
  • summary
β—„fps24.0β–Ί
β—„filenametv_video_audioβ–Ί
β—„output_diroutput/tensorvizion/videoβ–Ί
β—„formatmp4β–Ί
β—„audio_fittrim_to_videoβ–Ί

The pack's Video Save node produces video - silent video. And its entire Audio category produces audio with nowhere to go. The Video Mux Audio node from TensorVizion/OmniNodes is the bridge that closes that gap: it takes an IMAGE batch and an AUDIO track and combines them into a single file with sound.

The mechanism is pragmatic. It encodes the silent video via imageio (same convention as Video Save), writes the audio to a temporary WAV, and then muxes both into the final container with ffmpeg - which it expects on your PATH. If ffmpeg isn't available, it degrades gracefully: silent video plus a separate .wav file saved side-by-side, rather than failing the queue. Not ideal, but you get your deliverables and a hint.

Inputs and outputs

  • images - the frame batch.
  • audio_samples - an AUDIO input, e.g. from the pack's Audio Mixer, Sidechain Duck, Transient Shaper, or any node that emits the AUDIO type. This is the socket that makes the pack feel like one coherent thing.
  • fps (default 24) - the video stream's playback rate; the audio is muxed at its own native sample rate (no resampling needed for muxing).
  • filename and output_dir - where it lands (default output/tensorvizion/video).
  • format - mp4 or webm (the containers imageio can write; both go through the ffmpeg mux).
  • audio_fit - how to handle length mismatch: trim_to_video (cut audio to match video), pad_video (hold the last video frame to match audio), or as_is (mux at native lengths; most players stop at the shorter stream).

Outputs: saved_path (the file it wrote) and summary. This is an output node, so ComfyUI treats it as a terminal - the queue won't cache past it.

Install

Part of OmniNodes:

cd ComfyUI/custom_nodes
git clone https://github.com/TensorVizion/OmniNodes

Then the dependencies - imageio for the video pass and ffmpeg for the mux:

pip install imageio imageio-ffmpeg

ffmpeg needs to be on PATH (or bundled via imageio-ffmpeg's binary). Install into ComfyUI's Python environment, restart. Under TensorVizion/Video.

Troubleshooting

  • Got a silent video + a .wav instead of one file - ffmpeg isn't reachable. Either install ffmpeg on PATH or rely on imageio-ffmpeg's bundled binary; the summary/behavior makes the fallback obvious.
  • Audio cuts off - that's trim_to_video doing its job when audio is longer than video. Switch to pad_video if you want the whole track.
  • Video freezes at the end - that's pad_video: the last frame holds to match a longer audio track. Expected; it's the price of keeping the full audio.
  • Node missing - restart ComfyUI and check [OmniNodes] in the terminal log.

Reach for it when the deliverable needs sound - the moment the pack's audio tools and video tools finally meet.

CategoryTensorVizion/Video

Inputs (7)

NameTypeDefaultDescription
imagesIMAGEβ€”
audio_samplesAUDIOβ€”
fpsFLOAT24.01–120β€”
filenameSTRINGtv_video_audioβ€”
output_dirSTRINGoutput/tensorvizion/videoβ€”
formatCOMBOmp42 options: mp4, webm
audio_fitCOMBOtrim_to_video3 options: trim_to_video, pad_video, as_is

Outputs (2)

NameTypeDescription
saved_pathSTRINGβ€”
summarySTRINGβ€”