Converting audio in the browser: bitrates, sample rates and when lossless matters

6 min read
audio
ffmpeg
conversion

Most "convert audio" services do the same thing: upload your file to a server, run ffmpeg on it, hand you a link and keep a copy for a while. The interesting part is that the same ffmpeg can now run inside a browser tab as WebAssembly, so the file never leaves your machine. That changes the tradeoffs — and it makes the settings you choose matter more, because there is no server-side preset quietly fixing your mistakes.

Pick the container for the destination, not for habit

  • **MP3** — plays everywhere, including a decade of car stereos and cheap hardware. Use it when compatibility beats everything.
  • **M4A (AAC)** — better quality than MP3 at the same bitrate, the default across Apple devices and most streaming pipelines.
  • **OGG Vorbis** — patent-free and small; good for games, web apps and anything you ship yourself.
  • **WAV** — uncompressed PCM. Big, but perfect for intermediate steps, editing and mastering.
  • **FLAC** — lossless with roughly half the size of WAV. Ideal for archives and for handing masters to someone else.

Bitrate rules of thumb

For spoken word — podcasts, voiceovers, interviews — 96 to 128 kbps mono is transparent enough that listeners will never notice. For music, 192 kbps is the point where most people stop hearing artefacts on consumer headphones, and 256 to 320 kbps is the safe ceiling. Going above that on a lossy codec just makes the file bigger.

One rule that saves grief: never re-encode a lossy file repeatedly. Each MP3 → MP3 pass discards more detail. If you plan several editing rounds, convert to WAV first, do the work, then encode once at the end.

Sample rate and channels

44,100 Hz is the CD standard and the right default for music. 48,000 Hz is the video standard — match it if the audio will be muxed back into a video, otherwise a resample happens anyway. Dropping to 22,050 Hz is only reasonable for speech where size dominates.

Converting a mono recording to stereo doubles the file size and adds nothing. If your source is a single microphone, keep it mono.

Loudness normalisation, briefly

Peak normalisation makes the loudest sample hit 0 dBFS, which says nothing about perceived loudness. EBU R128 loudness normalisation measures the whole programme and targets a LUFS value instead. Around -16 LUFS is a common target for podcasts and web video; streaming platforms normalise to their own targets anyway, so exporting far louder just costs you dynamic range.

What the browser version does

Our [Audio Converter](/tools/video/audio-converter) loads the ffmpeg WebAssembly core once — about 32 MB, then cached — writes your file into a virtual filesystem, runs the same command line you would type locally, and hands back a Blob:

ffmpeg -i input.wav -vn -af loudnorm=I=-16:TP=-1.5:LRA=11 -ar 44100 -c:a libmp3lame -b:a 192k output.mp3

Batch conversion is just that loop repeated per file. Because everything runs locally, large files are limited by your RAM rather than an upload cap, and nothing is stored anywhere after you close the tab.

A workflow that holds up

1. Trim the dead air first with the [Audio Trimmer](/tools/video/audio-trimmer-cutter) while the source is still lossless. 2. Join the parts with the [Audio Merger](/tools/video/audio-merger-joiner) if the recording came in segments. 3. Normalise and encode once, at the end, to the format your destination actually wants.

Do it in that order and one encode is all you ever need.

Tools from this article

← All articles