Audio Format Conversion Guide: MP3, AAC, FLAC, OGG, Opus Compared
Choosing the right audio format can be confusing. MP3, AAC, FLAC, OGG, Opus, WAV, AIFF — there are too many options. This guide compares the major audio formats, explains when to use each, and provides FFmpeg commands for all common conversions.
Audio format categories
Audio formats fall into three categories:
1. Uncompressed (raw PCM)
- WAV, AIFF
- Maximum quality, huge files
- Used in audio editing and production
2. Lossless compressed
- FLAC, ALAC, APE
- Exact original quality, smaller than uncompressed
- Used for archival and audiophile listening
3. Lossy compressed
- MP3, AAC, OGG Vorbis, Opus, WMA
- Discards inaudible audio data for small files
- Used for distribution, streaming, mobile devices
Format comparison table
| Format | Type | Quality | File size | Compatibility | Use case |
|---|---|---|---|---|---|
| WAV | Uncompressed | Lossless | Huge | Universal | Audio editing |
| FLAC | Lossless | Lossless | Medium | Good | Archival |
| ALAC | Lossless | Lossless | Medium | Apple ecosystem | Apple archival |
| MP3 | Lossy | Good | Small | Universal | Distribution |
| AAC | Lossy | Better | Small | Excellent | Modern distribution |
| OGG Vorbis | Lossy | Good | Small | Good (no iOS) | Open source |
| Opus | Lossy | Best | Smallest | Modern browsers | Streaming, VoIP |
| WMA | Lossy | Good | Small | Windows only | Legacy |
When to use each format
WAV (uncompressed)
- Use when: Editing audio, maximum quality needed
- Avoid when: Distributing files (too large)
- Bitrate: 1411kbps (CD quality, 16-bit/44.1kHz/stereo)
FLAC (lossless)
- Use when: Archival, audiophile listening
- Avoid when: Mobile devices with limited storage
- Bitrate: ~800kbps (varies with content)
- File size: ~50-60% of WAV
MP3 (lossy)
- Use when: Maximum compatibility needed
- Avoid when: You need best quality at low bitrate
- Recommended bitrate: 192kbps (good), 320kbps (maximum)
- Compatibility: Every device, every software
AAC (lossy)
- Use when: Modern applications, video production
- Avoid when: Old devices that only support MP3
- Recommended bitrate: 128-192kbps
- Compatibility: All modern devices, browsers
Opus (lossy)
- Use when: Web streaming, VoIP, low-latency applications
- Avoid when: Need iOS Safari compatibility (limited support)
- Recommended bitrate: 96-128kbps (transparent at 128kbps)
- Compatibility: Chrome, Firefox, Android (limited Safari/iOS)
FFmpeg conversion commands
Convert to MP3
bash
# High quality MP3
ffmpeg -i input.wav -c:a libmp3lame -b:a 320k output.mp3
# Standard quality MP3
ffmpeg -i input.wav -c:a libmp3lame -b:a 192k output.mp3
# Voice MP3
ffmpeg -i input.wav -c:a libmp3lame -b:a 96k -ac 1 output.mp3Convert to AAC
bash
# AAC in M4A container
ffmpeg -i input.wav -c:a aac -b:a 192k output.m4a
# AAC in ADTS container
ffmpeg -i input.wav -c:a aac -b:a 192k output.aac
# High quality AAC
ffmpeg -i input.wav -c:a aac -b:a 256k output.m4aConvert to FLAC
bash
# Lossless FLAC
ffmpeg -i input.wav -c:a flac output.flac
# FLAC with compression level (0-12, default 5)
ffmpeg -i input.wav -c:a flac -compression_level 8 output.flacConvert to Opus
bash
# Opus in OGG container
ffmpeg -i input.wav -c:a libopus -b:a 128k output.opus
# Opus for voice
ffmpeg -i input.wav -c:a libopus -b:a 64k -application voip output.opusConvert to OGG Vorbis
bash
ffmpeg -i input.wav -c:a libvorbis -b:a 192k output.oggConvert to WAV
bash
# Standard WAV (CD quality)
ffmpeg -i input.mp3 -ar 44100 -ac 2 -c:a pcm_s16le output.wav
# 24-bit WAV
ffmpeg -i input.flac -c:a pcm_s24le output.wavCommon conversion scenarios
Extract audio from video
bash
ffmpeg -i input.mp4 -vn -c:a libmp3lame -b:a 192k output.mp3See our MP4 to MP3 Tutorial for details.
Convert FLAC to MP3
bash
ffmpeg -i input.flac -c:a libmp3lame -b:a 320k output.mp3Convert M4A to MP3
bash
ffmpeg -i input.m4a -c:a libmp3lame -b:a 192k output.mp3Convert WAV to FLAC
bash
ffmpeg -i input.wav -c:a flac -compression_level 8 output.flacBatch conversion
bash
# Convert all WAV files in current directory to MP3
for f in *.wav; do
ffmpeg -i "$f" -c:a libmp3lame -b:a 192k "${f%.wav}.mp3"
doneBitrate guide
| Bitrate | Quality | Use case | File size per minute |
|---|---|---|---|
| 64k | Voice only | Voice memo, podcast | ~0.5 MB |
| 96k | Acceptable | Voice, low-quality music | ~0.7 MB |
| 128k | Good | Casual music, streaming | ~1 MB |
| 192k | Very good | Recommended for music | ~1.5 MB |
| 256k | High | High quality music | ~2 MB |
| 320k | Maximum | Archival, audiophile | ~2.5 MB |
| Lossless | Perfect | Archival, editing | ~10 MB (FLAC) |
Quality comparison
At the same bitrate, perceived quality ranking:
Opus > AAC > Ogg Vorbis > MP3
Approximate transparency thresholds (where listeners can't distinguish from CD):
- Opus: 128kbps
- AAC: 160kbps
- Ogg Vorbis: 192kbps
- MP3: 256kbps
Sample rate and channels
Sample rate
| Rate | Use case |
|---|---|
| 8000 Hz | Telephone quality |
| 22050 Hz | Half CD quality |
| 44100 Hz | CD quality (standard) |
| 48000 Hz | Professional video (recommended) |
| 96000 Hz | High-resolution audio |
| 192000 Hz | Studio recording |
Channels
-ac 1: Mono (single channel)-ac 2: Stereo (two channels, default for music)-ac 6: 5.1 surround sound
bash
# Convert stereo to mono
ffmpeg -i input.mp3 -ac 1 -c:a libmp3lame -b:a 96k output.mp3
# Convert mono to stereo
ffmpeg -i input.mp3 -ac 2 -c:a libmp3lame -b:a 192k output.mp3Common issues
| Issue | Cause | Solution |
|---|---|---|
| "Unknown encoder" | Encoder not compiled in | Use built-in aac instead of libmp3lame |
| File too large | Lossless codec or high bitrate | Use MP3/AAC at 192kbps |
| Poor quality | Bitrate too low | Use 192kbps minimum for music |
| Audio sync issues | Sample rate mismatch | Use -ar 44100 or -ar 48000 |
| Can't play Opus | Old player | Use AAC or MP3 instead |
| Conversion fails | DRM protected source | Remove DRM first (if legal) |
Summary
Audio format selection summary:
- Maximum compatibility: MP3 at 192kbps
- Modern standard: AAC at 192kbps
- Best quality at low bitrate: Opus at 128kbps
- Archival: FLAC
- Audio editing: WAV
For format conversion, FFmpeg is the universal tool. The basic pattern is ffmpeg -i input.ext -c:a [codec] -b:a [bitrate] output.ext.
Quick reference:
- Universal MP3:
ffmpeg -i input.wav -c:a libmp3lame -b:a 192k output.mp3 - Modern AAC:
ffmpeg -i input.wav -c:a aac -b:a 192k output.m4a - Lossless FLAC:
ffmpeg -i input.wav -c:a flac output.flac - Best Opus:
ffmpeg -i input.wav -c:a libopus -b:a 128k output.opus
For FFmpeg basics, see our FFmpeg Getting Started Tutorial.