Audio

How to Compress an Audio File on Mac

By the Smol team9 min read

To compress an audio file on a Mac, re-encode it at a lower bitrate. Free and built in: afconvert -f m4af -d aac -b 128000 in.wav out.m4a. Our 30-second stereo WAV went from 5,292,078 bytes to 487,585 at 128 kbps, a 90.8% reduction, with nothing installed.

The part that surprises people is that the codec barely changes the file size. Across MP3, AAC and Opus at the same nominal bitrate, our measurements landed within 5% of each other every time. At 128 kbps: 481,115 bytes for MP3, 487,585 for AAC, 492,508 for Opus.

So the codec is not a size decision. It is a decision about how low you are allowed to go before the encoder refuses, and that is where the differences are enormous and measurable.

Which setting should you use?

Start here, then read the sections that apply. Sizes are per hour of audio, computed from the bitrates we measured rather than estimated.

What you haveUsePer hourWhy
Music you want to keepAAC or MP3 at 192 to 256 kbps86 to 115 MBDiminishing returns above this on almost any material
Music for a phone or carAAC at 128 kbps58 MBHalf the size, and the playback environment is noisy anyway
A podcast or interviewOpus at 24 kbps mono11 MBXiph recommend exactly this for spoken word
Speech that must play everywhereAAC at 64 kbps mono29 MBApple Podcasts accepts 64 to 128 kbps mono
An archive masterFLAC454 MB on our fixtureLossless. Decodes back to the original samples
A file already compressed onceLeave it alonen/aRe-encoding lossy audio adds damage without buying much

That last row is the one people skip. Compressing an MP3 again does not undo the first compression; it stacks a second approximation on top of it. If a file is already 128 kbps AAC, the honest answer is usually that it is done.

Does the codec change the file size?

Barely. We encoded the same 30-second stereo fixture at six bitrates with four encoders: LAME, ffmpeg’s native AAC, Apple’s AudioToolbox AAC (the same encoder afconvert and Music use), and libopus. Bytes, measured:

NominalMP3AAC (Apple)AAC (ffmpeg)OpusSpread
64 kbps240,579246,883247,246252,7415.0%
96 kbps360,848367,546366,508371,5413.0%
128 kbps481,115487,017487,585492,5082.4%
192 kbps721,650728,058726,975726,4380.9%
256 kbps962,186968,414966,613957,8541.1%
320 kbps1,202,7211,208,9731,207,8231,188,6741.7%

A bitrate is a promise about bytes per second, and every one of these encoders keeps it. That is the whole reason “which codec is smaller” is the wrong question: at a given bitrate they are all the same size, and what differs is the audio you get for the bytes.

Where codecs diverge sharply is at the bottom of the range, and you can measure that without a listening test. Asked for a low bitrate on 44.1 kHz stereo speech, the encoders behaved completely differently:

You asked forMP3 deliveredAAC (Apple) deliveredOpus delivered
16 kbps32,000 bps64,004 bps17,074 bps
24 kbps32,000 bps64,004 bps24,010 bps
32 kbps32,000 bps64,004 bps30,958 bps
48 kbps48,000 bps64,004 bps45,040 bps

MP3 has a hard floor of 32 kbps at 44.1 kHz and silently clamps: three different requests produced three byte-identical 257,193-byte files. Apple’s AAC encoder refuses anything under about 64 kbps for 44.1 kHz stereo, and at least says so: [aac_at] Bitrate 32000 not allowed; changing to 64000. Opus delivered every rate we asked for, down to 17 kbps.

That is the real, measurable sense in which Opus beats MP3 for speech. It is not a claim about how the two sound at 128 kbps, where the argument is subjective and small. It is that at 24 kbps mono, MP3 cannot participate.

How do I compress audio without installing anything?

afconvert is on every Mac and uses Apple’s own AAC encoder. One line:

afconvert -f m4af -d aac -b 128000 input.wav output.m4a

Ours produced 740,790 bytes measuring 194,905 bps when asked for 192 kbps, and the same command at 128,000 is the setting most people actually want. Run afconvert -hf once to see the formats it writes.

Two limits that cost us measurements to establish. afconvert writes no tags and no artwork, on any output format, which makes it excellent for voice recordings and wrong for a music library. And it cannot write MP3 at all, failing with Error: ExtAudioFileSetProperty ('cfmt') failed ('fmt?'), because macOS ships an MP3 decoder and no encoder. Both are covered in detail in converting M4A to MP3 on a Mac.

The Music app is the other free route, and for anything already in your library it is the right one. Set Music → Settings → Files → Import Settings to the encoder and bitrate you want, select the tracks, then File → Convert → Create [format] Version. Apple documents it in the Music User Guide and notes that the original stays put, so you end up with two copies and a tidy-up rather than a mistake you cannot undo.

With ffmpeg, the three commands worth keeping:

# music, keep it good
ffmpeg -i in.wav -c:a aac -b:a 192k out.m4a

# speech, get it small
ffmpeg -i in.wav -ac 1 -c:a libopus -b:a 24k -vbr constrained out.opus

# archive, lose nothing
ffmpeg -i in.wav -c:a flac out.flac

-vbr constrained on the Opus line is not decoration. libopus defaults to unconstrained VBR, where -b:a is a target rather than a ceiling: asked for 64 kbps it delivered 82,128 bps, a 28% overshoot. Constrained VBR came in at 64,601. If you are budgeting bytes, say so explicitly.

Can you compress audio without losing quality?

Yes, and it is the only honest use of the phrase. FLAC is lossless: decode it and you get the original samples back. We verified rather than assumed. Our WAV compressed to FLAC measured 3,785,677 bytes from 5,292,078, a 28.5% reduction, and the decoded audio hashed to MD5 a1c36cb0b913d496cbf4f5850d77d393 from both the FLAC and the source WAV.

Twenty-eight percent is a modest return, and it is modest here partly because our fixture is noise-heavy: noise does not predict, and FLAC works by predicting. Real recordings usually do better. What you never get from FLAC is the 90% reduction people expect from the word “compress”, because that 90% is made of discarded audio.

Every other setting on this page is lossy. AAC at 256 kbps is a very good approximation and a very large number of listeners will never identify it in a blind test, but it is not lossless and we are not going to publish a threshold we did not measure on your ears. The only claim of that kind we will repeat is from the people who wrote the codec: Xiph state on their Opus recommended settings page that “Opus at 128 KB/s (VBR) is pretty much transparent”.

If you want to settle it for yourself, encode one track at two settings and ABX them blind. It takes ten minutes and it will save you years of storing 320 kbps files.

What does a native app add?

Fewer decisions, and one window for a mixed folder. Smol took five files totalling 31,386,688 bytes to 128 kbps AAC in 5,032 ms: 90.8% off the music bed, 91.9% off a dynamics-heavy variant, 90.2% off a 64-second stereo speech file, 87.2% off a tagged FLAC. Audio compression outputs are aac, m4a, mp3, wav, flac, ogg and opus, with bitrate from 16 to 512 kbps and sample rate from 8 to 192 kHz.

The encoder is not the product, and the measurements say so plainly. Smol’s default AAC produced 726,975 bytes at 192,116 bps, which is the same byte count and the same decoded MD5 as ffmpeg -c:a aac -b:a 192k. Its FLAC output was 3,785,677 bytes, verified lossless. Its MP3 compression writes 192 kbps constant bitrate while its MP3 conversion writes LAME V2, which is a distinction worth knowing and is explained in audio bitrate explained.

Three things we found that you should know before relying on it. Asking for the opus output format on a WAV produced an AAC .m4a in our testing, reproduced twice in isolation; the Opus encoder is reachable through the ogg output, which gave us a genuine Opus stream byte-identical to ffmpeg -c:a libopus. Cover art is dropped on mp3, m4a and flac output, while all text tags survive, as measured in converting FLAC to MP3. And two inputs in one batch that share a basename will collide on a single output path, so we got four files from five inputs.

For a recurring job rather than a one-off, Smol ships an MCP server, so Claude Code, Codex and Google Antigravity can drive it directly, each one click to enable in the AI access panel as of Smol 1.0.35. The tool surface and the guardrails are on the Smol MCP page.

When Smol is not the answer

For audio specifically, more often than not. The free tools here are not a fallback, they are the same encoders.

One file: use afconvert. It is installed, it uses Apple’s AAC encoder, and it is one line. There is no version of “I need to make this podcast episode smaller once” that justifies buying software.

Music in your library: use Music. Free, documented by Apple, and the only route on this page that writes the artwork and tags your library already holds.

Album art matters: use ffmpeg. We drop embedded covers and ffmpeg with -c:v copy keeps them byte for byte. That gap is measured and it is real.

You want the smallest possible speech file: use ffmpeg with libopus. Our Opus path goes through the ogg output and produces the same bytes, but ffmpeg gives you -vbr constrained, -application voip and the rest of the controls directly.

What is left is a folder you process repeatedly, where audio arrives beside images, video and PDFs and you would rather drop the whole lot on one window than remember four commands. That is a real job and it is what the $29 buys, running entirely on your Mac with nothing uploaded. If your job is one file or one album, the commands above will serve you for years and cost nothing. For the speech-specific settings, including loudness, compressing a podcast episode goes further than this page does.

Frequently asked questions

How do I compress an audio file on a Mac for free?

Run afconvert -f m4af -d aac -b 128000 input.wav output.m4a in Terminal. It is installed on every Mac and uses Apple's own AAC encoder. Our 30-second stereo WAV went from 5,292,078 bytes to 487,585 at 128 kbps, a 90.8% reduction. Note that afconvert writes no tags or artwork.

Which audio codec gives the smallest file?

At the same bitrate, none of them. Measured at 128 kbps on the same source, MP3 was 481,115 bytes, Apple AAC 487,017, ffmpeg AAC 487,585 and Opus 492,508, a spread of 2.4%. Codecs differ in how low they will go: MP3 clamps at 32 kbps and Apple AAC at 64 kbps stereo, while Opus delivered 17 kbps.

What bitrate should I use for music?

Between 192 and 256 kbps for anything you want to keep, which works out at 86 to 115 MB per hour. For a phone or a car, 128 kbps at 58 MB per hour is a reasonable trade. Going to 320 kbps grew our fixture from 726,975 to 1,207,823 bytes, a 66% increase for material the encoder was not struggling with.

Can you compress audio without losing any quality?

Only with a lossless codec such as FLAC. Our WAV compressed to 3,785,677 bytes from 5,292,078, a 28.5% reduction, and the decoded audio hashed identically to the source. Every other setting on this page discards audio permanently. Lossless will not give you the 90% reduction people expect from compression.

Should I compress an MP3 that is already compressed?

Usually not. Re-encoding lossy audio does not undo the first compression, it stacks a second approximation on top. If a file is already 128 kbps AAC or MP3 it is essentially done. Compress from the least-damaged source you have, which means the WAV or FLAC if you still have it.

Keep reading