Convert MPEG to FLAC — Free Online Tool
Extract and convert the audio track from an MPEG video file into a high-fidelity FLAC file — a fully lossless format. Since MPEG files typically carry MP2 or MP3 audio encoded with lossy compression, FLAC preserves every bit of that audio data as-is, without any additional quality degradation.
to
FFmpeg Command
Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg
Drop your MPEG file here
or click to browse
Free — no uploads, no signups. Your files never leave your browser.
Settings
Note: Browser-based encoding uses approximate quality targets. For precise CRF compression, copy the FFmpeg command above and run it on your desktop.
Estimated output:
Conversion Complete!
DownloadHow It Works
MPEG files store video (MPEG-1 or MPEG-2) alongside audio encoded in MP2, MP3, or AAC. This conversion discards the video stream entirely and extracts only the audio, then re-encodes it into FLAC using lossless compression. Because the source audio in an MPEG file is already lossy (typically MP2 or MP3), the FLAC output will be a perfect lossless copy of that already-compressed audio — it will not restore quality lost during the original MPEG encoding, but it guarantees no further quality loss is introduced. The FLAC compression level setting controls only the size-versus-speed tradeoff during encoding, not audio quality.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg tool. In the browser-based version of this tool, FFmpeg runs locally via WebAssembly (FFmpeg.wasm) — your file never leaves your device. |
-i input.mpeg
|
Specifies the input MPEG file. FFmpeg will automatically detect whether this is an MPEG-1 or MPEG-2 container and identify the enclosed video and audio streams. |
-c:a flac
|
Instructs FFmpeg to encode the audio stream using the FLAC codec — a lossless audio format. The existing MP2 or MP3 audio in the MPEG file is decoded and re-encoded into FLAC without any further quality loss. |
-compression_level 5
|
Sets the FLAC compression effort to level 5 on a scale of 0–8. This is the balanced default: it compresses the file reasonably well without excessive encoding time. Importantly, this does not affect audio quality — all FLAC compression levels produce bit-for-bit identical audio output. |
output.flac
|
Defines the output filename and signals to FFmpeg that the target container is FLAC. The video stream from the MPEG file is automatically dropped since FLAC is an audio-only format. |
Common Use Cases
- Archiving the audio from broadcast television recordings or legacy MPEG capture-card files in a lossless container for long-term storage
- Extracting soundtrack or dialogue audio from MPEG-1 or MPEG-2 video files for use in audio editing software like Audacity or Adobe Audition
- Preserving the audio from DVD-ripped MPEG-2 program streams before further processing or lossy re-encoding to MP3 or AAC for distribution
- Converting MPEG audio to FLAC so it can be tagged with rich metadata (artist, album, track number) using tools like MusicBrainz Picard that favor FLAC over MPEG
- Preparing audio extracted from legacy MPEG news or documentary footage for use in podcast production workflows that require a lossless intermediate format
- Creating a FLAC master file from an MPEG source as a reference copy before downsampling to multiple lossy formats for different streaming platforms
Frequently Asked Questions
No — FLAC is lossless, meaning it will perfectly preserve whatever audio is in the MPEG file, but it cannot recover quality that was lost during the original MP2 or MP3 encoding inside the MPEG container. Think of it like saving a JPEG as a PNG: the file becomes lossless going forward, but the compression artifacts from the original encoding remain. What FLAC does guarantee is that no additional quality loss occurs in this conversion.
MPEG files use lossy audio compression (typically MP2 or MP3), which achieves very small file sizes by discarding audio data. FLAC stores all audio data intact using lossless compression, which inherently requires more space than a lossy codec. Additionally, the MPEG file also contained a video stream, so comparing the FLAC audio-only file to the full MPEG video file size isn't a direct comparison — the FLAC contains only audio.
The MPEG-1 or MPEG-2 video stream is completely discarded. FLAC is a purely audio format and has no capacity to store video data. Only the first audio track found in the MPEG file is extracted and encoded into the FLAC output. If you need to keep the video, you would need a different output format such as MKV or MP4.
Adjust the value after -compression_level in the command. Valid values range from 0 (fastest encoding, largest file) to 8 (slowest encoding, smallest file). The default used here is 5, which is a balanced midpoint. Crucially, changing this value has no effect on audio quality — FLAC is lossless at every compression level. For example: ffmpeg -i input.mpeg -c:a flac -compression_level 8 output.flac will produce the most compressed file with identical audio quality.
MPEG containers have limited metadata support compared to FLAC, so little or no tag information is typically transferred. FLAC supports rich Vorbis Comment tags (artist, title, album, genre, etc.), but since the source MPEG file rarely contains this metadata, the output FLAC will usually be untagged. You can add metadata afterward using tools like MusicBrainz Picard, mp3tag, or the FFmpeg -metadata flag.
Yes. On Linux or macOS you can use a shell loop: for f in *.mpeg; do ffmpeg -i "$f" -c:a flac -compression_level 5 "${f%.mpeg}.flac"; done. On Windows Command Prompt, use: for %f in (*.mpeg) do ffmpeg -i "%f" -c:a flac -compression_level 5 "%~nf.flac". Each file is processed sequentially, and the output FLAC files will be named after the corresponding input MPEG files.
Technical Notes
MPEG program streams (.mpeg, .mpg) and transport streams can contain audio encoded as MP2 (MPEG-1 Layer II), MP3 (MPEG-1 Layer III), or occasionally AAC. FFmpeg auto-detects which audio codec is present and decodes it before re-encoding to FLAC — this decode-then-encode step is unavoidable since FLAC and MP2/MP3 use fundamentally different audio representations. The FLAC codec in FFmpeg outputs standard 16-bit or 24-bit integer PCM samples wrapped in FLAC's lossless compression; the bit depth of the output matches what FFmpeg decodes from the source, which for MP2/MP3 sources is typically 16-bit at 44.1 kHz or 48 kHz. FLAC supports cue sheets and ReplayGain tags, which can be added post-conversion. One known limitation: if the MPEG file contains multiple audio tracks (e.g., multilingual broadcast streams), FFmpeg will default to the first track; use -map 0:a:1 to select a different track. FLAC does not support chapters or embedded subtitles, so any such data in the MPEG container is lost.