audio.convert
Re-encode audio to another format at a chosen bitrate. It's the whole audio surface today — one node, two fields, one decode and encode.
Config
| Field | Type | Default | Notes |
|---|---|---|---|
format | mp3 · m4a · opus · flac · wav | mp3 | Output format. Narrower than what can be read — AIFF, WMA, AMR and the rest decode fine as inputs. |
bitrate | number 8–320 (kbps) | 192 | Ignored by flac and wav, which are lossless. Out-of-range values are clamped. |
Choosing a format
mp3— plays everywhere. The safe default for anything you hand to a browser or a podcast host.m4a— AAC. Better than MP3 at the same bitrate.opus— best-in-class below ~128 kbps. Reach for it on speech and low-bandwidth delivery.flac— lossless, compressed. Archival, or a master to encode from later.wav— lossless, uncompressed. Large, and universally readable by tooling.
Each format has exactly one encoder. Vorbis is deliberately absent: asking for it would mean a different codec depending on which machine ran the job.
Cover art travels inside an audio file as a video stream, and carrying it between containers is a common way to fail an encode for a reason that has nothing to do with the audio — so it is dropped.
m4a outputs are written with their index at the front (faststart), so a player can start before the whole file arrives.In a pipeline
{
id: 'convert',
type: 'audio.convert',
config: {
format: { value: 'opus' },
bitrate: { value: 96 },
},
}With runQueue
tk.runQueue(files, 'audio')
.convert({ format: 'mp3', bitrate: 192 })
.options({ poll: { timeoutMs: 600_000 } }); // long files outlast the 120s default waitThere is no audio resize — a branch with no audio.convert passes the source through untouched, which costs an output and a credit for a copy of what you uploaded. Two converts in one branch and the last wins: a format is a single property of the encode.
Every output is a job and a credit, the same as pipeline.output describes.