Nodes/ComfyUI-AudioX/AudioX Video Audio Combiner
ComfyUI Node

AudioX Video Audio Combiner

Makes your generated audio actually fit your video — mostly

By lum3on·Created about a year ago·Updated about a year ago· 53
AudioX Video Audio Combiner
  • video
  • audio
  • video
  • synced_audio
  • info
sync_durationtrue
loop_audiofalse

When you generate audio for a video, the two lengths almost never match - your clip is 12 seconds of frames, the generated audio is 10. If you just mux them, you get drift or dead air. AudioX Video Audio Combiner is the pack's answer: it takes your frame batch and your generated AUDIO, and returns them length-matched to each other, so the downstream encode step can mux without sync problems.

The mechanics: it estimates the video's duration from its frame count, then trims, pads with silence, or loops the audio to match. The three behaviors map to the optional toggles:

  • sync_duration (default on) - the master switch for length matching.
  • loop_audio (default off) - if the audio is shorter than the video, loop it instead of padding silence. Great for ambience beds.

Inputs & outputs

  • video - an IMAGE frame batch.
  • audio - an AUDIO (from any AudioX generator or elsewhere).
  • video output - the frames, passed through unchanged.
  • synced_audio - the length-matched AUDIO, ready for a mux/save step.
  • info - a STRING with the frame/duration/sample-rate summary.

And here's the catch you need to see coming: the node assumes your video runs at 8 fps. It's hardcoded - video_fps = 8.0 in the source. That's a reasonable default for frame-based ComfyUI video, but if your clip is 24/30 fps, the "video duration" it computes is wrong and your audio will be cut or padded to the wrong length. Sync is only as correct as that assumption.

Install & troubleshooting

Pack install as usual; no model weights needed:

cd ComfyUI/custom_nodes
git clone https://github.com/lum3on/ComfyUI-StableAudioX.git
cd ComfyUI-StableAudioX
pip install -r requirements.txt

Also worth spelling out because it bites everyone once:

  • It does not mux. You get matched frames and audio out, not a combined video file. The actual muxing happens in your save/encode node (VHS VideoCombine and friends). This node is the "make them fit first" step.
  • The 8 fps assumption. For real-speed footage, don't trust the sync - compute the true duration yourself and set sync_duration off if needed, or fix the frame count.
  • Looping can be abrupt. It splices the audio at the end of the loop with no crossfade, so long loops may click at the seam. The Advanced Volume Control's fade-out is your workaround.

For the classic "generate audio for my silent clip" workflow, this is the glue node - just remember it's matching lengths under a simplifying assumption, not performing magic.

CategoryAudioX/Utils

Inputs (4)

NameTypeDefaultDescription
videoIMAGE
audioAUDIO
sync_durationoptBOOLEANtrueAutomatically sync audio duration to video duration
loop_audiooptBOOLEANfalseLoop audio if shorter than video

Outputs (3)

NameTypeDescription
videoIMAGE
synced_audioAUDIO
infoSTRING