Add Soundtrack
Mix music under a video without touching its audio
- output_video_path
The Add Soundtrack node solves the specific problem of "I have a video with its own audio - narration, ambience, whatever - and I want music underneath it, mixed, without destroying the original sound." It takes a video file and an audio file, applies volume adjustment only to the soundtrack, trims the soundtrack to the video's duration, mixes it with the video's original audio, and outputs a new file. Your original audio stays untouched; the music just appears beneath it.
That's the distinction that matters versus the pack's Merge Video + Audio node: that one replaces the audio track, this one mixes underneath. If your video is silent and you just want music as the track, use the merge node. If your video already has sound you want to keep, this is the one.
How it works
The node validates both files, probes the video duration, then runs ffmpeg with three filters in sequence: atrim cuts the soundtrack to exactly the video's length, volume applies your volume_db adjustment (it supports values down to −100 dB, which is effectively silence - useful when you want the "soundtrack present but barely there" bed), and amix combines the adjusted soundtrack with the video's original audio using the longest duration and no dropout transition. The result is re-encoded to MP4 with the mixed audio, and the output lands in ComfyUI's output directory with an auto-generated name like original_name_with_soundtrack.mp4 (incrementing numbers avoid overwrites).
The important audio decision is volume_db, which defaults to −20 dB. That's a sensible "music bed" level for most music - clearly present, never overpowering dialogue. You'll rarely want to push it much above −10 dB unless the video has no voice.
Inputs and output
video_path- the video with audio to keep.audio_path- the soundtrack file.volume_db- soundtrack volume adjustment, default −20, min −100.delete_original- delete the source video after success (leave false).output_path- optional custom output path (default: auto-generated).
Output is output_video_path, the finished file.
Installing it
Ships with the Simple Video Effects pack:
cd ComfyUI/custom_nodes
git clone https://github.com/scofano/ComfyUI-Simple-video-effects
cd ComfyUI-Simple-video-effects
pip install -r requirements.txt
Restart ComfyUI, or install via ComfyUI Manager (search "Simple Video Effects"). No models. ffmpeg/ffprobe on PATH required, as with all the file-based nodes here.
Common issues
The usual ffmpeg-on-PATH requirement, and the volume math: −20 dB is quieter than you think (it's a 10x reduction in amplitude), so don't panic if the first mix sounds subtle - that's the intended "bed" level, and you can lift it to −10 or so if the music needs to be more present. If the output has no music at all, check the audio file isn't silent or a format ffmpeg can't decode. And delete_original is destructive - if it's on and the run succeeds, your source video is gone.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| video_path | STRING | — | |
| audio_path | STRING | — | |
| volume_db | FLOAT | -20 | — |
| delete_original | BOOLEAN | false | — |
| output_pathopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output_video_path | STRING | — |