Convert MP4 to WEBA — Free Online Tool
Extract and convert the audio track from an MP4 video into a WEBA file — a lightweight, web-optimized audio container encoded with the Opus codec. Ideal for stripping video to get high-quality, low-bitrate audio perfectly suited for web streaming and browser-based playback.
to
FFmpeg Command
Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg
Drop your MP4 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
During this conversion, FFmpeg discards the video stream entirely and extracts only the audio from the MP4 container. The audio — which in MP4 is typically AAC or MP3 — is then re-encoded using the Opus codec (libopus) and wrapped in a WebM-based WEBA container. This is a full transcode of the audio stream: AAC is decoded to raw PCM audio and then re-encoded as Opus at the target bitrate (default 128k). Opus is a modern, royalty-free codec developed by Xiph.Org and standardized by the IETF, and it consistently outperforms AAC and MP3 at equivalent or lower bitrates, especially below 128k. The resulting WEBA file contains no video data and is significantly smaller than the original MP4.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg command-line tool. When run in the browser, this is executed via FFmpeg.wasm, a WebAssembly port of FFmpeg that processes your MP4 file entirely locally without any server upload. |
-i input.mp4
|
Specifies the input file — your source MP4 video, which typically contains a video stream and one or more audio streams encoded in formats like H.264/AAC. |
-c:a libopus
|
Sets the audio codec to Opus via the libopus encoder. This transcodes the MP4's audio (typically AAC) into the Opus format, which is royalty-free, optimized for web delivery, and the standard codec for WEBA files. |
-b:a 128k
|
Sets the audio bitrate to 128 kilobits per second for the Opus encoder. At 128k, Opus delivers near-transparent audio quality for both music and speech — generally matching or exceeding AAC at the same bitrate. |
-vn
|
Disables video output entirely. This is required because WEBA is an audio-only container — it instructs FFmpeg to ignore the video stream from the MP4 and write only the re-encoded Opus audio to the output file. |
output.weba
|
The output filename with the .weba extension. FFmpeg uses this extension to select the WebM muxer configured for audio-only output, producing a file that browsers can play natively via the HTML5 <audio> element. |
Common Use Cases
- Extract a conference talk or lecture recorded as an MP4 to create a WEBA audio file for embedding directly in a web page using the HTML5 <audio> element
- Pull the music or soundtrack from an MP4 music video for streaming on a web-based audio player that accepts WebM/WEBA format
- Convert a screen recording's audio narration to WEBA to use as a lightweight voiceover asset in a browser-based video editor or web app
- Strip audio from MP4 podcast video recordings to distribute a smaller, audio-only WEBA file optimized for low-bandwidth web listeners
- Extract game audio or sound effects captured in MP4 format and convert to Opus-encoded WEBA for use in HTML5 games via the Web Audio API
- Convert an MP4 interview recording to WEBA to reduce file size for archiving audio content on a web server where storage and bandwidth costs matter
Frequently Asked Questions
Yes, this is a lossy-to-lossy transcode. The original MP4 typically contains AAC audio, which is decoded to raw PCM and then re-encoded as Opus. Each generation of lossy encoding introduces some quality degradation. However, Opus is an exceptionally efficient codec — at 128k, Opus audio is generally considered transparent (indistinguishable from the source) for most content, and it often sounds better than AAC at the same bitrate. For casual listening and web use, the quality loss is negligible at 128k and above.
WEBA is essentially a WebM container restricted to audio-only content — it uses the same underlying WebM/Matroska container format but carries no video stream. The .weba extension signals to browsers and media players that the file is audio-only, typically encoded with Opus or Vorbis. A standard .webm file can contain both video and audio tracks, while .weba is the audio-only counterpart, similar to how .m4a is the audio-only variant of .mp4.
Metadata handling depends on FFmpeg's mapping behavior during the conversion. Basic tags like title, artist, and comment that exist in the MP4 may be carried over into the WebM container, but not all MP4 metadata fields have direct equivalents in WebM. Chapter markers and subtitle tracks from the MP4 are not supported in WEBA and will be dropped. If preserving metadata is critical, you should verify the output file's tags after conversion.
Change the value after the -b:a flag in the command. For example, use -b:a 64k for a much smaller file suitable for speech content like podcasts or voiceovers, or -b:a 192k for higher fidelity music. One of Opus's strengths is that it remains intelligible and pleasant even at 64k — lower than most AAC or MP3 encoders can achieve for the same perceived quality. For speech-only content, 64k Opus is generally sufficient; for music, 128k or higher is recommended.
The single-file command shown here processes one file at a time, but you can batch process using a shell loop. On Linux or macOS, run: for f in *.mp4; do ffmpeg -i "$f" -c:a libopus -b:a 128k -vn "${f%.mp4}.weba"; done. On Windows Command Prompt: for %f in (*.mp4) do ffmpeg -i "%f" -c:a libopus -b:a 128k -vn "%~nf.weba". This applies the same Opus encoding settings to every MP4 in the current directory.
Opus in a WebM/WEBA container is natively supported in Chrome, Firefox, Edge, and Opera. Safari added Opus support in Safari 16.4 (released March 2023), so modern Apple devices and browsers now support it as well. Older Safari versions (pre-16.4) and some legacy mobile browsers may not play WEBA files natively. If broad compatibility with older Apple ecosystems is a concern, consider using AAC in an M4A container instead.
Technical Notes
The key technical detail of this conversion is the audio codec switch from AAC (the default in MP4) to Opus (libopus). Opus was designed specifically for internet audio — it adapts efficiently across a wide range of bitrates from 6k to 510k and excels at both speech and music. The -vn flag is essential here: it explicitly disables video output, which is necessary because WEBA is an audio-only container and FFmpeg would otherwise attempt to include video. Without -vn, the conversion would fail or produce an invalid file since the WebM/WEBA muxer in this configuration does not accept a video stream. The WEBA container inherits WebM's streaming-friendly design, supporting HTTP range requests and progressive playback in browsers. One notable limitation is that WEBA does not support embedded chapter markers, multiple audio tracks, or subtitle tracks — any of these features present in the source MP4 will be silently discarded. The resulting WEBA file will typically be smaller than the original MP4, both because video data is removed and because Opus achieves competitive quality at lower bitrates than AAC.