Convert M2TS to WEBA — Free Online Tool
Extract and convert the audio track from M2TS Blu-ray or AVCHD files into WEBA format using the Opus codec — ideal for getting high-quality, web-ready audio from high-definition video recordings. The conversion strips the video and encodes only the audio stream into a compact WebM-based container optimized for browser playback.
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 files are MPEG-2 Transport Stream containers commonly carrying multiple audio tracks encoded in formats like AAC, AC-3 (Dolby Digital), DTS, or TrueHD alongside H.264 or H.265 video. During this conversion, FFmpeg discards the video stream entirely and selects the primary audio track, then re-encodes it from whatever codec it was originally stored in into Opus inside a WEBA (audio-only WebM) container. Opus re-encoding is always required here because WEBA only supports Opus or Vorbis — no passthrough of AC-3, DTS, or AAC is possible. The result is a significantly smaller, web-playable audio file.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg tool, which handles the reading of the M2TS transport stream container, decoding of its audio track, re-encoding to Opus, and writing the WEBA output file. |
-i input.m2ts
|
Specifies the input M2TS file — an MPEG-2 Transport Stream typically sourced from a Blu-ray disc rip or AVCHD camcorder. FFmpeg will parse all streams inside it, including video, audio, and any subtitle tracks. |
-c:a libopus
|
Sets the audio encoder to libopus, which encodes the decoded M2TS audio (whether it was AC-3, DTS, TrueHD, or AAC) into Opus format — the required and default codec for WEBA files and one of the most efficient lossy audio codecs for web delivery. |
-b:a 128k
|
Sets the Opus audio bitrate to 128 kilobits per second. Opus at 128k provides transparent or near-transparent quality for most music and speech content extracted from M2TS sources, though you can raise this to 192k or 256k for higher-fidelity output from lossless Blu-ray audio tracks. |
-vn
|
Disables video output entirely, which is essential here because WEBA is an audio-only container. Without this flag, FFmpeg would attempt to include the M2TS video stream, which the WEBA format cannot accommodate. |
output.weba
|
Specifies the output filename with the .weba extension, which tells FFmpeg to write an audio-only WebM container holding the Opus-encoded audio extracted from the M2TS source. |
Common Use Cases
- Extract the stereo or surround audio commentary from a Blu-ray rip to create a standalone audio file for archiving or listening offline
- Pull the audio from AVCHD camcorder footage recorded in M2TS format to use as a voiceover or ambient audio track in a web-based video editor
- Convert Blu-ray concert or live performance audio to WEBA for streaming on a personal or fan website that uses the HTML5 audio element
- Extract dialogue or narration from an M2TS broadcast recording for transcription or subtitling workflows
- Reduce storage footprint when you only need the audio portion of a large M2TS file, such as a documentary or lecture recording captured via HDMI
- Prepare audio from high-definition M2TS source material in a format compatible with WebRTC or low-latency web audio applications that favor Opus
Frequently Asked Questions
Not losslessly — this conversion always involves re-encoding, regardless of the source audio codec. Whether your M2TS contains lossless TrueHD, DTS-HD Master Audio, or a lossy format like AC-3 or AAC, FFmpeg must decode it and re-encode it into Opus for the WEBA container. At the default 128k bitrate, Opus delivers very good perceptual quality, but there is some generational loss if the source was already lossy. If your M2TS has a lossless audio track, increasing the bitrate to 192k or 256k will better preserve the original fidelity.
By default, FFmpeg selects the first audio stream in the M2TS file, which is typically the primary language track. If your Blu-ray rip contains additional tracks — such as a director's commentary, a secondary language, or a Dolby Atmos stream alongside a core AC-3 track — those will be ignored. WEBA does not support multiple audio tracks in a single file. To extract a specific track, you would add the '-map 0:a:1' flag to the command (replacing '1' with the zero-indexed track number you want).
Both WEBA and WebM use the same underlying Matroska-derived container and Opus audio encoding, but WEBA is the audio-only variant specifically designated for audio-only WebM content. The .weba extension signals to browsers and media players that the file contains no video stream, which is accurate since the -vn flag strips video entirely. Many modern browsers treat .weba and audio-only .webm files identically in the HTML5 audio element, but .weba is the semantically correct extension for this use case.
To adjust the audio bitrate, change the '-b:a 128k' value to your preferred rate, such as '-b:a 192k' or '-b:a 320k' — higher values preserve more detail from the original M2TS audio. To switch from Opus to Vorbis, replace '-c:a libopus' with '-c:a libvorbis'. Note that Opus generally outperforms Vorbis at equivalent bitrates, especially below 128k, so Opus is the better choice for most use cases. The full command would become: ffmpeg -i input.m2ts -c:a libvorbis -b:a 192k -vn output.weba
Yes. On Linux or macOS, you can use a shell loop: 'for f in *.m2ts; do ffmpeg -i "$f" -c:a libopus -b:a 128k -vn "${f%.m2ts}.weba"; done'. On Windows Command Prompt, use: 'for %f in (*.m2ts) do ffmpeg -i "%f" -c:a libopus -b:a 128k -vn "%~nf.weba"'. This is particularly useful for converting a collection of AVCHD clips or Blu-ray chapter files in bulk. The in-browser tool processes files one at a time, so the command-line approach is recommended for large batches.
No. WEBA is a pure audio-only format and does not support subtitles, chapters, or any video-related metadata. Even though M2TS files can carry subtitle streams and chapter information, the -vn flag and the WEBA container spec both preclude any of that data from being written to the output. If preserving subtitles or chapters is important, you would need to use a different output format such as MKV or MP4 that supports both audio and metadata containers.
Technical Notes
M2TS files originating from Blu-ray discs often contain audio in high-bitrate formats like DTS-HD Master Audio, TrueHD, or LPCM that FFmpeg must fully decode before re-encoding to Opus — this makes the conversion more CPU-intensive than a simple remux. AVCHD camcorder M2TS files more commonly carry AC-3 or AAC audio, which is less demanding to decode. The WEBA container uses the WebM profile of Matroska and enforces strict codec constraints — only libopus and libvorbis are permitted, so no codec passthrough from M2TS is ever possible for this conversion. Opus at 128k is highly efficient and suitable for most speech and music content, but if your source M2TS has a 5.1 or 7.1 surround audio track, be aware that Opus will encode the multi-channel audio by default — you may want to add '-ac 2' to downmix to stereo if your target playback environment is stereo-only. Metadata such as title tags from the M2TS file may not transfer reliably to the WEBA output due to differences in how transport streams and WebM containers handle metadata.