Terminal Tip: Finding information about a mp3 audio file…

Home / Apple / Terminal Tip: Finding information about a mp3 audio file…

Here is a quick tip for you OSX command line fans. If you want to find metadata information about a mp3 file use the “afinfo” command. Very quick and scripting friendly. Here is a example:

$ afinfo 08_\ Lily\ Allen\ -\ Fk\ You.mp3 
File:           08_ Lily Allen - Fk You.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: 215.249 sec
audio bytes: 5167920
audio packets: 8240
audio 9490176 valid frames + 576 priming + 1728 remainder = 9492480
bit rate: 192000 bits per second
packet size upper bound: 1052
maximum packet size: 731
audio data file offset: 32353
optimized
----

2 Comments

Leave a Reply