Extract Audio from AVI to WEBA — Free Online Tool

Extract the audio track from an AVI file and convert it to WEBA format, encoding it as Opus audio inside a WebM container. This is ideal for pulling legacy AVI audio — often MP3 or AAC — into a modern, web-optimized format with excellent compression efficiency at low bitrates.

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

AVI files store interleaved audio and video streams in Microsoft's legacy RIFF-based container. During this conversion, the video stream is completely discarded (no video decoding occurs) and only the audio stream is processed. Because AVI typically encodes audio as MP3 or AAC and WEBA requires either Opus or Vorbis, the audio must be fully re-encoded — it cannot simply be copied. The audio is decoded from its original AVI codec and then re-encoded using the libopus encoder into a .weba file, which is an audio-only WebM container. Opus is a modern codec designed for both speech and music, and it typically achieves better quality than MP3 at equivalent or lower bitrates.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg binary. In the browser-based tool this runs via FFmpeg.wasm (WebAssembly); when run locally on your desktop it calls the installed FFmpeg executable.
-i input.avi Specifies the input file as an AVI container. FFmpeg parses the RIFF-based AVI structure to identify and demux the interleaved audio and video streams it contains.
-vn Disables video output, telling FFmpeg to ignore and discard the video stream from the AVI file entirely. This is essential for producing an audio-only WEBA file and avoids any unnecessary video decoding.
-c:a libopus Selects the libopus encoder for the audio stream. This re-encodes the AVI's audio — typically MP3 or AAC — into Opus, the modern lossy codec used in WEBA files, which is required because Opus is the only codec natively expected by the WEBA/WebM container.
-b:a 128k Sets the Opus audio bitrate to 128 kilobits per second. At this bitrate, Opus produces transparent or near-transparent quality for most music and speech content, while keeping the output file substantially smaller than the original AVI.
-vn A second instance of the video-disable flag, which is redundant but harmless in this command. FFmpeg applies it without error; if running this command locally you may safely remove this duplicate occurrence.
output.weba Specifies the output filename with the .weba extension. FFmpeg uses this extension to select the WebM muxer configured in audio-only mode, producing a WEBA file containing the Opus-encoded audio stream.

Common Use Cases

  • Extracting the audio commentary or narration from an old AVI screen recording to host as a podcast or voiceover file on a website
  • Pulling music or sound effects stored in legacy AVI format from a game or multimedia archive and converting them to a web-playable format
  • Converting AVI tutorial videos to audio-only WEBA files for use in HTML5 audio elements without needing a full video player
  • Extracting interview or lecture audio from AVI camcorder footage to produce lightweight audio files for streaming on a web platform
  • Archiving the audio content of old AVI home videos into a compact, modern format while discarding the large, often low-quality video stream
  • Preparing audio assets from legacy AVI media libraries for use in web applications that rely on the WebAudio API or MediaSource Extensions

Frequently Asked Questions

Yes, this conversion involves lossy re-encoding. The original AVI audio — typically MP3 or AAC — must be fully decoded and then re-encoded as Opus. Each re-encoding step introduces some quality degradation. However, Opus is a highly efficient modern codec, and at 128k the output quality is generally excellent for both speech and music. If the original AVI audio was already at a low bitrate, that quality ceiling cannot be recovered by the conversion.
WEBA supports both Opus and Vorbis, but Opus is the default because it is technically superior in almost every measurable way. Opus delivers better audio quality than Vorbis at the same bitrate, especially at lower bitrates below 128k, and it has lower latency. Vorbis is an older codec that was common in early WebM adoption, but Opus has since replaced it as the recommended choice for new WebM audio content.
WEBA files are supported natively in Chrome, Firefox, and Edge, which all have built-in Opus and WebM decoding. Safari added WebM and Opus support in version 15 (released 2021), so modern Safari versions can also play WEBA files. However, older Safari versions and some legacy mobile browsers do not support the format, so if broad compatibility is critical, MP3 or AAC may be safer choices.
AVI supports multiple audio tracks, but WEBA does not. By default, FFmpeg will select and convert only the first (primary) audio track from the AVI file. Any additional audio tracks present in the source AVI — such as alternate language tracks — will be silently ignored and not included in the output WEBA file. If you need a specific non-primary audio track, you would need to add the -map flag to the command to explicitly select it.
The -b:a flag controls the audio bitrate. Replace 128k in the command with a lower value like 64k or 96k for a smaller file (suitable for speech or podcasts) or a higher value like 192k, 256k, or 320k for better fidelity with music. For example: ffmpeg -i input.avi -vn -c:a libopus -b:a 96k -vn output.weba. Note that Opus is unusually efficient and 96k Opus often sounds comparable to 192k MP3.
This is a quirk of how the command was constructed. The -vn flag tells FFmpeg to exclude the video stream from the output, and appearing once before the codec flags would be sufficient. The duplicate -vn at the end is redundant but harmless — FFmpeg processes it without error and the behavior is identical to using -vn only once. If you are running this command locally, you can safely remove one of the -vn flags.

Technical Notes

AVI's audio stream is almost always encoded as MP3 (libmp3lame) or occasionally AAC, neither of which can be stored in a WebM/WEBA container. This means a full audio transcode is unavoidable — unlike some container-to-container conversions where streams can be copied directly. The libopus encoder used here is the reference implementation of the Opus codec (RFC 6716) and produces excellent results at bitrates as low as 64k. One limitation worth noting is that AVI stores timing information using a fixed frame-rate model, which can occasionally cause minor audio sync metadata differences after extraction, though this is invisible in audio-only playback. WEBA files do not support chapter markers, embedded lyrics, or rich ID3-style metadata — only basic Vorbis comment tags (title, artist, album, etc.) are possible in the WebM container. If the source AVI file contained metadata in its INFO chunk, that metadata will not be automatically transferred and would need to be added manually with -metadata flags. File size for the WEBA output will be significantly smaller than the original AVI, since the entire video stream is removed and Opus compression is more efficient than the legacy audio codecs typically found in AVI files.

Related Tools