Nodes/ComfyUI-JNodes/Audio Input Options (For Video Output)
ComfyUI Node

Audio Input Options (For Video Output)

Attach and trim a soundtrack for video output

By JaredTherriault·Created 3 years ago·Updated about a month ago· 91
Audio Input Options (For Video Output)
  • audio
  • AUDIO_INPUT_OPTIONS
audio_input_path/path/
clip_audiofalse
audio_clip_start_seconds0.00
audio_clip_duration0.00

This is a small helper node that does one job: it packages up "here's the audio, and here's how to trim it" into a single bundle that JNodes' video nodes know how to consume. On its own it produces nothing you can watch or hear - it outputs an AUDIO_INPUT_OPTIONS object that you plug into a node like Join Videos In Directory to mux a soundtrack onto the finished video. If you're adding music or narration to generated video, this is the node that tells the exporter what to add and which slice of it to use.

You reach for it whenever a silent video isn't the deliverable. Generated clips come out mute; real output usually wants sound. Rather than bolt audio handling onto every video node, JNodes factors it out into this one bundle so the video nodes stay clean and you configure audio in one place.

How it works

You give it either a path to an audio file or an AUDIO input coming from another node, plus optional trim settings. It rolls those into the AUDIO_INPUT_OPTIONS output. The consuming video node then knows to attach that audio when it writes the final file - and, if you asked for trimming, to use only the specified window. Nothing is rendered here; it's a configuration object, deliberately, so the same audio settings can be reused across whatever video node needs them.

The inputs and outputs that matter

  • audio_input_path - a path to an audio file to use (default is the /path/ placeholder, so set a real one if you go this route).
  • audio (optional) - an AUDIO input from elsewhere in the graph, for when your audio is already loaded as a node output rather than sitting on disk.
  • clip_audio - off by default. Turn it on to trim the audio to a window instead of using the whole track.
  • audio_clip_start_seconds - where the trimmed window begins, in seconds. Only meaningful when clip_audio is on.
  • audio_clip_duration - how long the trimmed window runs, in seconds. Again, paired with clip_audio.

The single output is AUDIO_INPUT_OPTIONS - wire it into the audio_input_options slot of a JNodes video node such as Join Videos In Directory.

How to install it

ComfyUI Manager, search JNodes, install, restart. Or:

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

Install the requirements - audio/video handling relies on the pack's dependencies and a working ffmpeg.

Common issues & troubleshooting

No audio on the output. Two usual causes: the AUDIO_INPUT_OPTIONS output isn't actually wired into the video node's audio_input_options input, or the audio_input_path still has the placeholder in it. Give it a real source and connect the bundle.

Trim settings ignored. audio_clip_start_seconds and audio_clip_duration do nothing unless clip_audio is on. Flip that boolean first.

Audio and video lengths don't match. This node doesn't stretch or loop audio to fit the video. If the track is shorter than the clip you'll get silence at the tail; longer, and it gets cut off (or trim it deliberately with the clip options). Match durations upstream if sync matters.

File path on a cloud runner. If you're using audio_input_path on an ephemeral/serverless ComfyUI, make sure the audio file actually exists at that path in the job's filesystem - otherwise feed audio through the audio input from a loader node instead.

Categorysd

Inputs (5)

NameTypeDefaultDescription
audio_input_pathSTRING/path/
clip_audioBOOLEANfalse
audio_clip_start_secondsFLOAT0.000–3.402823466e+38
audio_clip_durationFLOAT0.000–3.402823466e+38
audiooptAUDIO

Outputs (1)

NameTypeDescription
AUDIO_INPUT_OPTIONSAUDIO_INPUT_OPTIONS