Convert audio
Change an audio file between MP3, WAV, FLAC, Ogg and M4A (AAC). In the browser only, like video-convert (src/tools/video-convert.ts), because mediabunny decodes and encodes through WebCodecs, which Node has no equivalent of. Nothing is uploaded.
Runs on your device. The file is never uploaded.
Convert audio re-encodes into MP3, WAV, FLAC, Ogg or M4A, mp3 by default, keeping the name and swapping the extension. A video track in the input is discarded, leaving sound alone. Quality is ignored for WAV and FLAC, and both the decode and the encode need WebCodecs, which Node lacks, so this one runs on the page.
Questions
What formats can it convert between?
Output is MP3, WAV, FLAC, Ogg or M4A, chosen with the format option, which defaults to mp3. On the way in it reads AAC, Opus, MP3, FLAC, Vorbis and PCM audio. You can also drop a video file: the video track is discarded and only the sound is written, which makes this a way to get audio out in a specific format.
Will converting lose quality?
It depends where you go. WAV and FLAC are lossless, so the quality setting is ignored for them, and a lossless source stays lossless. Any conversion into MP3, Ogg or M4A is a lossy encode, and converting from one lossy format to another stacks a second generation of loss on top of the first. Converting a lossy file to FLAC does not restore anything it already lost.
What does the quality option do?
It picks one of three presets, low, medium or high, with medium as the default, and hands that to the encoder. There is no bitrate field and no sample rate field. For WAV and FLAC it has no effect at all, since those formats carry the samples exactly.
What is my output file called?
Your file name with the new extension: song.wav becomes song.mp3 when the format is mp3. M4A output is an MP4 container holding AAC. The tool works per file, so drop a whole folder and each one comes back separately. A video file works as input too, because the video track is discarded and only the audio is written.
Why does it need a browser?
Because decoding and encoding both run through WebCodecs, which Node has no equivalent of. The command line and MCP surfaces refuse it with "audio-convert needs a browser (OffscreenCanvas). Use it at /video/audio-convert instead." On that page the work happens in a Web Worker and nothing is uploaded.
Why did it say it cannot convert my audio?
Either your browser cannot handle the codec, or the file has no audio track to convert. The error names the format you asked for and the reason the track was discarded, and it reads "no audio track found" when there was nothing to work with. A silent video file gives that second message.