Is there a command-line utility to determine the bitrate of an mp3 file?

link|improve this question

66% accept rate
feedback

3 Answers

up vote 3 down vote accepted

mpg321 should display this info when the -t switch is used. It is actually a command-line player, but -t should give you what you want.

link|improve this answer
That'll do nicely, thanks. – chris Sep 7 '09 at 2:14
feedback

file is able to identify the bitrate of MP3s, and is probably already installed on your machine, even if your distro is one of those that avoids installing an MP3 decoder.

link|improve this answer
feedback

You can get all ID3 meta-tags including the bitrate from exiftool:

ExifTool is free software used for reading, writing, and manipulating image, audio and video metadata. It is platform independent and is both a Perl library and command-line application. ExifTool is a popular tool to incorporate into different types of digital workflows and supports many types of metadata including Exif, IPTC, XMP, JFIF, GeoTIFF, ICC Profile, Photoshop IRB, FlashPix, AFCP and ID3, as well as manufacturer-specific metadata of many digital cameras.

Starting with version 7.79 (June 20, 2009), ExifTool added read/write support for Adobe InDesign files (.IND, .INDD, .INDT), and ability to geotag with KML files.

The command you want is:

$ exiftool -AudioBitrate File.mp3
Audio Bitrate : 128000

Running the command without any arguments gets you all the tags. It is cross-platform, and works for most multimedia types. This is available via the libimage-exiftool-perl package on Ubuntu.

link|improve this answer
This also looks useful, and I'll give it a try. Thanks. – chris Sep 7 '09 at 2:15
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.