Convert M2TS to FLAC — Free Online Tool
Extract and convert the audio track from a Blu-ray or AVCHD M2TS file into a lossless FLAC file, preserving every bit of the original audio quality. Ideal for archiving high-definition disc audio — including DTS-HD, TrueHD, or PCM sources — into a widely supported, space-efficient lossless format.
to
FFmpeg Command
Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg
Drop your M2TS 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
M2TS is an MPEG-2 Transport Stream container used on Blu-ray discs and AVCHD camcorders, often carrying high-bitrate audio encoded as AAC, AC-3, DTS, or even lossless formats like TrueHD or PCM. During this conversion, FFmpeg discards the video stream entirely and decodes the audio stream, then re-encodes it into FLAC using lossless compression. Because FLAC is lossless, the output is mathematically identical to the decoded PCM audio — no audio quality is lost in the process. The compression level setting only affects file size and encoding speed, not audio fidelity. If the M2TS contains multiple audio tracks, FFmpeg selects the first (default) audio track; the video and subtitle streams are dropped since FLAC is a pure audio container.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg command-line tool, which handles the reading, decoding, encoding, and writing of the M2TS input and FLAC output in this conversion. |
-i input.m2ts
|
Specifies the input file — an M2TS transport stream, as used on Blu-ray discs and AVCHD camcorders. FFmpeg will probe this file to identify all available streams, including video, audio, and subtitles. |
-c:a flac
|
Sets the audio codec to FLAC (Free Lossless Audio Codec), instructing FFmpeg to encode the decoded audio from the M2TS source into lossless FLAC. No audio quality is lost in this step regardless of what codec the original M2TS audio used. |
-compression_level 5
|
Sets the FLAC compression level to 5, the default, which balances encoding speed against output file size. This parameter has no effect on audio quality — all FLAC compression levels decode to identical PCM audio. |
output.flac
|
Specifies the output filename with the .flac extension. FFmpeg infers from this extension that the output container is FLAC, which is a pure audio container — the video and subtitle streams from the M2TS are automatically dropped. |
Common Use Cases
- Ripping the lossless audio soundtrack from a Blu-ray disc rip stored as an M2TS file to archive in a compact, universally supported format
- Extracting concert or live performance audio from an AVCHD camcorder recording (stored as .m2ts) to produce a high-fidelity audio file for mixing or mastering
- Converting Blu-ray movie audio to FLAC for playback on audiophile digital audio players or home theater systems that support FLAC but not M2TS
- Archiving the audio from a broadcast or cable capture saved in M2TS format into FLAC for long-term storage without any quality degradation
- Pulling the stereo or surround audio from an M2TS video file to edit or review in a digital audio workstation (DAW) that imports FLAC more cleanly than transport stream files
- Creating FLAC audio files from Blu-ray disc menus or bonus content stored as M2TS clips for use in music libraries or sample collections
Frequently Asked Questions
No — FLAC is a lossless format, meaning the audio is decompressed and then re-encoded without any loss of information. The decoded PCM audio from the M2TS source is preserved bit-for-bit in the FLAC output. The only caveat is that if the original M2TS audio track was already lossy (e.g., AC-3 or AAC), the FLAC file will be a lossless copy of that lossy audio — it won't recover quality that was already discarded at the source.
The video stream is completely discarded. FLAC is a pure audio container and cannot hold video data, so FFmpeg automatically drops the video track and extracts only the audio. Similarly, any subtitle tracks embedded in the M2TS file are not carried over, since FLAC does not support subtitles or chapters.
By default, FFmpeg selects the first audio stream it detects in the M2TS file. Blu-ray rips often contain multiple tracks (e.g., a primary TrueHD surround track and a secondary AC-3 compatibility track). If you need a specific track, you can modify the FFmpeg command to add '-map 0:a:1' (for the second audio stream, zero-indexed) before the output filename to select a different track.
The '-compression_level' flag in FLAC controls how aggressively the encoder compresses the audio data, ranging from 0 (fastest, largest file) to 8 (slowest, smallest file). Level 5 is the default and offers a good balance between encoding speed and file size. Crucially, all compression levels produce bit-for-bit identical audio output — changing this value only affects the file size and how long encoding takes, never the audio quality.
Replace the '5' in '-compression_level 5' with '8' to use maximum compression: 'ffmpeg -i input.m2ts -c:a flac -compression_level 8 output.flac'. This will produce the smallest FLAC file but will take noticeably longer to encode, especially for long audio from a full-length Blu-ray feature. The audio quality remains identical regardless of which level you choose.
Yes. On Linux or macOS, you can run a shell loop: 'for f in *.m2ts; do ffmpeg -i "$f" -c:a flac -compression_level 5 "${f%.m2ts}.flac"; done'. On Windows Command Prompt, use: 'for %f in (*.m2ts) do ffmpeg -i "%f" -c:a flac -compression_level 5 "%~nf.flac"'. This processes every M2TS file in the current directory, outputting a corresponding FLAC file with the same base name.
Technical Notes
M2TS files from Blu-ray sources commonly carry audio in formats such as Dolby TrueHD, DTS-HD Master Audio, LPCM, AC-3, or AAC. FFmpeg decodes whichever audio stream is selected to raw PCM before re-encoding to FLAC, so the process works regardless of the original audio codec inside the M2TS. However, note that multichannel surround audio (e.g., 5.1 or 7.1) is fully supported by FLAC — the channel layout is preserved in the output. Metadata embedded in the M2TS transport stream (such as stream language tags) may not transfer cleanly to FLAC tags, so you may want to add metadata manually using the '-metadata' flag or a tagging tool afterward. FLAC does not support chapters or cue points from the M2TS source. For very large Blu-ray rips, the 1GB browser-based limit applies; the desktop FFmpeg command is strongly recommended for full-length Blu-ray feature rips, which typically exceed this threshold. Also note that some AVCHD M2TS files use AAC audio that is wrapped in an LATM/LOAS transport, which FFmpeg handles correctly during decoding before passing to the FLAC encoder.