Get MP3 file info quickly via the Terminal
The fastest way I know of to get MP3 file info out of Mac OS X is using the Terminal. The command you’ll want to use is called afinfo, launch the Terminal and type this at the command line:
A series of information will then be reported back, looking like the following:
File: iTunes/iTunes Music/Empire of the Sun/Empire of the Sun - Girl.mp3
File type ID: MPG3
Data format: 2 ch, 44100 Hz, '.mp3' (0x00000000) 0 bits/channel, 0 bytes/packet, 1152 frames/packet, 0 bytes/frame
no channel layout.
estimated duration: 238.629 sec
audio bytes: 9545142
audio packets: 9135
bit rate: 320000 bits per second
packet size upper bound: 1052
maximum packet size: 1045
audio data file offset: 10302
This command works on with any audio file and is not limited to MP3′s. We have covered afinfo in the past when checking the bitrate of an audio file.