Inspect Audio Files with afinfo
Core Audio's afinfo prints everything about an audio file: format, sample rate, bitrate, duration, and metadata.
01Command
$ afinfo track.mp302What 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
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- afinfo — print audio file information (macOS)Evidence: Documents afinfo's output: file type, data format, sample rate, bit rate, duration, and metadata; -b for raw metadata hex dump.
Last verified: 2026-09-17 · Category: Media
06Related solutions
Browse and play local audio files with a keyboard-driven ncurses player.
Use kMDItem attributes to search file metadata the Spotlight UI can't express, faster than find ever will.
Dump every indexed attribute of any file: EXIF, dimensions, duration, authors, content types.