Extract Audio from WebM to WEBA — Free Online Tool

Extract the audio track from a WebM video file and save it as a WEBA file — an audio-only WebM container holding Opus-encoded audio. Because both the source WebM and the WEBA output share the same Opus codec, the audio is typically passed through with minimal reprocessing, preserving web-optimized quality at compact file sizes.

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

WebM files commonly carry audio encoded with Opus (or occasionally Vorbis) alongside a VP9 video stream. This tool strips the video entirely using the -vn flag and writes only the audio stream into a WEBA container — essentially a WebM file with no video track. When the source audio is already Opus (the default for WebM), FFmpeg re-encodes it to the target bitrate using libopus. The WEBA output is a legitimate WebM container recognized by browsers natively, making it immediately playable in Chrome, Firefox, and Edge without any plugins.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg binary — the open-source multimedia processing engine that handles all demuxing, decoding, encoding, and remuxing operations for this WebM-to-WEBA conversion.
-i input.webm Specifies the input WebM file, which typically contains a VP9 video stream and an Opus or Vorbis audio stream inside a Matroska-based container.
-vn Disables video stream processing entirely, ensuring no VP9 video data from the WebM source is mapped or written into the WEBA output file.
-c:a libopus Encodes the output audio using the libopus encoder, producing Opus audio — the modern, royalty-free codec native to the WebM/WEBA ecosystem and natively supported by all major browsers.
-b:a 128k Sets the Opus audio bitrate to 128 kilobits per second, a balance suitable for music and general-purpose audio; Opus at 128k typically sounds better than MP3 or AAC at the same bitrate.
-vn A second explicit -vn flag on the output side, redundantly reinforcing that no video stream should be written to the WEBA container — standard practice when producing audio-only WebM output.
output.weba The output filename with the .weba extension, which signals to FFmpeg to use the WebM muxer configured for audio-only output, producing a file immediately playable in HTML5-compatible browsers.

Common Use Cases

  • Pull the audio commentary or narration from a WebM screen recording to produce a standalone audio file for a podcast or voiceover project
  • Extract the music or soundtrack from a WebM video downloaded from a web platform (such as a VP9/Opus stream) to keep an audio-only copy for offline listening
  • Reduce the storage footprint of a large WebM lecture or conference recording by saving only the audio track as a compact WEBA file
  • Prepare Opus audio in a WEBA container for direct embedding in an HTML5 web page using the <audio> element, taking advantage of native browser support
  • Isolate a specific audio track from a multi-track WebM file for editing or archiving without re-encoding the video
  • Create a lightweight audio preview of a WebM video asset for use in a web application where video playback is unnecessary

Frequently Asked Questions

Even though the Opus codec is shared between WebM and WEBA, FFmpeg re-encodes the audio stream to the specified bitrate (128k by default) rather than performing a pure stream copy. This means there is a generation of quality loss. If you want to avoid any re-encoding, you can replace '-c:a libopus -b:a 128k' with '-c:a copy' in the FFmpeg command, which will copy the Opus stream byte-for-byte into the WEBA container — though only if the source audio is already Opus.
WEBA is simply a WebM container that holds only audio — no video stream is present. Because it uses the standard WebM format with Opus or Vorbis audio, it plays natively in all major modern browsers (Chrome, Firefox, Edge, and Opera) using the HTML5 <audio> element. Safari has limited WebM support, so WEBA files may not play on Apple devices without a third-party player.
If your WebM file uses Vorbis instead of Opus for its audio track, FFmpeg will transcode it to Opus using libopus at the specified bitrate. The WEBA output will always contain Opus audio by default with this command. If you need to preserve Vorbis encoding in the WEBA output, you can change the codec flag to '-c:a libvorbis', since WEBA does support Vorbis as an alternative codec.
Adjust the value after '-b:a' to control audio bitrate. For speech or podcasts, 64k or 96k provides good quality at very small file sizes. For music, 128k (the default) is a reasonable balance, while 192k or 256k offers noticeably better fidelity. Opus is exceptionally efficient at low bitrates, so even 96k Opus often sounds comparable to 128k MP3. The full modified flag would look like: '-b:a 192k'.
The displayed command processes a single file, but you can batch process in a shell loop. On Linux or macOS: 'for f in *.webm; do ffmpeg -i "$f" -vn -c:a libopus -b:a 128k -vn "${f%.webm}.weba"; done'. On Windows PowerShell: 'Get-ChildItem *.webm | ForEach-Object { ffmpeg -i $_.FullName -vn -c:a libopus -b:a 128k -vn ($_.BaseName + ".weba") }'. This is particularly useful for processing collections of WebM recordings larger than 1GB that can't be handled in the browser.
The size reduction depends entirely on how much of the original WebM's data was occupied by the VP9 video stream. For typical web video, the video track accounts for 80–95% of the file size, so a WEBA file containing only 128k Opus audio will often be 10–20 times smaller than the source WebM. A 100MB WebM video might yield a WEBA file of 5–12MB, depending on the video's duration and original video bitrate.

Technical Notes

WEBA is a strict subset of the WebM container specification — it is structurally identical to WebM but carries no video track. The format officially supports two audio codecs: Opus (via libopus) and Vorbis (via libvorbis). Opus is strongly preferred for new content because it delivers better quality per bit at all bitrates, particularly below 128k, and has lower latency characteristics valuable for streaming. The -vn flag appears twice in the resolved command; the first occurrence suppresses video stream mapping during input analysis, and the second ensures no video is written to the output — this redundancy is harmless and guarantees video exclusion regardless of stream mapping edge cases. Metadata embedded in the source WebM (such as title, artist, or comment tags stored in the Matroska-compatible header) is generally preserved in the WEBA output by FFmpeg's default behavior. However, chapter markers and subtitle streams present in the WebM source are dropped, since WEBA does not support those features. If the WebM source contains multiple audio tracks, FFmpeg will select the default audio stream; use '-map 0:a:1' (adjusting the index) to target a specific track.

Related Tools