Convert MP4 to MP3 or WAV locally right now
Choose MP3 (128/192/256/320 kbps) or 16-bit PCM WAV. Your video stays in browser memory and is never uploaded.
Direct answer: You can convert an MP4, MOV, or WebM video to MP3 directly in a modern browser without uploading the file: AudioContext.decodeAudioData() decodes the soundtrack into in-memory PCM samples, and a client-side encoder (lamejs) writes a standard 128–320 kbps MP3 (~87.5% smaller at 192 kbps than 16-bit stereo WAV), with MediaRecorder WebM/M4A as a playback fallback.
Moving audio out of a video is not a single container rename. A video file combines an outer container, a video stream, an audio codec, and timing metadata. Understanding how browsers decode and encode those layers helps you pick the right output format—whether you need a compact MP3 for commuting or an uncompressed WAV for Premiere, DaVinci Resolve, or Audacity.
Measured Local Benchmark: MP3 Bitrates vs. 16-bit PCM WAV
To show exact byte differences rather than rough rules of thumb, we ran a 10.0-second, 48,000 Hz, 2-channel stereo audio buffer through ToolKnit’s local Video to Audio & MP4 to MP3 Converter across every output option:
| Export Option | Exact Output Size | Size vs. PCM WAV | Best Practical Use Case |
|---|---|---|---|
| 16-bit PCM WAV (1,536 kbps) | 1,920,044 bytes (1.83 MB) | Baseline (0%) | Timeline video editing, DAW stem cutting, zero generation loss after decode |
| MP3 320 kbps (CBR) | 401,280 bytes (391.9 KB) | −79.1% | Music performances, concert clips, and high-detail stereo mixes |
| MP3 256 kbps (CBR) | 321,024 bytes (313.5 KB) | −83.3% | Mixed music-and-dialogue videos, interviews with background score |
| MP3 192 kbps (Default) | 240,768 bytes (235.1 KB) | −87.5% | Everyday MP4-to-MP3 conversion, podcasts, screen recordings, mobile players |
| MP3 128 kbps (CBR) | 160,512 bytes (156.8 KB) | −91.6% | Long voice lectures, meeting recordings, and strict email attachment caps |
WebM / M4A Fallback (MediaRecorder) |
Varies by browser codec | Real-time stream | Fallback when a playable clip cannot be decoded directly via Web Audio API |
Four Layers Behind Every Video File
It helps to separate four ideas that are often grouped together under a single file extension:
- Container — The outer wrapper, such as
.mp4,.mov,.m4v, or.webm. - Video codec — How picture frames are compressed (H.264/AVC, HEVC/H.265, VP9, AV1).
- Audio codec — How the soundtrack is stored inside the container (AAC, Opus, MP3, PCM, or AC-3).
- Browser media pipeline — Which demuxers, Web Audio decoders, and
MediaRecorderencoders your OS and browser expose locally.
Two .mp4 files can behave differently if one carries standard stereo AAC audio and the other carries multichannel AC-3/E-AC-3 from a broadcast recorder.
Path One: Direct Web Audio Decode to MP3 or PCM WAV
The primary path reads the selected video into an ArrayBuffer and calls AudioContext.decodeAudioData() to decode the audio track into floating-point PCM channels inside an AudioBuffer.
Cached AudioBuffer for instant bitrate switching
Once a clip decodes into an AudioBuffer, ToolKnit caches that decoded buffer in tab memory for the active file. If you export a 192 kbps MP3 first and then decide you also want a 320 kbps MP3 or a 16-bit PCM WAV master, switching formats re-encodes directly from the cached buffer without reading and decoding the entire video file a second time.
How MP3 and 16-bit PCM WAV are built
For MP3 output, floating-point channel samples are clamped and scaled to signed 16-bit integers, encoded in chunks via lamejs at your chosen constant bitrate (128, 192, 256, or 320 kbps), and assembled into an audio/mpeg download with inline browser preview. Note that if you have a mono voice recording or already exported a WAV file, you can also inspect or transcode standalone audio with WAV to MP3 or MP3 to WAV.
For 16-bit PCM WAV output, the encoder writes a standard 44-byte RIFF/WAVE header followed by interleaved 16-bit little-endian samples across all decoded channels. Neither MP3 nor WAV is a lossless stream-copy demux of the original compressed AAC/Opus packets—and choosing 320 kbps MP3 or WAV cannot recover high-frequency detail that was already discarded in a heavily compressed source video.
Path Two: Real-Time MediaRecorder Fallback (WebM / M4A)
Some browser and codec combinations can play a local video element smoothly even when decodeAudioData() rejects the container or exceeds buffer limits. When direct decoding fails, ToolKnit routes the playing HTML5 video element through MediaElementAudioSourceNode and MediaStreamAudioDestinationNode into MediaRecorder.
Because MediaRecorder captures the live playback graph, this fallback runs in real time alongside video duration and outputs browser-native WebM audio or M4A audio rather than MP3 or PCM WAV. The status badge always labels which exact format was produced before you save the file.
Memory Limits, Large Videos, and Privacy
Decoding an hour-long stereo video into uncompressed 32-bit float PCM inside browser RAM requires hundreds of megabytes of contiguous memory. Short and medium clips (such as music videos, social clips, and 5–30 minute talks) decode in seconds on modern laptops and phones, whereas multi-gigabyte feature recordings may hit browser tab memory limits—if you also need to shrink the video file itself first, check Compress Video, or analyze musical tempo afterwards with BPM Detector.
Throughout both paths, your selected video file stays on your device and is never uploaded to ToolKnit’s servers.
Frequently Asked Questions
Can I convert MP4 to MP3 directly in my browser without uploading?
Yes. When your browser decodes the local video's audio track via Web Audio API, ToolKnit encodes standard MP3 audio (128, 192, 256, or 320 kbps) or 16-bit PCM WAV directly in memory without uploading the video to a server.
Which MP3 bitrate should I choose vs. 16-bit PCM WAV?
Choose 192 kbps MP3 for everyday lectures, podcasts, and mobile playback (roughly 87.5% smaller than stereo 48 kHz WAV), 256–320 kbps MP3 for music tracks, or 16-bit PCM WAV when importing uncompressed audio into a timeline editor or DAW.
Why does a video sometimes fall back to WebM or M4A recording instead of MP3 or WAV?
MP3 and PCM WAV require AudioContext.decodeAudioData() to decode the audio stream in memory. If a container or codec plays in HTML5 video but resists direct buffer decoding, the tool falls back to MediaRecorder and saves real-time WebM or M4A audio.
Is the exported MP3 or WAV an untouched byte copy of the original audio stream?
No. Browser extraction decodes the source audio into PCM samples first, then encodes a fresh MP3 or 16-bit WAV file (or records playback on the fallback path). Re-encoding at 320 kbps or WAV does not restore detail already lost in a low-bitrate source.
Extract MP3 or WAV from your local video
Pick 128–320 kbps MP3 or 16-bit PCM WAV, preview inline, and save locally with zero server upload.