Extracting Audio from Video, Explained
After reading this you will know how a video file stores its audio, when to copy that stream untouched, and when to re-encode it to MP3, WAV, FLAC or OGG without losing quality by accident.
What audio extraction actually does
A video file is a container. Inside it sit separate streams: usually one video stream, one or more audio streams, and sometimes subtitles or metadata. An MP4 file, for example, might hold H.264 video and AAC audio side by side, muxed together with timing information so they play in sync.
Extracting audio means pulling the audio stream out of that container and writing it to its own file. Nothing about the picture matters to the result. A 200 MB, 5 minute clip at 1080p might carry an audio track that is only 4.8 MB. That single track is what you keep.
There are two ways to do this. You can copy the audio bytes verbatim, or you can decode them and re-encode into a target format. The choice controls both speed and quality, so it is worth understanding before you press a button.
When to copy and when to re-encode
Copy mode (sometimes called stream copy) takes the compressed audio already inside the video and drops it into a new container without touching the samples. It is fast because no decoding or encoding happens, and it is lossless because the bytes are unchanged. The catch: the output format must be able to hold that codec.
If your MP4 contains AAC audio and you copy it into an .m4a or .mp4 shell, that works. If you ask for a .wav file, copy is impossible, because WAV expects uncompressed PCM, not AAC. The tool then has to decode and re-encode.
Re-encoding decodes the stored audio back to raw samples, then compresses them again with your chosen encoder. Use it when you need a specific format, a smaller file, or a universally playable MP3. Avoid it when the source is already in the format you want, because a second lossy pass throws away more detail.
If you only need the audio in its native codec (say, to feed it to an editor), copy mode is the honest choice: it is faster and it cannot degrade the sound. Re-encode only when the target format demands it or you want a smaller file.
Lossy, lossless and PCM: the three families
The four output formats fall into three groups, and the group decides what happens to quality.
- PCM (WAV)
- Raw uncompressed samples. Each sample is stored as an integer or float. No quality loss on encode, but large files. A stereo 44.1 kHz 16-bit track needs about 10.6 MB per minute.
- Lossless compression (FLAC)
- Compresses PCM without discarding anything. You can reconstruct the exact original samples. Typical FLAC files are 50 to 60 percent of the WAV size, so roughly 5.5 MB per minute for the same track.
- Lossy compression (MP3, OGG)
- Discards detail the ear is least likely to notice, then compresses what remains. Much smaller (about 0.96 MB per minute at 128 kbps) but the discarded detail is gone forever.
The rule that follows: decoding a lossy source and re-encoding to another lossy format compounds the loss. Decoding a lossy source into WAV or FLAC does not recover quality; it just stops adding more loss, at the cost of a much larger file.
The size formulas
For uncompressed PCM, the file size is exact and easy to predict:
Here f_s is the sample rate in samples per second (Hz), b is the bytes per sample (2 for 16-bit, 3 for 24-bit), c is the channel count (1 mono, 2 stereo), and t is the duration in seconds. The result S_{\text{PCM}} is in bytes.
For lossy formats set by a constant bitrate, size depends only on the bitrate and duration, not on the sample rate:
Here r is the bitrate in bits per second and t is the duration in seconds. Dividing by 8 converts bits to bytes. At r = 128{,}000 bits per second, one minute costs 128{,}000 \times 60 / 8 = 960{,}000 bytes, about 0.96 MB.
A worked example
A 3 minute stereo clip, four ways
Take the default case: a video whose audio is stereo, 44.1 kHz, and 3 minutes long (180 seconds). Follow the two formulas for each output format.
- WAV at 16-bit: 44{,}100 \times 2 \times 2 \times 180 = 31{,}752{,}000 bytes, about 31.75 MB.
- FLAC: lossless compression at roughly 55 percent of WAV gives 0.55 \times 31.75 \approx 17.46 MB. The exact ratio depends on the music.
- MP3 at 192 kbps: 192{,}000 \times 180 / 8 = 4{,}320{,}000 bytes, about 4.32 MB.
- OGG (Vorbis) at 128 kbps: 128{,}000 \times 180 / 8 = 2{,}880{,}000 bytes, about 2.88 MB.
Notice the spread: the WAV is about 11 times larger than the OGG, yet a listener may not hear a difference on ordinary speakers. That gap is the entire reason lossy codecs exist.
Reading the numbers and hearing the trade
Bitrate is the single dial that matters most for lossy output. Below roughly 96 kbps most people can hear compression artifacts on music: a smeared cymbal, a hollow vocal. Between 128 and 192 kbps the artifacts fade for casual listening. Above 256 kbps the returns shrink fast, and past 320 kbps MP3 gains almost nothing audible while the file grows linearly.
The chart below shows how MP3 size climbs in a straight line with bitrate for a fixed 3 minute clip, because size is proportional to r in the lossy formula.
Common mistakes
The errors below cost either quality or time, and all are avoidable.
- Re-encoding when copy would do. If your MP4 already holds AAC and you export MP3 at 128 kbps, you have degraded the audio for no reason other than the file extension.
- Expecting WAV to sound better than the source. Converting a 128 kbps MP3 to WAV produces a 10 MB file that sounds exactly like the 128 kbps original. The lost detail does not return.
- Ignoring channel count. A mono source forced to stereo doubles the file size while carrying identical left and right channels. Check whether the track is truly stereo before choosing.
- Assuming every codec extracts. AV1 video is not supported by the WebAssembly engine here, and a container with only AV1 plus an unusual audio codec may fail to load.
Copy mode fails silently in your expectations if you pick an incompatible output. Asking to copy AAC into a FLAC file cannot work, so the tool must re-encode. If you require a bit-exact copy, choose a container that accepts the source codec.
Related tools
Once you have an audio file, you may want to change its format again without touching a video. The Audio Format Converter moves between WAV, MP3, OGG, FLAC and M4A directly. If your goal was a short visual clip rather than sound, Video to GIF turns a segment into an animation, and GIF to MP4 does the reverse to shrink a large GIF into a compact video.
Frequently asked questions
Does extracting audio reduce video quality?
No. Extraction reads the audio stream and leaves the source file unchanged. Your original video is untouched.
Which format keeps the best quality?
WAV and FLAC are both lossless, so they preserve every sample. FLAC gives the same audio at roughly half the size. Choose WAV only when a tool requires uncompressed PCM.
Why is the WAV file so large?
WAV stores raw samples with no compression. A stereo 44.1 kHz 16-bit track needs about 10.6 MB per minute regardless of content, silence included.
Can I extract audio from any video?
Most common codecs work, including H.264, VP8, VP9 and MPEG-4. AV1 is not supported by the engine used here, so files that rely on it will not process.
Are my files uploaded anywhere?
No. The conversion runs entirely in your browser using a local engine. Nothing leaves your device.