凤希AI - 多音频合并
Glue every segment back into one soundtrack with a single ffmpeg call
- 合并音频
The whole segmented-video philosophy is generate-in-chunks, stitch-at-the-end - and audio is the part people forget to stitch. FxAiAudioMerge (凤希AI - 多音频合并) is the end of that road for sound: point it at a folder of segment audio files and it concatenates them into one AUDIO, resampled and re-channeled to whatever you ask for. This is your final-mix node, the thing that turns a folder of 000_seg1.wav-style pieces back into a single soundtrack for the finished video.
How it works
It lists every audio file in 文件夹路径 (folder path), writes them to an ffmpeg concat list, and runs a single ffmpeg command:
ffmpeg -f concat -safe 0 -i list.txt -ar <采样率> -ac <声道> -c:a pcm_s16le out.wav
Concatenation is the ffmpeg concat demuxer doing a raw sample-level splice - no crossfades, no silence trimming, no EQ. What you get is exactly your segments, back to back, in filename order. If the folder is missing or empty, it doesn't throw: it returns a silent audio buffer at your requested sample rate and channel count, and logs a clear "directory not found" line. That graceful failure is deliberate - a merge node failing mid-pipeline is worse than returning a few seconds of quiet.
Inputs
文件夹路径(folder path) - where the segments live.目标采样率(target sample rate) - int, default 44100, range 8000–96000. Set it to whatever your final video container wants; 44100 is the safe default.目标声道(target channels) - 1 or 2, default 2.
The output is one 合并音频 (merged audio) AUDIO, ready to mux onto your finished video.
Install
One node in fxai-toolkit (凤希全能节点包), the Chinese MIT-licensed suite by 凤希AI built for segmented low-VRAM video generation. ComfyUI Manager (search "fxai") or:
cd ComfyUI/custom_nodes
git clone https://github.com/fxai666/fxai-toolkit
# restart ComfyUI
This node is a straight shell-out to ffmpeg, so ffmpeg must be installed and on PATH - it's the single most likely node in the pack to hit "ffmpeg not found" if your install is incomplete. The pack auto-installs soundfile and psutil; no model files needed.
Gotchas
- Order = filename order, period. If your segments are named
seg10.wavandseg2.wav, you get 10 before 2. Name them with zero-padded indices (000_,001_...010_) - the same convention the pack'sFxAiAudioManageruses when it saves. - No crossfade. If your segments have room-tone or reverb tails, the seams will be audible. For smooth joints, generate your segments with overlap (the
过渡帧logic upstream) and accept the seam, or fix it in a real editor afterward. - It merges, it doesn't mix. Two segments that should play simultaneously aren't handled here - this is strict serial concatenation, which is right for "one soundtrack after another" workflows like voice-over-per-scene.
- On a merge failure you get silence, not an exception. If your final video has quiet audio, check the console for the "merge failed" line before debugging anything else.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| 文件夹路径 | STRING | — | |
| 目标采样率 | INT | 441008000–96000 | — |
| 目标声道 | INT | 21–2 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| 合并音频 | AUDIO | — |