Extract Audio from MP4 to OGA — Free Online Tool
Extract audio from an MP4 video and save it as an OGA file using the Ogg Vorbis codec — a fully open, patent-free audio format well-suited for web applications and Linux-based workflows. Vorbis delivers excellent perceptual quality at moderate bitrates, making it an efficient alternative to AAC or MP3 for open-source ecosystems.
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 reads the MP4 container and discards the video stream entirely using the -vn flag. The original audio track — most commonly AAC in an MP4 file — is then decoded and re-encoded into the Vorbis codec, which is wrapped in the Ogg container to produce the OGA file. Because Vorbis is a fundamentally different codec from AAC, a full transcode (decode then re-encode) is required rather than a simple remux. The quality of the output Vorbis audio is controlled by a variable bitrate quality scale (-q:a), where the default setting of 4 targets approximately 128–160 kbps and delivers clean, transparent audio for most source material. Any chapters embedded in the MP4 are preserved in the OGA container, but subtitle tracks and multiple audio tracks from the source MP4 are not carried over, as OGA supports only a single audio stream.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg binary — the open-source multimedia processing engine that powers this conversion both in the browser (via FFmpeg.wasm) and on the desktop command line. |
-i input.mp4
|
Specifies the input file: an MP4 container that typically holds an H.264 video stream and an AAC audio stream. FFmpeg reads both streams from this file before deciding which to keep or discard. |
-vn
|
Disables video output entirely, ensuring that the MP4's video stream is stripped and not included in the OGA file. This is essential because OGA is an audio-only container and cannot hold video data. |
-c:a libvorbis
|
Selects the libvorbis encoder to re-encode the decoded AAC audio from the MP4 into the Ogg Vorbis format — a patent-free, open-source lossy audio codec developed by Xiph.Org and natively supported by the OGA container. |
-q:a 4
|
Sets the Vorbis variable bitrate quality level to 4 on a 0–10 scale, which targets approximately 128–160 kbps and represents a balanced default between file size and audio fidelity suitable for both music and speech content. |
output.oga
|
Defines the output filename with the .oga extension, which signals to FFmpeg to use the Ogg container and explicitly identifies the file as an audio-only Ogg stream, as distinct from .ogv (video) or the more generic .ogg extension. |
Common Use Cases
- Extracting a talk or lecture from an MP4 recording to distribute as an OGA audio file on a Linux-based podcast platform or open-source media server like Funkwhale
- Stripping audio from MP4 game recordings or demos to create Vorbis sound assets for use in open-source game engines like Godot, which natively prefer OGA/Vorbis files
- Converting MP4 interview recordings to OGA for archiving in open-format digital libraries or repositories that mandate patent-unencumbered audio codecs
- Pulling the audio track from an MP4 music video to produce a standalone OGA file for playback in open-source media players such as VLC or Rhythmbox on Linux
- Reducing storage footprint of MP4 video files by extracting only the audio commentary or narration track as a compact OGA file for review or transcription workflows
- Preparing Vorbis-encoded audio assets from MP4 source footage for embedding in HTML5 web applications that target browsers with native Ogg support
Frequently Asked Questions
Yes, some quality loss is unavoidable because the audio undergoes a generation-loss transcode: the AAC audio in the MP4 is fully decoded and then re-encoded into Vorbis. Both AAC and Vorbis are lossy codecs, so transcoding between them introduces a second round of compression artifacts. At the default -q:a 4 setting (roughly 128–160 kbps VBR), the result is generally transparent for speech and acceptable for music, but audiophiles working from high-quality source material may want to raise the quality to -q:a 6 or higher to minimize perceptible degradation.
OGA and OGG both use the same Ogg container format — the difference is purely in the file extension convention. OGG is a generic extension often associated with Vorbis audio, while OGA was introduced as a more precise extension to explicitly denote audio-only Ogg files, distinguishing them from OGV (Ogg video) files. In practice, OGA files play in any application that supports OGG. Use OGA when you want to be semantically explicit that the file contains only audio, which is the case for every file produced by this tool.
By default, FFmpeg selects the first (or 'best') audio stream from the MP4. If your MP4 contains multiple audio tracks — for example, a director's commentary alongside the main audio — you can target a specific stream by adding -map 0:a:1 to the command to select the second audio track (zero-indexed). Since OGA supports only a single audio stream, you can only extract one track per output file, so you would need to run the command separately for each desired track.
Adjust the -q:a value to control Vorbis output quality. The scale runs from 0 (lowest, approximately 64 kbps) to 10 (highest, approximately 500 kbps), with 4 as the default targeting around 128–160 kbps VBR. For music where transparency matters, -q:a 6 (roughly 192 kbps) or -q:a 8 (roughly 256–320 kbps) are strong choices. For speech-only content like podcasts or lectures, -q:a 2 or -q:a 3 is usually sufficient and keeps file sizes small. Unlike MP3 or AAC, Vorbis uses variable bitrate encoding at every quality level, so the actual bitrate will fluctuate based on audio complexity.
FFmpeg will attempt to copy standard metadata tags — such as title, artist, album, and date — from the MP4 container into the OGA file's Vorbis comment metadata block, which is the native tagging format for Ogg-based files. However, MP4-specific metadata structures (such as iTunes-style atoms or cover art embedded as a video stream) may not transfer cleanly. It is good practice to verify metadata in the output file using a tag editor like MusicBrainz Picard or EasyTAG after conversion, especially if accurate tagging is important for your workflow.
Yes. On Linux or macOS, you can use a shell loop to process multiple files at once: for f in *.mp4; do ffmpeg -i "$f" -vn -c:a libvorbis -q:a 4 "${f%.mp4}.oga"; done. On Windows Command Prompt, the equivalent is: for %f in (*.mp4) do ffmpeg -i "%f" -vn -c:a libvorbis -q:a 4 "%~nf.oga". Each file is processed sequentially, and the output OGA file is named to match the source MP4. This is particularly useful for large batch jobs on files over 1GB that exceed the browser tool's capacity.
Technical Notes
The MP4-to-OGA pipeline involves a mandatory audio transcode because Vorbis is not a native codec option within the MP4/ISOBMFF container, and AAC is not a valid codec for the Ogg container — meaning no codec copy shortcut is possible here. The Vorbis encoder used by FFmpeg (libvorbis) implements the reference Xiph.Org encoder and produces fully spec-compliant Ogg Vorbis files. The OGA format supports chapters via Ogg skeleton or Vorbis comment chapter markers, which FFmpeg will carry over if they exist in the source MP4. However, OGA cannot carry subtitle tracks, embedded video thumbnails, or multiple simultaneous audio streams from the source — all of these are silently dropped during conversion. One practical limitation worth noting is that OGA/Vorbis has weaker support in Apple ecosystems: Safari and iOS do not support Vorbis natively, so if cross-platform browser or device playback is a priority, OGG Opus (-c:a libopus) or a different output format may be more appropriate. File sizes will vary considerably depending on the source audio's dynamic range and complexity, since Vorbis VBR encoding allocates bits adaptively.