Nodes/comfyui_media_toolbox/Save Audio (Platform Export)
ComfyUI Node

Save Audio (Platform Export)

Four formats in one run, plus a Chinese streaming spec sheet

By jesse890423·Created 17 days ago·Updated 8 days ago· 1
Save Audio (Platform Export)
  • 音频
  • report
  • audio
◄文件名前缀audio/ComfyUI►
◄导出WAVtrue►
◄WAV位深Auto (follow source)►
◄导出MP3true►
◄MP3码率Auto (follow source)►
◄导出OPUSfalse►
◄OPUS码率Auto (follow source)►
◄保留FLACtrue►
◄采样率Auto (follow source)►
◄声道Auto (follow source)►
◄平台预设Soda Music►
◄平台名称Soda Music►
◄合格格式wav,mp3►
◄最低采样率44100►
◄最低位深16►
◄最低码率kbps320►
◄要求声道Stereo►
◄文件大小上限MB200►
◄报告语言Follow UI language►

You can generate a perfectly good track in ComfyUI and still be stuck, because the thing you generated is a tensor in a graph and the thing you need to upload is a 320 kbps MP3 that's exactly 44.1 kHz stereo and under 200 MB. This node does the second half of that sentence: one run, WAV + MP3 + OPUS + FLAC, with a report telling you whether the result would actually clear a platform's requirements.

Why bother, in the wider workflow

Audio in ComfyUI is a thin, bolted-on layer - the models are real, the delivery plumbing mostly isn't. Music from ACE-Step, foley from MMAudio, a voice from a TTS suite: whatever produced it, it lands in the graph as an AUDIO dictionary, and then you're on your own for turning that into files. Core Save Audio writes one file. This one writes the set, which matters because the same track usually wants a lossless master (WAV or FLAC), a lossy copy for streaming (MP3), and sometimes a small one (OPUS) - and doing that as three separate runs three separate times is how you end up with mismatched encodes of "the same" audio.

How it works

The node takes the waveform straight out of the graph and pipes raw 32-bit float PCM into ffmpeg on stdin, then asks ffmpeg for every selected target format inside a single invocation. That's why ticking four formats isn't four times slower - it's one pass, several outputs, all sharing the _00001 counter in the filename so the files group together in output/audio/.

Two behaviours make it pleasant. First, "Auto" genuinely follows the source: a 44.1 kHz/16-bit stereo source exports 44.1 kHz/16-bit stereo, and MP3 bitrate auto-selects 320 kbps for a lossless source and never exceeds the bitrate of an already-lossy one (it picks the highest offered step below whatever the source was). Second, if the target format matches the source format and every parameter is on Auto, the node copies the file instead of re-encoding it. The report flags those lines [copy]. Loading with Load Audio (Advanced) is what enables this - that loader attaches the probed source parameters to the AUDIO, and without them there's nothing to compare against.

The settings that matter

文件名前缀 is a relative path inside output, so audio/master lands as output/audio/master_00001.wav. Absolute paths and .. get rejected. Then the four toggles (导出WAV, 导出MP3, 导出OPUS, 保留FLAC - WAV and MP3 on by default, FLAC on, OPUS off), and 平台预设.

The presets are the pack's signature feature and the reason it exists at all: Soda Music, QQ Music, NetEase Cloud Music, Kugou, Douyin all check for 44.1 kHz minimum, 16-bit minimum, 320 kbps minimum, stereo, 200 MB cap. Kuaishou wants 192 kbps. Bilibili accepts wav,flac,mp3. The report gives you a line per export with [OK] or [FAIL] and the specific miss ("bitrate below 320"), ending in a verdict.

Two honest caveats about that. These are the author's encoding of published submission requirements, not a live API check - specs move, so verify against the platform's current page before a real upload. And the manual fields - 平台名称, 合格格式, 最低采样率, 最低位深, 最低码率kbps, 要求声道, 文件大小上限MB - only take effect when 平台预设 is set to Custom. Pick "Soda Music", change 最低码率kbps to 192, and nothing happens: the preset's numbers win and your edit is silently ignored. That trips people up constantly.

Outputs are report (a STRING with the whole compliance breakdown) and audio (the same AUDIO, passed through so you can keep chaining). The node is a terminal node, so it runs when you queue even with nothing downstream.

Install

Manager → search comfyui_media_toolbox. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/jesse890423/comfyui_media_toolbox.git

ffmpeg is not optional here - this node is nothing but an ffmpeg wrapper. requirements.txt pulls in imageio-ffmpeg (static binary), and the node looks for a binary in this order: FFMPEG_BINARY, IMAGEIO_FFMPEG_EXE, imageio-ffmpeg's bundled copy, then PATH. Verify:

python -c "import imageio_ffmpeg; print(imageio_ffmpeg.get_ffmpeg_exe())"

Windows portable users run that through python_embeded\python.exe, and any pip install has to go into that same environment. This is the single most common way people break a working ComfyUI: installing into a system Python and then wondering why the node still can't find ffmpeg.

When it fails

"Select at least one output format." Everything unticked. The node refuses rather than writing nothing.

A [FAIL] you don't understand. Read the trailing note - it names the failing requirement. Usually it's a mono source exported to a stereo-required preset, or a 44.1 kHz source with 采样率 forced to 48 kHz.

OPUS says 48 kHz when your source was 44.1. Opus only accepts 8/12/16/24/48 kHz, so the node snaps upward. That's the format, not a bug.

MP3 sounds worse than the source. If you picked 320 kbps on an already-lossy 128 kbps source you asked for an upscale, which adds nothing but bytes. Leave it on Auto - it clamps to the source bitrate on purpose. And V0 (highest quality) is variable bitrate, which is the better choice when size isn't the constraint.

"ffmpeg was not found" with everything else looking right means the binary is in a different Python environment than ComfyUI's.

CategoryAudio

Inputs (20)

NameTypeDefaultDescription
音频AUDIOThe AUDIO input of any audio output node.
文件名前缀STRINGaudio/ComfyUIA relative path inside the ComfyUI output directory. Absolute paths are rejected.
导出WAVBOOLEANtrue—
WAV位深COMBOAuto (follow source)WAV sample bit depth. "Auto" follows the source bit depth (16-bit if unknown).
导出MP3BOOLEANtrue—
MP3码率COMBOAuto (follow source)MP3 bitrate. "Auto" uses 320 kbps for lossless sources and never exceeds a lossy source's bitrate; "V0" is variable-bitrate highest quality.
导出OPUSBOOLEANfalse—
OPUS码率COMBOAuto (follow source)OPUS bitrate. "Auto" uses 192 kbps for lossless sources and never exceeds a lossy source's bitrate.
保留FLACBOOLEANtrue—
采样率COMBOAuto (follow source)Sample rate. "Auto" follows the source sample rate.
声道COMBOAuto (follow source)Channel count. "Auto" follows the source channel count.
平台预设COMBOSoda Music9 options: Soda Music, QQ Music, NetEase Cloud Music, Kugou Music, Douyin, Kuaishou, +3
平台名称STRINGSoda Music—
合格格式STRINGwav,mp3—
最低采样率INT441008000–192000Minimum sample rate required by the platform (Hz).
最低位深INT168–32Minimum bit depth required by the platform (bit); applies to WAV only.
最低码率kbpsINT3200–1000Minimum bitrate required by the platform (kbps); applies to MP3 / OPUS only.
要求声道COMBOStereoChannel count required by the platform.
文件大小上限MBINT2001–4096Maximum size of a single audio file (MB). Anything larger is treated as non-compliant.
报告语言COMBOFollow UI languageLanguage of the compliance report. "Follow UI language" produces a Chinese report while the ComfyUI interface is Chinese, and an English report otherwise.

Outputs (2)

NameTypeDescription
reportSTRING—
audioAUDIO—