M4A to Opus Converter

Inspect any audio file in your browser to see its duration, size, and sample rate — then copy the ready-to-run FFmpeg command to convert it from M4A to Opus.

Audio File Inspector

Drop or select any audio file. It is decoded locally in your browser — no data is uploaded to any server.

FFmpeg Command Generator

Also accepts .mp4 or any M4A-containing MPEG-4 file.

ffmpeg -i "input.m4a" -c:a libopus -b:a 96k -vbr on "input.opus"

Install FFmpeg free at ffmpeg.org. Run this command in your terminal after replacing the file name.

Batch convert M4A files (Linux / macOS)

for f in *.m4a; do ffmpeg -i "$f" -c:a libopus -b:a 96k -vbr on "${f%.m4a}.opus"; done

Batch convert MP4 audio files (Linux / macOS)

for f in *.mp4; do ffmpeg -i "$f" -c:a libopus -b:a 96k -vbr on "${f%.mp4}.opus"; done
Output File Size Estimator

Enter audio duration below, or inspect a file above to auto-fill.

hrs

min

sec

Formula: bitrate (kbps) × duration (s) / 8000

32 kbps

64 kbps

96 kbps

128 kbps

48 kbps

Duration: 3 min 30 sec (210 s)

Why No In-Browser Conversion?

Browsers expose the Web Audio API for decoding audio, but they do not include an Opus encoder. Opus encoding requires libopus — a native library compiled for your operating system. FFmpeg bundles libopus and handles the full pipeline:

  1. 1 FFmpeg opens the M4A container and reads the compressed AAC audio stream.
  2. 2 The AAC decoder decompresses the stream to raw PCM audio in memory.
  3. 3 libopus re-encodes the PCM data to Opus at the bitrate you specify.
  4. 4 FFmpeg wraps the Opus stream in an OGG container and writes the .opus file to disk.

Install FFmpeg at ffmpeg.org (free, open-source). On Linux: sudo apt install ffmpeg. On macOS: brew install ffmpeg.

Opus Bitrate Reference

Bitrate Quality Size / min Best For
24 kbps Acceptable ~0.18 MB Voice calls, minimal bandwidth
32 kbps Good ~0.24 MB Podcasts, audiobooks, speech
48 kbps Very Good ~0.36 MB Speech, transparent for voice
64 kbps Excellent ~0.48 MB Casual music listening
96 kbps Near-transparent ~0.72 MB General music, headphones
128 kbps Transparent ~0.96 MB Audiophile, archival Opus

M4A vs. Opus — At a Glance

M4A (MPEG-4 Audio / AAC)

  • Default format for iTunes, iPhone voice memos, Apple devices
  • Very broad hardware and software support
  • Supported by all major streaming platforms
  • Lower quality than Opus at equivalent low bitrates
  • Larger file sizes for the same perceived quality

Opus (RFC 6716, libopus)

  • Outperforms AAC at most bitrates, especially below 128 kbps
  • Royalty-free and open-source (Xiph.org / IETF)
  • Native support in all major browsers and WebRTC
  • Not supported by older car stereos or dedicated audio players
  • Apple devices have limited native Opus support outside browsers
Copied!

Summary

Inspect any audio file in your browser to see its duration, size, and sample rate — then copy the ready-to-run FFmpeg command to convert it from M4A to Opus.

How it works

  1. Drop or select an audio file in the inspector panel — the file never leaves your device.
  2. The Web Audio API decodes the file header and reports duration, file size, and sample rate.
  3. Enter your file name and choose a target Opus bitrate in the command generator.
  4. Copy the generated FFmpeg command and paste it into your terminal.
  5. FFmpeg decodes the M4A stream, re-encodes it as Opus inside an OGG container, and writes the output file.
  6. Play the output file to verify quality, then delete the original M4A if no longer needed.

Use cases

  • Convert iPhone voice memos or Apple Music downloads from M4A to the more efficient Opus format.
  • Reduce podcast episode file sizes significantly with Opus at 32–64 kbps versus AAC at 128 kbps.
  • Prepare audio for WebRTC or web streaming where Opus is natively supported by all browsers.
  • Batch-convert an entire M4A library to Opus to save storage space.
  • Inspect an unknown audio file to confirm its duration and sample rate before processing.
  • Generate ready-to-paste FFmpeg commands without memorizing Opus encoder flags.
  • Compare M4A and Opus quality characteristics before choosing a target bitrate.
  • Convert audiobooks or lecture recordings from M4A to Opus for efficient long-term storage.

Frequently Asked Questions

Last updated: 2026-07-01 · Reviewed by Nham Vu