How the Audio Compressor Works
AnyTool compresses audio entirely in the browser with a self-hosted single-threaded ffmpeg.wasm engine (bundled core, no CDN). On load it decodes the file with the Web Audio API for duration, sample rate and channels and probes the source codec and bitrate. In manual mode you pick the format, bitrate (CBR or VBR), sample rate and channels; in target-size mode you enter an MB target or a percentage and the bitrate is back-solved from the duration (kbps ≈ targetBytes × 8 ÷ seconds, with headroom and a 32–320 clamp). A live estimate recomputes the predicted size and savings on every change with no encoding, and warns in red if a setting would grow the file. Output is MP3 (libmp3lame), M4A (AAC, +faststart), OGG (libvorbis), FLAC or WAV.
- Runs client-side — the audio is never uploaded
- Self-hosted ffmpeg core (bundled) — no CDN
- Target-MB / percentage mode that back-solves the bitrate
- Live predicted-size + savings estimate with anti-inflation guard
- Manual bitrate, sample-rate and channel control
- Export MP3/M4A/OGG/FLAC/WAV
