Extract Audio from M2TS to WEBA — Free Online Tool

Extract audio from M2TS Blu-ray and AVCHD files and save it as a WEBA file using the Opus codec — a modern, highly efficient lossy audio format optimized for web streaming and playback. This tool strips the video stream entirely and re-encodes the audio track to Opus at 128k bitrate, producing a compact, browser-ready audio file.

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 found on Blu-ray discs and AVCHD camcorders, often carrying high-definition audio encoded in formats like AAC, AC-3 (Dolby Digital), DTS, or TrueHD. WEBA is an audio-only WebM container that exclusively supports Opus or Vorbis audio — neither of which is typically found in M2TS sources. This means the audio stream cannot simply be copied (remuxed); it must be fully re-encoded. FFmpeg reads the primary audio track from the M2TS file, decodes it, and re-encodes it to Opus using the libopus encoder at 128k bitrate. The video stream is discarded entirely using the -vn flag. The result is a small, streamable WEBA file well-suited for web-based audio delivery.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg program, the open-source multimedia processing engine that handles reading the M2TS transport stream, decoding the audio, and encoding it to Opus for the WEBA output.
-i input.m2ts Specifies the input file — an M2TS Blu-ray or AVCHD container. FFmpeg will parse the MPEG-2 Transport Stream structure to locate all available video, audio, and subtitle streams inside the file.
-vn Disables video output entirely, telling FFmpeg to skip all video streams from the M2TS source. This is essential here since WEBA is an audio-only container and cannot hold video data.
-c:a libopus Sets the audio encoder to libopus, the reference Opus codec implementation. Since M2TS audio codecs like AC-3, DTS, or TrueHD are incompatible with the WEBA container, the audio must be fully re-encoded to Opus, the native and default codec for WEBA.
-b:a 128k Sets the Opus audio bitrate to 128 kilobits per second. At this bitrate, Opus delivers transparent or near-transparent audio quality for most content types, including stereo music and speech extracted from Blu-ray or AVCHD recordings.
-vn A second instance of the video-disable flag, applied on the output side to reinforce that no video stream should be written to the WEBA file. While the first -vn handles input stream selection, this ensures the WebM muxer does not attempt to include any video data.
output.weba The name of the output file. The .weba extension signals an audio-only WebM file to both FFmpeg and the operating system, ensuring the Opus-encoded audio is wrapped in a WebM container formatted for direct browser playback.

Common Use Cases

  • Extracting a concert or film score from a Blu-ray rip (M2TS) to listen to on a web-based audio player that supports WEBA/Opus
  • Pulling the audio commentary track from an AVCHD camcorder recording to embed directly in a web application
  • Converting Blu-ray disc chapter audio to WEBA for use in a browser-based interactive timeline or multimedia project
  • Reducing a large M2TS broadcast recording to an audio-only WEBA file for archiving dialogue or narration without the video overhead
  • Preparing audio from high-definition AVCHD footage for a podcast or voiceover review workflow where only the audio is needed
  • Extracting audio from a Blu-ray movie trailer M2TS file to use as background music on a web page, leveraging Opus's superior compression at low bitrates

Frequently Asked Questions

The audio will always be fully re-encoded, not copied. M2TS files typically carry audio in formats like AC-3 (Dolby Digital), DTS, TrueHD, or AAC, none of which are compatible with the WEBA container. WEBA only supports Opus and Vorbis, so FFmpeg must decode the original audio stream and re-encode it to Opus. This re-encoding introduces some quality loss compared to the source, but Opus at 128k generally sounds excellent and is more efficient than most formats found in M2TS files at equivalent bitrates.
By default, FFmpeg selects the first audio stream it finds in the M2TS file, which is typically the primary language track. WEBA does not support multiple audio tracks, so only one track can be included in the output. If you want to extract a different audio track — for example, a secondary language or a director's commentary — you would need to add a stream selector flag like '-map 0:a:1' to the FFmpeg command to target the second audio track specifically.
Blu-ray M2TS files often contain lossless or high-bitrate audio (TrueHD at up to 18 Mbps, DTS-HD Master Audio, or AC-3 at 640k), so converting to Opus at 128k will result in a significantly reduced bitrate and some quality loss. However, Opus is among the most perceptually efficient lossy codecs available — 128k Opus typically sounds comparable to MP3 at 192k or AAC at 160k. For music or critical listening extracted from Blu-ray, consider increasing the bitrate to 192k or 256k in the FFmpeg command using '-b:a 256k'.
No. WEBA is a strictly audio-only container and has no support for subtitles, chapter markers, or any video-related metadata. All subtitle tracks, chapter information, and video streams present in the M2TS source are discarded during conversion. If you need to preserve subtitles or chapters, you would need to extract them separately using a different tool or FFmpeg command.
The audio bitrate is controlled by the '-b:a 128k' flag in the command. You can replace '128k' with any supported value such as '64k' for a very small file size (suitable for voice recordings), '192k' or '256k' for higher fidelity music extracted from Blu-ray, or '320k' for the maximum quality. For example, the full command at 256k would be: ffmpeg -i input.m2ts -vn -c:a libopus -b:a 256k -vn output.weba. Opus performs exceptionally well at 96k–128k for most content, so increases above 192k yield diminishing returns.
Yes. On Linux or macOS, you can run a shell loop to process all M2TS files in a directory: for f in *.m2ts; do ffmpeg -i "$f" -vn -c:a libopus -b:a 128k -vn "${f%.m2ts}.weba"; done. On Windows Command Prompt, use: for %f in (*.m2ts) do ffmpeg -i "%f" -vn -c:a libopus -b:a 128k -vn "%~nf.weba". This is particularly useful for converting large collections of AVCHD camcorder clips or Blu-ray chapter files, especially since the desktop FFmpeg command supports files over 1GB with no size restriction.

Technical Notes

M2TS uses MPEG-2 Transport Stream framing designed for error-resilient broadcast and disc playback, and the audio tracks it carries can vary widely — AC-3, E-AC-3, DTS, DTS-HD, TrueHD, LPCM, and AAC are all commonly encountered on Blu-ray and AVCHD sources. None of these codecs are valid inside a WEBA/WebM container, making re-encoding to Opus mandatory for every M2TS-to-WEBA conversion. The libopus encoder used here is the reference implementation and produces high-quality output; it uses MDCT-based encoding at higher bitrates and hybrid SILK/CELT modes at lower bitrates, making it versatile for both speech and music extracted from Blu-ray content. One important limitation: if the M2TS source contains lossless multichannel audio (e.g., 7.1 TrueHD), libopus will encode only up to the channel count supported by the specified configuration — by default it will preserve the channel layout, but some downmixing behavior may occur depending on the FFmpeg build. The WEBA output will not carry M2TS-specific metadata such as Blu-ray disc title information, stream language tags may or may not be preserved depending on how they are stored in the source, and any PTS/DTS timing data specific to the transport stream is discarded. File sizes for WEBA output will be dramatically smaller than M2TS source files, since video (typically the bulk of an M2TS file's size) is removed and audio is compressed with a highly efficient modern codec.

Related Tools