Extract Audio from MP4 to OGG — Free Online Tool
Extract audio from an MP4 video and save it as an OGG file encoded with Vorbis — an open, patent-free codec well-suited for web players, Linux applications, and open-source media pipelines. The video stream is discarded entirely and only the audio is re-encoded, resulting in a compact, royalty-free audio file.
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
MP4 files typically carry AAC or MP3 audio alongside a video stream. During this conversion, FFmpeg reads the MP4 container, discards the video stream entirely using the -vn flag, and re-encodes the audio track from its original codec (usually AAC) into Vorbis using the libvorbis encoder. The result is written into an OGG container — a fully open format developed by Xiph.Org. Because AAC and Vorbis use fundamentally different compression algorithms, re-encoding is unavoidable; this is a transcode, not a remux. The default quality setting (-q:a 4) targets a variable bitrate of roughly 128–160 kbps, which is transparent for most listeners at the cost of a modest increase in processing time compared to a simple stream copy.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg program, the open-source multimedia processing engine that powers this conversion. In the browser, this runs via FFmpeg.wasm, a WebAssembly port that executes the same logic locally without any server upload. |
-i input.mp4
|
Specifies the input file — an MP4 container that typically holds a video stream and an AAC or MP3 audio stream. FFmpeg reads all available streams from this file before applying the output options that follow. |
-vn
|
Stands for 'video none' — instructs FFmpeg to ignore and discard all video streams from the MP4. Since the goal is audio-only OGG output, this prevents the video track from being processed or accidentally included in the output. |
-c:a libvorbis
|
Selects the libvorbis encoder to transcode the audio. Because the MP4's audio (typically AAC) uses a different compression algorithm than Vorbis, a full decode-and-re-encode is required here rather than a fast stream copy. Vorbis is the standard audio codec for OGG and has the broadest compatibility across players and platforms that support the format. |
-q:a 4
|
Sets the Vorbis variable bitrate quality level to 4 on a 0–10 scale, which targets approximately 128–160 kbps. This is a balanced default that produces audio transparent to most listeners while keeping file sizes reasonable — suitable for both music and speech content extracted from MP4 recordings. |
output.ogg
|
Defines the output filename and tells FFmpeg to write the result into an OGG container. The .ogg extension signals that the file uses the Xiph.Org OGG format, which will hold the newly encoded Vorbis audio stream along with any metadata mapped from the original MP4. |
Common Use Cases
- Stripping the audio track from an MP4 lecture or webinar recording to publish as a podcast episode on platforms that accept OGG, such as self-hosted podcast RSS feeds or open-source podcast apps
- Preparing audio assets for an HTML5 web game or interactive site that serves OGG as the open-format fallback alongside MP3 for broader browser compatibility
- Extracting a music performance or live concert video's audio into OGG for playback in Linux media environments like Rhythmbox, Clementine, or VLC, where Vorbis is a first-class citizen
- Converting video game cutscene audio ripped from MP4 format into OGG files for use in open-source game engines such as Godot, which natively prefers OGG Vorbis for streaming audio
- Archiving the audio commentary track from an MP4 documentary into a compact, patent-free OGG file for long-term storage without codec licensing concerns
- Isolating a voiceover or narration track from an MP4 screen recording to re-use in a different video project or upload to an open-source audio hosting platform
Frequently Asked Questions
Yes, there will be a small quality loss because this conversion involves two stages of lossy compression: the original AAC audio in the MP4 is decoded to uncompressed PCM, then re-encoded into Vorbis. Each generation of lossy encoding introduces some additional artifacts. At the default -q:a 4 setting (approximately 128–160 kbps variable bitrate), the degradation is subtle and inaudible to most listeners, but it is not lossless. If you need to preserve maximum fidelity, consider using the FLAC codec inside OGG (-c:a flac) instead.
Vorbis is the traditional and most widely compatible audio codec for OGG containers, and it is the default libvorbis codec in this tool. Opus is a newer, more efficient codec that delivers better quality at lower bitrates, but Vorbis has broader legacy support across older players and platforms. If you are targeting modern applications — especially web browsers or Godot 4 — you may prefer Opus. You can switch codecs by modifying the FFmpeg command to use -c:a libopus and replacing the -q:a flag with -b:a for a target bitrate like 128k.
FFmpeg will attempt to copy compatible metadata tags from the MP4 container into the OGG file's Vorbis comment block, which is OGG's native metadata system. Standard tags like title, artist, album, and date typically transfer correctly. However, MP4-specific metadata fields — such as iTunes-style atom tags or chapter markers embedded in proprietary formats — may not map perfectly, and some fields could be dropped or renamed. You should verify the output tags with a tool like MediaInfo or a tag editor after conversion.
By default, FFmpeg selects the first audio stream in the MP4, which is typically the primary language track. If your MP4 contains multiple audio tracks — such as a director's commentary or an alternate language dub — you can target a specific one by adding -map 0:a:1 to the command to select the second audio track (zero-indexed), for example: ffmpeg -i input.mp4 -vn -map 0:a:1 -c:a libvorbis -q:a 4 output.ogg.
The -q:a flag controls Vorbis quality on a scale from 0 (lowest, around 64 kbps) to 10 (highest, around 500 kbps), with 4 as the default (roughly 128–160 kbps). To increase quality, raise the value — for example, -q:a 6 targets approximately 192–224 kbps and is a good choice for music. To reduce file size at the cost of quality, lower it — -q:a 2 targets around 96 kbps and is adequate for speech-only content like podcasts or voiceovers.
Yes. On Linux or macOS, you can use a shell loop: for f in *.mp4; do ffmpeg -i "$f" -vn -c:a libvorbis -q:a 4 "${f%.mp4}.ogg"; done. On Windows Command Prompt, use: for %f in (*.mp4) do ffmpeg -i "%f" -vn -c:a libvorbis -q:a 4 "%~nf.ogg". This is especially useful for large batches or files over 1GB that exceed the browser tool's processing scope.
Technical Notes
OGG is a purely open and patent-free container, and Vorbis is similarly unencumbered by royalty obligations — making this output format a strong choice for projects that require license-clean audio, such as open-source software distributions or freely licensed media archives. The libvorbis encoder uses variable bitrate (VBR) encoding by default when the -q:a flag is used, meaning the actual file size will vary depending on the complexity of the audio content: dense music will produce larger files than sparse speech at the same quality setting. One notable limitation is that OGG Vorbis does not support gapless playback between tracks as seamlessly as formats like FLAC or MP3 with LAME's gapless extensions, which matters for album rips. OGG does support chapter markers (-map_chapters 0 can be added to the command), but subtitle tracks present in the MP4 are not transferable to OGG since the format has no subtitle container support. If the source MP4 uses a variable frame rate or has a corrupted audio stream, FFmpeg may emit warnings about timestamp discontinuities; adding -async 1 to the command can help resync audio in such cases.