How the Audio Trimmer Works
AnyTool trims audio entirely in the browser. The file is decoded once with the Web Audio API (decodeAudioData) to draw a peak waveform on a canvas and to loop-preview the exact start–end selection through an AudioBufferSourceNode at zero encoding cost. When the output format matches the input and no fade is applied, a self-hosted single-threaded ffmpeg.wasm engine (bundled core, no CDN) runs an input-seek stream-copy (-ss before -i, -t duration, -c:a copy) that cuts losslessly in well under a second; adding a fade, normalize, or a format change triggers a clean re-encode to MP3 (libmp3lame), WAV (pcm_s16le), M4A (AAC, +faststart), OGG (libvorbis) or FLAC. Keep-selection and remove-selection (delete the middle and rejoin) modes are supported, plus a one-tap iPhone ringtone preset that writes an AAC .m4r clamped to 40 seconds.
- Runs client-side — the audio is never uploaded
- Self-hosted ffmpeg core (bundled) — no CDN
- Lossless same-format stream-copy with correct input-seek
- Re-encode for fades, normalize or format change
- Keep or remove selection; MP3/WAV/M4A/OGG/FLAC + M4R output
- Instant Web Audio loop preview of the exact cut
