Convert M4A to OGA — Free Online Tool

Convert M4A files (Apple's AAC-based audio format) to OGA, an open Ogg container storing Vorbis audio. This tool transcodes your AAC audio stream to Vorbis using libvorbis at quality level 4, producing a royalty-free, open-standard audio file compatible with Linux media players, open-source applications, and web audio pipelines.

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

M4A files store audio — typically AAC-encoded — inside an MPEG-4 container, a format tied to Apple's ecosystem and patent-encumbered codecs. OGA uses the Ogg container with Vorbis (or FLAC/Opus) audio. Because AAC and Vorbis are fundamentally different codecs, this conversion is a full transcode: FFmpeg decodes the AAC stream from the M4A container into raw PCM audio, then re-encodes that PCM data using the libvorbis encoder and wraps the result in an Ogg container with the .oga extension. Since both the input and output are lossy formats, there is a small generation loss — the audio is decoded from one lossy format and compressed again into another. The default quality setting (-q:a 4) targets roughly 128–160 kbps variable bitrate Vorbis, which is perceptually transparent for most listeners coming from a 128k AAC source.

What Each Flag Does

Flag What it does
ffmpeg Invokes the FFmpeg program, the open-source multimedia processing engine that handles decoding the AAC audio from the M4A container and re-encoding it as Vorbis inside the Ogg container.
-i input.m4a Specifies the input file — an M4A file containing an AAC audio stream. FFmpeg reads the MPEG-4 container, identifies the AAC audio track, and feeds it into the decode pipeline.
-c:a libvorbis Tells FFmpeg to encode the audio stream using the libvorbis encoder, the reference implementation of the open, royalty-free Vorbis codec. This replaces the AAC codec from the source M4A with Vorbis audio suitable for the Ogg/OGA container.
-q:a 4 Sets the Vorbis variable bitrate quality level to 4 on a scale of 0–10. Quality 4 targets approximately 128–160 kbps VBR, which provides a good balance between file size and audio fidelity when transcoding from a typical 128k AAC source M4A.
output.oga Defines the output filename with the .oga extension. FFmpeg infers from this extension that the output should use the Ogg container format in its audio-only variant, wrapping the libvorbis-encoded stream.

Common Use Cases

  • Preparing music or podcast audio for a Linux-based media server (like Jellyfin or Navidrome) configured to prefer open-format Vorbis files over Apple's proprietary M4A
  • Supplying audio assets for a web application or game engine that requires open, royalty-free Ogg Vorbis files rather than AAC
  • Converting iTunes-purchased M4A audiobooks or music (after DRM removal) to an open format for long-term archiving without dependence on Apple software
  • Uploading audio to platforms that specifically require or prefer Ogg Vorbis, such as certain wikis, open-source game asset repositories, or Itch.io game projects
  • Replacing M4A tracks in an open-source project's asset folder to avoid any potential patent or licensing concerns around AAC distribution
  • Converting podcast episode downloads saved as M4A to OGA for playback in open-source players like VLC, Audacious, or Rhythmbox on GNU/Linux systems

Frequently Asked Questions

Yes, but only slightly in most real-world cases. Since M4A typically contains AAC audio and OGA contains Vorbis audio, this is a lossy-to-lossy transcode — the audio is decoded from AAC and re-encoded into Vorbis. The default -q:a 4 setting produces variable-bitrate Vorbis around 128–160 kbps, which is generally considered transparent for typical music or speech content sourced from a 128k AAC file. However, if your source M4A was encoded at a higher bitrate (256k or 320k), using a higher Vorbis quality level like -q:a 6 or -q:a 8 will better preserve the original fidelity.
Both .ogg and .oga use the same Ogg container format — the difference is purely the file extension convention. The .oga extension was introduced to specifically indicate audio-only Ogg files (typically Vorbis or FLAC), while .ogg was historically used for Vorbis audio but is now broadly used for any Ogg content including video (Theora). Most media players treat them identically, so an .oga file can usually be renamed to .ogg without any issue.
FFmpeg will attempt to map standard metadata tags (title, artist, album, track number, etc.) from the M4A's iTunes metadata atoms into Ogg's Vorbis comment format during conversion. However, iTunes-specific tags that have no Ogg Vorbis equivalent — such as gapless playback headers or iTunes podcast metadata — will be dropped. Chapter markers embedded in the M4A may not survive the conversion either, as Ogg chapter support is less universally implemented.
Replace the -q:a 4 value with a number from 0 to 10, where higher numbers produce better quality and larger files. For example, use -q:a 6 for approximately 192 kbps variable bitrate (a good choice for high-quality music from a 256k source), or -q:a 2 for around 96 kbps if file size is a priority. The full adjusted command would look like: ffmpeg -i input.m4a -c:a libvorbis -q:a 6 output.oga. Note that Vorbis quality levels are variable bitrate (VBR), so the actual file size will vary depending on the complexity of the audio content.
Yes. On Linux or macOS, you can use a shell loop: for f in *.m4a; do ffmpeg -i "$f" -c:a libvorbis -q:a 4 "${f%.m4a}.oga"; done. On Windows PowerShell, use: Get-ChildItem *.m4a | ForEach-Object { ffmpeg -i $_.FullName -c:a libvorbis -q:a 4 ($_.BaseName + '.oga') }. This applies the same codec and quality settings to every M4A file in the directory, producing a matching set of OGA files.
Yes, though the output would still involve one decode step from AAC (lossy) to PCM, so the FLAC in the OGA would be a lossless capture of the decoded AAC — not the original recording. To do this, change the command to: ffmpeg -i input.m4a -c:a flac output.oga. The resulting file will be significantly larger than a Vorbis-encoded OGA but can be useful if you want to store the best possible representation of the decoded audio without further lossy compression.

Technical Notes

The M4A container supports AAC as its primary codec, along with Apple Lossless (ALAC), but the vast majority of M4A files in the wild — iTunes downloads, podcast episodes, iPhone recordings — use AAC. The OGA container is restricted to Ogg-native codecs: Vorbis, FLAC, and Opus. There is no codec copy path available here; a full transcode is mandatory. The libvorbis encoder used in this command is the reference Vorbis implementation and produces high-quality VBR output at quality level 4 (approximately 128–160 kbps). M4A's gapless playback metadata (iTunSMPB tags) has no Ogg equivalent and will be discarded. Chapter markers present in M4A (commonly used in audiobooks and long-form podcasts) may not translate reliably into the Ogg chapter format depending on the player. Standard ID3-like metadata (title, artist, album, genre, track number) is remapped to Vorbis comment fields by FFmpeg automatically. Cover art embedded in M4A is not preserved in OGA, as Ogg Vorbis has no standardized mechanism for embedded cover images. If cover art preservation is important, consider using a separate tool to embed it after conversion using the METADATA_BLOCK_PICTURE Vorbis comment extension.

Related Tools