Audio Resample + Convert
Resample to 48k and pick your channel layout in one step
- audio
- audio
- output_path
- duration_sec
- summary
Video pipelines have a hard rule: audio goes to 48 kHz for picture work. Music models often hand you 44.1 kHz, TTS sometimes delivers 24 kHz, and if you mux a 44.1 kHz track onto a 48 kHz video without converting, the playback is subtly wrong - drift, pitch artifacts, and player hiccups. MKRAudioResampleConvert is the node that fixes both the sample rate and the channel layout at once, so your audio lands in the shape your delivery target expects.
It's a Utility in the MKRShift_Nodes audio set - the boring-but-essential setup step you run before muxing with MKRMuxVideoAudio or MKRPresaveAudio. Think of it as the audio equivalent of "resize to target resolution" in a video chain: you do it once, early, and everything downstream assumes the standard.
How it works
The node decodes the input waveform and, if you set a target_sample_rate, resamples it. With ffmpeg available the resample goes through aresample; otherwise it falls back to numpy linear interpolation (works fine, slightly less clean on big rate changes like 44.1k→192k). Channel conversion is pure numpy:
keep- leave channels as-is.mono- average down to one channel (the standard downmix).stereo- duplicate mono to both channels, or take the first two channels if the source has more.
Order of operations matters and is handled for you: resample first, then channel conversion, so you never resample after a downmix.
Inputs that matter
audio-MKR_AUDIOpayload, waveform tensor, or file path.target_sample_rate- 8000 to 192000, default 48000. 48k for video, 44.1k for music delivery, 16k if you're feeding it to a speech model later.target_channels- keep/mono/stereo. Pickstereoif the mux target expects a stereo track.- Standard save block:
output_format(autokeeps the source container - note this changes the container, not the rate),filename_prefix,subfolder,overwrite, optionalfilename_label.
Outputs: audio (MKR_AUDIO), output_path, duration_sec, summary (includes the resulting sample rate and channel count so you can verify).
Install
ComfyUI Manager (search "MKRShift Nodes"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes
Restart. No models. ffmpeg is recommended for quality resampling and for non-WAV output, but the numpy fallback keeps the node usable without it.
Common issues
The trap is confusing output_format with target_sample_rate: setting output_format to mp3 re-encodes but does not resample - those are separate knobs, and mp3 at 44.1k stays 44.1k unless you also set the rate. Second, downsampling to mono averages channels, so if one channel is broken or silent, your mono mix inherits that - fix channels first with MKRAudioChannelRouter, then convert. And upsampling (say 24k→48k) never adds information - it just fills in the gaps, so don't expect a "better" voice from the higher rate.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | * | — | |
| target_sample_rate | INT | 480008000–192000 | — |
| target_channels | COMBO | keep | 3 options: keep, mono, stereo |
| output_format | COMBO | auto | 5 options: auto, wav, mp3, flac, ogg |
| filename_prefix | STRING | MKR_audio_resample | — |
| subfolder | STRING | — | |
| overwrite | BOOLEAN | false | — |
| filename_labelopt | STRING | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| audio | MKR_AUDIO | — |
| output_path | STRING | — |
| duration_sec | FLOAT | — |
| summary | STRING | — |