Extract Audio from WebM to ALAC — Free Online Tool
Extract audio from a WebM file and save it as ALAC — Apple's lossless audio format stored in an M4A container. Because ALAC is lossless, the audio is decoded from its original Opus or Vorbis codec and re-encoded without any quality ceiling, making this ideal for archiving or using WebM audio in Apple's ecosystem.
to
FFmpeg Command
Copy this command to run the same conversion locally with FFmpeg on your desktop. Download FFmpeg
Drop your WebM 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
WebM files typically carry audio encoded in Opus or Vorbis — both lossy codecs optimized for streaming efficiency. Since ALAC is a lossless format, FFmpeg cannot simply copy the compressed audio stream; it must fully decode the Opus or Vorbis audio to raw PCM and then re-encode it using the ALAC codec, which stores every decoded sample without further loss. The video stream is discarded entirely using the -vn flag. The resulting file is an M4A container (MPEG-4 Audio) holding a single ALAC track. Importantly, because the source audio was already lossy, the output is losslessly preserving the decoded version of that lossy signal — not recovering detail that was discarded during the original WebM encoding.
What Each Flag Does
| Flag | What it does |
|---|---|
ffmpeg
|
Invokes the FFmpeg binary. In the browser-based version of this tool, this runs via FFmpeg.wasm compiled to WebAssembly, so no files leave your machine. |
-i input.webm
|
Specifies the input WebM file. FFmpeg reads the Matroska-based container and identifies all streams — typically a VP9 video track and an Opus or Vorbis audio track. |
-vn
|
Disables video output entirely, discarding the VP9 video stream from the WebM. Since ALAC is audio-only and the goal is audio extraction, no video data is written to the output file. |
-c:a alac
|
Sets the audio codec to ALAC (Apple Lossless Audio Codec). FFmpeg decodes the source Opus or Vorbis stream to raw PCM and re-encodes it losslessly using ALAC, which is natively supported by Apple devices, iTunes, Logic Pro, and other Apple ecosystem software. |
output.m4a
|
Defines the output filename with the .m4a extension, which tells FFmpeg to wrap the ALAC audio stream in an MPEG-4 Audio container — the standard container for ALAC files and the format expected by Apple applications and devices. |
Common Use Cases
- Archiving the audio from a downloaded WebM lecture or documentary in a bit-perfect format that won't degrade through future re-encoding
- Importing audio from a WebM screen recording into GarageBand, Logic Pro, or Final Cut Pro, which natively support ALAC in M4A containers
- Adding a WebM-sourced audio track to an iTunes or Apple Music library while maintaining the highest fidelity the source allows
- Extracting a music performance or live concert recorded in WebM format and storing it in ALAC for long-term archival alongside a FLAC collection
- Preparing audio from a WebM podcast or interview recording for distribution on an Apple-centric production workflow where M4A/ALAC is the studio standard
- Converting a WebM game cutscene or ambient soundtrack rip into ALAC for use as a high-quality reference track during audio production
Frequently Asked Questions
No — ALAC is lossless, but it cannot recover audio detail that was already discarded when the WebM file was encoded using Opus or Vorbis. What ALAC guarantees is that the decoded output of those lossy streams is preserved perfectly, with no additional generation loss. Think of it as taking a photograph of a JPEG: the print is perfect, but the original compression artifacts are still there.
Opus and Vorbis in WebM are highly efficient lossy codecs — a 128 kbps Opus stream packs a lot of perceived quality into very few bytes. ALAC stores every decoded audio sample without compression shortcuts, so a typical ALAC file can be 5–10× larger than the equivalent Opus stream. This size increase is the expected tradeoff for lossless storage and is not a sign that anything went wrong.
No. ALAC stored in an M4A container supports only a single audio track. If your WebM file contains multiple audio tracks — for example, multiple language dubs — FFmpeg will extract the default track by default. To select a specific track from a multi-track WebM, you would need to add a stream selector flag such as -map 0:a:1 to the command before the output filename.
FFmpeg will attempt to copy compatible metadata tags during the conversion. WebM uses Matroska-style metadata, and M4A uses iTunes-style atom tags — FFmpeg maps common fields like title, artist, and album automatically. However, some WebM-specific tags or custom fields may not have a direct M4A equivalent and could be dropped. It is worth inspecting the output with a tag editor if metadata fidelity is important.
ALAC is a lossless codec and has no quality setting — every encode at a given bit depth is mathematically identical in terms of audio data. The ALAC codec does not accept -b:a or -q:a flags. The only meaningful audio parameter you can control is the sample rate or bit depth of the source, which FFmpeg will preserve from the WebM file by default. If you want to downsample, you would add a -ar flag, for example -ar 44100, before the output filename.
On the command line, you can loop over files using a shell one-liner. On Linux or macOS: for f in *.webm; do ffmpeg -i "$f" -vn -c:a alac "${f%.webm}.m4a"; done. On Windows Command Prompt: for %f in (*.webm) do ffmpeg -i "%f" -vn -c:a alac "%~nf.m4a". This runs the same conversion sequentially on every WebM file in the current directory, outputting a matching M4A file for each.
Technical Notes
The conversion pipeline decodes either Opus or Vorbis audio — whichever codec the WebM file carries — to 32-bit floating-point PCM internally, then re-encodes to ALAC at the source file's native sample rate and channel count. ALAC supports up to 8 channels and up to 32-bit integer samples at rates up to 384 kHz, so virtually all WebM audio configurations are accommodated without downgrading. The M4A container supports chapter metadata, which FFmpeg will preserve if the WebM source includes Matroska chapter markers. However, embedded subtitle streams and transparency metadata from the WebM have no representation in M4A and are silently discarded. WebM files sourced from platforms like YouTube often use Opus at 160 kbps; the resulting ALAC will be a lossless snapshot of that 160 kbps Opus decode, not a 320 kbps or CD-quality equivalent. For users running the command locally on files larger than 1 GB, no additional flags are needed beyond those shown — FFmpeg handles large M4A files correctly using the standard MPEG-4 muxer.