How the file becomes an MP3
Press Convert to MP3 and the page reads the file with the File API. A 16-bit PCM WAV is parsed in this page, which keeps the sample rate stored in the fmt chunk. FLAC, Ogg Vorbis, Ogg Opus, AAC in an M4A, an existing MP3, and any other WAV encoding go through BaseAudioContext.decodeAudioData. MDN documents that call as the way to turn a complete audio file in an ArrayBuffer into linear PCM, resampled to the audio context rate. This page decodes those files with an OfflineAudioContext at 44.1 kHz. 44.1 kHz is one of the three MPEG-1 rates (32, 44.1, and 48 kHz) named in ISO/IEC 11172-3. If the browser returns 32 or 48 kHz instead, that rate is kept. Any other rate is resampled to 44.1 kHz with an OfflineAudioContext before encoding.
PCM then goes to a Web Worker that loads on the first conversion, not with the rest of the page. The worker runs @breezystack/lamejs, an ES-module port of LAME. LAME is the LGPL Layer III encoder: it writes MPEG-1, MPEG-2, and MPEG-2.5, in constant or variable bitrate. The three buttons here are constant bitrate only. More than two channels are folded to stereo with the Web Audio speaker down-mix. Four channels use the quad formula and six channels use the 5.1 formula, which leaves out the LFE channel. Any other count keeps the front left and front right and mixes the extra channels into both at half gain. If that sum peaks above full scale, the pair is scaled so the peak is 1.0.
128, 192, and 320 kbps
Those three numbers are slots in the MPEG-1 Audio Layer III bitrate table: index 9, index 11, and index 14. The fourteen listed rates are 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, and 320 kbps. 320 kbps is the top of that list. 128 kbps is the speech and voice-note setting. 192 kbps is the default on this page. They are not LAME variable-bitrate quality steps such as V0 or V2.
At 44.1 kHz, a 320 kbps frame is slightly larger than the MPEG-1 frame-size limit. That limit matches a 48 kHz frame at 320 kbps. The Wikipedia MP3 article records the mismatch and notes that players still play the files, and that decoders are only required to handle streams up to 320 kbps. This page still offers 320 kbps, because it is the highest listed rate.
Which files open
WAV, FLAC, Ogg (Vorbis or Opus), M4A/AAC, and an existing MP3 can be encoded when the decoder accepts them. Chrome and Firefox cover that set. Safari covers WAV, MP3, AAC in M4A, and FLAC, and often refuses Ogg. A failed decode is written on that row. The page does not offer an empty download in its place.
Video is refused. Extensions such as mp4, mov, mkv, and webm are turned away, and so is any file whose MIME type starts with video/. This page does not extract a soundtrack. An audio-only MP4 can be renamed to .m4a and tried again.
Each file has to be 100 MB or smaller and 30 minutes or shorter. A longer decode would keep a large PCM buffer in the tab. A batch runs one file at a time for the same reason.
What stays on the device
The bytes stay in the tab. There is no upload to CalcBadger and no account. Closing the tab drops the decoded PCM and the MP3s, apart from files already saved. The encoder script is loaded from this site the way the rest of the page is. The audio is not sent with it.
How to use this tool
Drop files on the panel, or choose them. Pick 128, 192, or 320. Press Convert to MP3. Each row moves from decoding to encoding. Download one file, or download every finished MP3 as a zip. The zip stores the MP3 bytes without compressing them again. Change the bitrate and press Convert to MP3 again to re-encode. Two sources that would both download as track.mp3 are named track.mp3 and track-2.mp3.