Extract Audio from AVI to OGA — Free Online Tool

Extract audio from AVI video files and save it as OGA (Ogg Audio), encoding the audio stream with the Vorbis codec at variable quality. This is ideal for pulling legacy AVI audio — often stored as MP3 or AAC — into an open, freely licensed Ogg container that works well with Linux media players and open-source workflows.

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

During this conversion, FFmpeg discards the AVI video stream entirely and re-encodes the audio stream from its original codec (typically MP3 via libmp3lame or AAC in an AVI file) into Vorbis audio wrapped in an OGA container. Because AVI's default audio codec (MP3/libmp3lame) is not natively compatible with the OGA/Ogg container, transcoding is required — the audio is decoded from its original compressed form and re-encoded as Vorbis. This means a small degree of generation loss occurs if the source audio is lossy. The output is a pure audio file with no video data, using Ogg's open container format with Vorbis's variable-bitrate encoding controlled by the -q:a quality scale.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg tool, which handles all media decoding, stream mapping, encoding, and container muxing for this AVI-to-OGA audio extraction.
-i input.avi Specifies the input AVI file. FFmpeg reads the AVI container and identifies its interleaved audio and video streams — in this case, typically a video stream (libx264 or similar) and an audio stream (commonly MP3 via libmp3lame).
-vn Disables video output entirely, ensuring that only the audio stream is processed and no video data is written to the OGA file. Since OGA is a pure audio container, this prevents any attempt to include the AVI's video stream.
-c:a libvorbis Selects the Vorbis encoder for the output audio stream. Because AVI's MP3 audio cannot be placed directly into an Ogg container, FFmpeg decodes it and re-encodes it as Vorbis — the default and most widely supported codec for OGA files.
-q:a 4 Sets the Vorbis variable-bitrate quality level to 4 on a scale of 0–10, which targets approximately 128 kbps and represents a balanced default between file size and audio fidelity. Higher values like 6 or 8 produce larger files with better quality.
output.oga Defines the output filename and tells FFmpeg to use the OGA (Ogg Audio) container format. The .oga extension signals that this is an audio-only Ogg file containing a Vorbis stream, as opposed to the more generic .ogg extension.

Common Use Cases

  • Extract a voice recording or commentary track from an old AVI screencast or lecture capture to use in an open-source podcast or audio project
  • Pull the audio from legacy AVI files archived on a Linux system and store it in a natively supported OGA format for playback in players like Rhythmbox or Amarok
  • Convert AVI game cutscene audio into OGA format for use in open-source game engines like Godot, which natively supports Ogg Vorbis audio
  • Strip the audio from an AVI home video and save it as OGA for archiving or editing in open-source audio tools like Audacity without carrying unnecessary video data
  • Extract multilingual audio tracks from AVI files (which support multiple audio tracks) and save individual Vorbis-encoded OGA files for each language
  • Prepare audio content from AVI tutorial videos for distribution on platforms or devices that prefer open, patent-free audio formats over MP3

Frequently Asked Questions

If your AVI file's audio is stored as MP3 or AAC (both lossy formats, which are the most common in AVI files), then yes — transcoding to Vorbis introduces a second generation of lossy compression. The quality loss is typically small at the default -q:a 4 setting, but it is not lossless. If pristine audio fidelity is critical, consider using the FLAC codec option within OGA instead, which produces a lossless output regardless of the lossy source.
Both .ogg and .oga use the same Ogg container format, but .oga is the officially designated extension for audio-only Ogg files, as standardized by Xiph.org. Using .oga makes it immediately clear to media players and file managers that the file contains audio only — no video — whereas .ogg is more ambiguous and historically associated with both audio and video Ogg files. Most modern players that support Ogg will handle .oga files without issue.
By default, FFmpeg selects the first (default) audio stream from the AVI file. AVI does support multiple audio tracks, and FFmpeg will pick stream index 0:a unless you specify otherwise. If you need a different audio track, you can modify the command by adding -map 0:a:1 (for the second audio track) before the output filename. Note that OGA does not support multiple audio tracks in a single file, so each track must be extracted to a separate OGA file.
The audio quality is controlled by the -q:a flag, which uses Vorbis's variable-bitrate quality scale ranging from 0 (lowest quality, smallest file) to 10 (highest quality, largest file). The default value of 4 corresponds to roughly 128 kbps and is a solid general-purpose setting. For higher quality, use -q:a 6 or -q:a 8; for smaller file sizes at acceptable quality, try -q:a 2. Replace the 4 in the command with your chosen value: ffmpeg -i input.avi -vn -c:a libvorbis -q:a 6 output.oga
Yes — OGA supports FLAC as an alternative codec alongside Vorbis and Opus. To use FLAC for lossless audio output, replace -c:a libvorbis -q:a 4 with -c:a flac in the command: ffmpeg -i input.avi -vn -c:a flac output.oga. This is especially worthwhile if your AVI source contains lossless or high-bitrate audio and you want to preserve it without further compression loss. Keep in mind that FLAC files will be significantly larger than Vorbis-encoded equivalents.
AVI has limited and inconsistent metadata support — it uses the RIFF INFO chunk for basic tags, which FFmpeg will attempt to read and map to the output. OGA (via the Ogg container) uses Vorbis Comment tags, which are more expressive and well-supported. FFmpeg will transfer compatible metadata fields such as title, artist, and date automatically during the conversion, but AVI files in the wild often contain no metadata at all, so your OGA file may come out with empty tags that you'll need to fill in manually using a tag editor.

Technical Notes

AVI files most commonly store audio using the libmp3lame (MP3) codec, making it the default in the AVI specification used here. Since MP3 is a lossy format and cannot be placed directly into an Ogg container, FFmpeg must fully decode the audio and re-encode it as Vorbis — there is no stream copy shortcut available for this conversion. The Vorbis codec in OGA uses a quality-based VBR system (via -q:a) rather than a fixed bitrate, which tends to produce more consistent perceptual quality than CBR encoding. OGA does not support video streams at all, so the -vn flag is technically redundant but serves as an explicit safeguard to prevent any unexpected video stream handling. One notable limitation of OGA is that it supports only a single audio track per file, meaning multi-track AVI sources require separate extraction passes. OGA's Ogg container does support chapter markers (unlike AVI), but FFmpeg will not synthesize chapter data from an AVI source that has none. The resulting OGA file is widely compatible with open-source and Linux-native media players, Godot Engine, and any player supporting the Xiph.org codec family, but may not play natively on Windows without additional codecs or on older iOS/Android devices.

Related Tools