Inspect Audio Files with afinfo

Core Audio's afinfo prints everything about an audio file: format, sample rate, bitrate, duration, and metadata.

macOSmetadataaudioafinfoLow risk
Run `afinfo track.mp3` to display the file's data format, sample rate, estimated bitrate, duration, and metadata.

01Command

Command
$ afinfo track.mp3

02What it does

afinfo is the diagnostic companion to afconvert: it confirms the real container and codec (not just the extension), the sample rate, channel count, and estimated bitrate, plus ID3/iTunes metadata. Add -b to hex-dump the raw metadata blocks when debugging tags, or point it at a .m4a to verify that an ALAC conversion really used lossless compression. It also probes system audio units with -a.

03Risk

RiskLow risk
RequirementsBuilt-in on macOS.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

Last verified: 2026-09-17 · Category: Media

06Related solutions