MPEG to MP3 Audio Extractor
This MPEG to MP3 audio extractor identifies, isolates, and encodes the audio stream from MPEG container files. The extractor reads MPEG Program Stream and Transport Stream headers, locates audio elementary stream packets by PES stream ID, reassembles the audio data, detects the audio codec (MPEG-1 Layer I/II/III, AC-3, or AAC), decodes the audio to PCM, and encodes the PCM to MP3 format. The extraction process preserves original audio timing, channel mapping, and sample rate.
Load your MPEG file for audio extraction
MPEG to MP3 Converter
Drop your MPEG file and get high-quality MP3 audio in seconds. No registration required.
Drop your MPEG file here
or from your computer
Supports MPEG, MPG, MP4, AVI, MOV, WMV, MKV • Max 500MB
File Size Calculator
Estimate your MP3 file size before converting. Plan your storage needs in advance.
Source Video
Output MP3
How to Extract MP3 Audio from MPEG?
The audio extractor follows a technical 3-stage process: stream identification, audio decoding, and MP3 encoding.
Load and Analyze the MPEG Container
Load your MPEG file into the audio extractor. The tool scans the container headers and identifies all elementary streams — video streams (by PES stream ID 0xE0–0xEF), audio streams (0xC0–0xDF), and private streams (0xBD for AC-3 and DTS). The extractor displays detected audio streams with codec, bitrate, and channel information.
Configure Extraction Output
Select the audio stream to extract (the primary stream is selected by default). Choose the MP3 output bitrate — the extractor suggests matching the source audio bitrate for lossless-to-lossy transparency. Set sample rate to match the source (44100 Hz or 48000 Hz) for optimal extraction quality.
Execute Audio Extraction
Start extraction. The tool demultiplexes the MPEG container, collects audio PES packets, strips PES headers, reassembles the audio elementary stream, decodes the audio codec to PCM samples, and encodes the PCM to MP3. The extraction pipeline runs sequentially in WebAssembly.
Automated Stream Detection
The audio extractor automatically identifies audio streams in the MPEG container. No need to manually specify stream IDs, codec types, or packet offsets. The extractor parses the MPEG Program Stream Map (PSM) or Program Association Table (PAT) to locate audio components.
Codec-Aware Extraction
The extractor detects the source audio codec (MPEG Audio Layer I/II/III, Dolby AC-3, or AAC) and uses the appropriate decoder for each codec. MPEG Audio Layer II from DVDs is decoded using a sub-band filter bank. AC-3 surround audio is decoded and downmixed to stereo using ITU-R BS.775 coefficients. This codec-aware approach produces the cleanest possible PCM for MP3 encoding.
Extraction in Browser Sandbox
The entire audio extraction pipeline — MPEG demuxing, audio decoding, and MP3 encoding — runs in the browser's WebAssembly sandbox. No system calls, no disk writes, and no network access during extraction. The sandbox prevents the extraction code from accessing any system resources beyond allocated memory.
MPEG Container Internals for Audio Extraction
MPEG Program Stream containers begin with a Pack Header (start code 0x000001BA) that contains the System Clock Reference (SCR) for timing. Following the Pack Header, PES packets contain multiplexed audio and video data. Each PES packet has a 6-byte header with: start code (0x000001), stream ID (1 byte), and packet length (2 bytes). Audio stream IDs range from 0xC0 to 0xDF (up to 32 audio streams). The extractor reads each PES packet, identifies audio packets by stream ID, and collects the PES payload data. For MPEG Transport Stream files, the extractor reads 188-byte TS packets and follows the Program Map Table (PMT) to identify the audio PID.
Inspecting MPEG Container Structure
Use MediaInfo in "tree" view to inspect the MPEG container structure. MediaInfo shows all elementary streams, their codec types, bitrates, and PES stream IDs. For command-line analysis, FFprobe (part of FFmpeg) displays detailed container information with "ffprobe -show_streams input.mpeg". This technical information helps verify the extractor's stream detection accuracy.
Extracted MP3 Technical Specifications
The MP3 file produced by the audio extractor conforms to ISO/IEC 11172-3 (MPEG-1 Audio Layer III) or ISO/IEC 13818-3 (MPEG-2 Audio Layer III) depending on the sample rate. Sample rates of 32000, 44100, and 48000 Hz produce MPEG-1 Audio Layer III frames. Sample rates of 16000, 22050, and 24000 Hz produce MPEG-2 Audio Layer III frames. The extractor writes a proper Xing/LAME header in VBR mode for accurate duration reporting and seeking. Each MP3 frame contains 1152 samples (576 samples for MPEG-2 Layer III) with a 4-byte frame header containing sync word, MPEG version, layer, bitrate index, sample rate index, and channel mode.
Verifying Extracted MP3 Technical Properties
Use mp3val (free command-line tool) to validate the MP3 file structure. mp3val checks for frame sync errors, incorrect frame headers, and truncated frames. Use mp3guessenc to detect which encoder produced the MP3 — it should identify LAME 3.100. Use Spek to view the spectral analysis and confirm the frequency ceiling matches the expected value for the selected bitrate.
Convert Other Files to MP3 Format
Convert video and audio files from multiple formats to MP3 using this free online audio converter.
Convert Your MPEG Files to Other Formats
Convert your MPEG video files to other audio and video formats for cross-platform compatibility.
Audio Extraction Security
The MPEG demuxer runs in WebAssembly with isolated linear memory. Even if a malformed MPEG file contains exploit payloads in PES packet data, the WebAssembly sandbox prevents code execution outside the allocated memory region.
All audio codecs (MPEG Audio, AC-3 decoder, AAC decoder) are compiled into the WebAssembly module. No dynamic codec downloads occur during extraction. The codec library is verified at build time and bundled with the page.
The extractor reads only PES payload data from audio packets. Video PES payloads, private stream data, and navigation data are identified and discarded without decoding. No video content, subtitle data, or metadata beyond audio is processed.
System Clock Reference (SCR) and Presentation Time Stamps (PTS) from the MPEG container are used internally for audio timing but are not logged, stored, or transmitted. Timing data is used only to maintain correct audio synchronization during extraction.
Frequently Asked Questions
The extractor supports 4 audio codecs found in MPEG containers: MPEG-1 Audio Layer I (rare, used in early MPEG-1 files), MPEG-1 Audio Layer II (common in DVD MPEG-2 files and broadcast), MPEG-1 Audio Layer III (MP3, found in some MPEG-4 containers), and Dolby Digital AC-3 (common in DVD MPEG-2 files). AAC audio in MPEG-4 containers is also supported.
The extractor detects all audio elementary streams by scanning PES stream IDs. MPEG Program Stream files can contain up to 32 audio streams (stream IDs 0xC0 through 0xDF) plus private streams for AC-3 and DTS. By default, the extractor processes the first audio stream (0xC0). The file analysis display shows all detected streams with their codec and bitrate information.
Audio extraction specifically refers to isolating the audio elementary stream from a multiplexed container — separating audio from video at the container level. Audio conversion refers to re-encoding the audio from one codec format to another (e.g., MPEG Audio Layer II to Layer III). The extractor performs both operations: extraction (demuxing the audio from the MPEG container) followed by conversion (re-encoding to MP3). The combined process is called transcoding.