Bhinish Dhiman

How to extract the audio from a video as an MP3, without uploading it

Drop the video in, check the length and the memory figure, pick a bitrate (192 kbps is the default), press Extract the MP3 and download. Decoding uses the browser's own audio pipeline, so it works even in Firefox on Android. Files over about 13 minutes are refused: decoded audio at 48 kHz stereo takes 384,000 bytes a second, and the ceiling is 300 MB. The MP3 is a re-encode, so some loss is unavoidable.

People want the sound from a video for ordinary reasons: a talk to listen to on a walk, a voice memo that was recorded as a clip, a song from a phone video for a car stereo that plays nothing newer than MP3. The file is often personal, and sending it to a converter’s server is the step people would rather skip. Here the soundtrack is decoded and encoded in the tab.

Two terms

Audio extraction is decoding a video file’s soundtrack and re-encoding it as a standalone audio file. The decoding half uses the browser’s built-in audio pipeline. The encoding half needs an MP3 encoder, which no browser includes, so the page downloads one.

Second-generation loss is the extra damage done when audio that was already compressed with a lossy codec is decoded and compressed again with a different one. The soundtrack in a video is nearly always AAC already, so an MP3 made from it carries the artefacts of both. A higher bitrate hides that; no bitrate undoes it.

Extracting an MP3, step by step

  1. Open Video to MP3 and drop the video on the panel, or click the panel to choose it. MP4, MOV, WebM and MKV are accepted.
  2. Read the three figures that appear: Length, MP3 out (an estimate of the file you will get) and Held in memory (the amount of decoded audio the browser must hold at once, which decides whether the file can be done).
  3. Choose a Bitrate: 128, 192, 256 or 320 kbps. Each choice shows a note on what it is for.
  4. Press Extract the MP3. The button reads “Decoding…” and then “Encoding…” while it works.
  5. Listen in the player that appears, check the Sample rate and Channels, and press the download button, which names the file after your video with .mp3 on the end. Clear empties the panel for the next file.

The 13-minute ceiling, worked through

The decoding route used here produces the whole soundtrack as uncompressed samples before the encoder can start, and uncompressed audio is large: four bytes per sample, per channel. The length is read from the file’s header first, and the memory needed is worked out before anything is decoded, assuming 48 kHz stereo. That is 48,000 × 2 × 4 = 384,000 bytes for every second of audio. The ceiling is 300,000,000 bytes, and 300,000,000 ÷ 384,000 = 781.25 seconds, or 13 minutes and 1 second.

Length Decoded audio at 48 kHz stereo What the panel shows Outcome
1 minute 23,040,000 bytes Held in memory ≈ 21.97 MB Extracted
4 minutes 92,160,000 bytes Held in memory ≈ 87.89 MB Extracted
10 minutes 230,400,000 bytes Held in memory ≈ 219.73 MB Extracted
13 minutes 299,520,000 bytes Held in memory ≈ 285.64 MB Extracted, just under
20 minutes 460,800,000 bytes “roughly 0.46 GB of memory held at once” Refused
60 minutes 1,382,400,000 bytes “roughly 1.38 GB of memory held at once” Refused

The panel counts a megabyte as 1,024 × 1,024 bytes, which is why its figures sit a little below the byte counts divided by a million. A refused file is not attempted: it gets a message with its length, the memory it would need and the limit. That matters because an out-of-memory decode does not fail politely. It takes the tab down, and anything else open in it.

The estimate assumes 48 kHz because that is what video soundtracks overwhelmingly use, and because it is the cautious side of the common alternative. A four-minute track at CD quality, 44.1 kHz, actually decodes to about 85 MB; the panel shows the higher figure so that it never under-counts.

For a long recording, cut it down first. Trim video copies a section out without re-encoding it, and a section under 13 minutes will go through. Where a copy-only cut actually lands explains why the trimmed piece can start a little earlier than the point you picked.

Choosing a bitrate

The MP3 is roughly the length in seconds × the bitrate in kbps ÷ 8, in kilobytes. For a four-minute (240-second) file:

Bitrate What the tool says it is for Estimate in bytes Shown as MP3 out
128 kbps Speech, lectures, anything you will listen to once 3,840,000 ≈ 3.66 MB
192 kbps (default) Transparent enough for music on most equipment 5,760,000 ≈ 5.49 MB
256 kbps Music you care about, on headphones you care about 7,680,000 ≈ 7.32 MB
320 kbps The MP3 ceiling 9,600,000 ≈ 9.16 MB

At 320 kbps the second generation of loss is hidden well enough that almost nobody will hear it; at 128 kbps speech is fine and music can show it. If what you want is the original soundtrack rather than an MP3 of it, the better operation is a container change: copying the AAC track into an .m4a file with no re-encoding at all. This tool does not do that. It exists for the format that plays on car stereos and old hardware, which is usually why someone asks for an MP3.

The Sample rate shown after extraction is the rate your browser decoded at, which is its own audio hardware rate and not necessarily the rate in the file. The browser’s audio pipeline resamples on decode and offers no way round it on this route, so the tool reports the number instead of implying the original was kept.

Why it runs where other video tools fail

The other video tools on this site depend on WebCodecs, and Firefox on Android has none of it. This tool does not need it. It decodes with the Web Audio API’s decodeAudioData, which has been in browsers for over a decade and hands the work to the operating system’s own codecs, so AAC in MP4, Opus in WebM, MP3, FLAC and Vorbis all decode without an extra download.

Encoding is the opposite case. The table MDN keeps on codec support, as cited in the tool’s source, puts MP3 encoding at 0% of browsers against 96.5% for MP3 decoding. So the page ships a WebAssembly build of LAME 3.100, about 132 KB compressed, and fetches it only when you press the button. MP3’s core patents expired on 23 April 2017, which is why an encoder can be shipped at all.

Some files are refused on sight, with the reason: AVI (it almost always carries DivX, Xvid or MJPEG, which no browser decodes), WMV, FLV, MPEG program streams and VOB, MXF, RealMedia, and MPEG transport streams, which need remuxing to MP4 first. A video with no soundtrack gets “This video has no soundtrack” rather than a confusing codec error.

The command-line route

If you have ffmpeg installed, one line does the same job with no length ceiling of this kind:

ffmpeg -i input.mp4 -vn -c:a libmp3lame -q:a 2 output.mp3

-vn leaves the picture out, and libmp3lame is the LAME encoder, the same one this page downloads. This guide does not list a built-in method on Windows or macOS.

Video to MP3 An uploading converter ffmpeg
Your video is sent Never The whole file, before anything starts Never
Length limit About 13 minutes, with the reason printed A file-size cap, often unexplained No ceiling of this kind
Your file afterwards Never received Held for 1 to 2 hours Stays on your disk
Runs on Every browser with Web Audio, including Firefox on Android Any browser A computer with ffmpeg installed

Checking that the video was not sent

Open the developer tools on the Network tab, drop in a video and press Extract the MP3. One request appears at that moment: the encoder, about 132 KB, coming down. A video is usually many megabytes, and no upload of that size appears. Because the encoder arrives on the first press, test offline the other way round: extract one file while connected, then disconnect and extract another.

Video to MP3 is free. For a clip that should stay moving, Video to GIF also works in the tab, though it needs a browser with WebCodecs.