Extract Audio from M2TS to ALAC — Free Online Tool

Extract lossless audio from M2TS Blu-ray and AVCHD files and save it as ALAC (Apple Lossless Audio Codec) in an M4A container. Perfect for archiving high-quality audio from Blu-ray rips while preserving every bit of the original audio data in a format natively supported by Apple devices and iTunes.

FFmpeg Command

Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg

Free — no uploads, no signups. Your files never leave your browser.

Estimated output:

Conversion Complete!

Download

How It Works

M2TS files are MPEG-2 Transport Stream containers commonly carrying multiple audio tracks encoded in formats like AC-3 (Dolby Digital), DTS, TrueHD, or PCM alongside their video streams. This conversion strips the video entirely and transcodes the selected audio stream into ALAC — Apple's lossless codec stored in an MPEG-4 (.m4a) container. Because M2TS audio codecs like AC-3 or DTS are not natively lossless in the ALAC sense, FFmpeg decodes the source audio to raw PCM first, then re-encodes it into ALAC. The resulting file is a lossless representation of what was in the source stream — meaning no further quality is lost beyond what the original M2TS audio codec already discarded. If the source track happens to be lossless PCM or TrueHD, the ALAC output will be a true bit-for-bit lossless preservation of the original audio.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg tool, which handles all demuxing, decoding, encoding, and muxing operations. In this browser tool, FFmpeg runs entirely via WebAssembly (FFmpeg.wasm) — no data leaves your device.
-i input.m2ts Specifies the input M2TS file — a Blu-ray or AVCHD transport stream container that may contain video, multiple audio tracks, and subtitle streams.
-vn Disables video output entirely, ensuring only the audio stream is processed. This is critical because the M4A container cannot hold video, and without this flag FFmpeg would error trying to mux a video stream into the ALAC output.
-c:a alac Encodes the audio stream using Apple Lossless Audio Codec (ALAC). FFmpeg first decodes the M2TS audio (whether AC-3, DTS, PCM, or TrueHD) to raw PCM, then re-encodes it losslessly to ALAC, preserving the full dynamic range of the decoded audio.
-c:a alac This flag appears twice in the resolved command as a redundant confirmation of the ALAC codec assignment — both instances instruct FFmpeg to use the ALAC encoder for the audio output stream, resulting in the same behavior as specifying it once.
output.m4a Defines the output filename with the .m4a extension, which signals FFmpeg to use the MPEG-4 audio container — the standard and required wrapper for ALAC files compatible with iTunes, Apple Music, and all Apple devices.

Common Use Cases

  • Archive the audio score or soundtrack from a Blu-ray rip into a lossless format playable in iTunes or on iPhone and iPad without quality degradation
  • Extract dialogue or audio from AVCHD camcorder footage (stored as M2TS) for use in Apple-ecosystem video editing workflows in Final Cut Pro
  • Preserve concert or live performance audio from a Blu-ray disc as ALAC for a high-fidelity music library on an Apple Music-compatible device
  • Convert M2TS broadcast captures with uncompressed PCM audio tracks into ALAC for long-term archival storage with significantly reduced file size compared to raw PCM
  • Prepare audio from Blu-ray source material for mastering or mixing in Logic Pro, which natively handles ALAC files
  • Strip and convert the audio layer from multi-track M2TS files when only the sound is needed for a podcast, voice-over project, or audio review

Frequently Asked Questions

It depends on the source audio codec inside the M2TS file. If the original track is lossless PCM or Dolby TrueHD, the ALAC output will be a lossless capture with no quality loss. If the source track is a lossy format like AC-3 (Dolby Digital) or DTS, FFmpeg decodes it to PCM and then re-encodes to ALAC losslessly — but the quality ceiling is already set by the original lossy codec. ALAC will not recover detail lost by the AC-3 or DTS encoding, but it will not degrade it further either.
Yes. M2TS files from Blu-ray discs often contain multiple audio tracks — for example, a TrueHD track, an AC-3 compatibility track, and a foreign language dub. By default FFmpeg selects the first audio stream. To target a specific track, add '-map 0:a:1' (for the second audio stream, zero-indexed) to the command before the output filename. You can inspect all available streams first by running 'ffmpeg -i input.m2ts' without an output file.
ALAC is Apple's proprietary lossless codec and is specifically designed to be stored in the MPEG-4 container, which uses the .m4a extension for audio-only files. This is what makes ALAC files natively compatible with iTunes, Apple Music, iPhone, iPad, and macOS without any plugins. If you need a more universally compatible lossless format, FLAC in a .flac container would be an alternative, but ALAC's advantage is seamless integration across the entire Apple ecosystem.
The output M4A file will be dramatically smaller than the source M2TS because all video data is discarded — video typically accounts for 80–95% of a Blu-ray M2TS file's size. The ALAC audio size itself depends on the source: if converting from a compressed AC-3 track, ALAC will actually be larger than the source audio stream alone because lossless encoding of decoded PCM is less compact than lossy compression. If converting from a lossless PCM track, ALAC provides roughly 40–60% compression over raw PCM.
You can use stream specifiers to target audio by language metadata. For example, adding '-map 0:a:m:language:fra' will select the French audio track if the M2TS file contains language tags. Alternatively, run 'ffprobe -v quiet -print_format json -show_streams input.m2ts' to list all streams with their index numbers and language codes, then use '-map 0:a:N' where N is the zero-based index of your desired track. The rest of the command — '-vn -c:a alac' — remains unchanged.
Yes. On Linux or macOS you can loop over files in a directory with: 'for f in *.m2ts; do ffmpeg -i "$f" -vn -c:a alac "${f%.m2ts}.m4a"; done'. On Windows Command Prompt, use: 'for %f in (*.m2ts) do ffmpeg -i "%f" -vn -c:a alac "%~nf.m4a"'. This processes each M2TS file sequentially, stripping video and saving ALAC audio to a matching .m4a filename. The browser-based tool on this page handles one file at a time, so the FFmpeg command is particularly valuable for batch workflows involving large Blu-ray libraries.

Technical Notes

M2TS is a transport stream wrapper, and FFmpeg generally handles it well, but probe size and analyze duration may occasionally need adjustment for files where audio stream metadata is late in the container — particularly with some AVCHD camcorder recordings. The ALAC codec in FFmpeg is a native encoder and requires no external libraries, so it is reliably available in all standard FFmpeg builds including FFmpeg.wasm. ALAC does not support multi-channel configurations beyond 8 channels, though Blu-ray audio rarely exceeds 7.1. Metadata tags (artist, title, album) from the M2TS source are typically sparse or absent, as transport streams are not designed for rich metadata — you may wish to add tags post-conversion using a tool like mp3tag or beets. Chapter markers present in the M2TS source are not transferred to the ALAC output, as chapter support in M4A requires additional muxing steps beyond a simple audio extraction. The '-vn' flag is essential here: without it, FFmpeg would attempt to include video in the output and fail, since M4A does not support video streams.

Related Tools