Linux command line utility to determine mp3 bitrate?
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Underwater World
--
Chapters
00:00 Linux Command Line Utility To Determine Mp3 Bitrate?
00:14 Accepted Answer Score 27
01:29 Answer 2 Score 24
02:00 Answer 3 Score 8
02:17 Answer 4 Score 0
02:37 Thank you
--
Full question
https://superuser.com/questions/36871/li...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#linux #commandline #mp3
#avk47
ACCEPTED ANSWER
Score 27
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.
ANSWER 2
Score 24
file is able to identify the bitrate of constant-bitrate (CBR) MP3s, and is probably already installed on your machine, even if your distro is one of those that avoids installing an MP3 decoder.
However, it only looks at the beginning of the file, so it will not get the true bitrate for variable-bitrate (VBR) or average-bitrate (ABR) MP3s, but only that of the first frame, which may be misleading.
ANSWER 3
Score 8
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.
ANSWER 4
Score 0
I know this is 5 years old, but Google finds it, and it's excellent advice.
exiftool -AudioBitrate File.mp3
gives much better information in an easier-to-read format. e.g.:
======== 15-Is This Thing On .mp3
Audio Bitrate : 320 kbps
======== 16-Run.mp3
Audio Bitrate : 320 kbps
======== 17-Good Old Days.mp3
Audio Bitrate : 320 kbps