Help - Search - Members - Calendar
Full Version: Linux command line tool to display MP3 metadata (length, CBR/ABR/VBR m
Hydrogenaudio Forums > Lossy Audio Compression > MP3 > MP3 - General
Nikola
Hi,

Anyone know of a good command line tool that can dump metadata associated with MP3 files: I need length of the file, type of encoding etc? I've been looking at LAME but don't see any options...

Thanks!
cjanscen
QUOTE(Nikola @ Jul 18 2007, 18:53) *

Hi,

Anyone know of a good command line tool that can dump metadata associated with MP3 files: I need length of the file, type of encoding etc? I've been looking at LAME but don't see any options...

Thanks!


Check out the python bindings of taglib:
pytag

You could whip up your own program in ten minutes, just look at the examples
FooForThought
QUOTE(Nikola @ Jul 18 2007, 18:53) *

Anyone know of a good command line tool that can dump metadata associated with MP3 files


I don't think anything beats Exiftool for command-line metadata power and versatility. Works in Linux, Windows**, Mac, etc (anything that can run Perl). Works for all kinds of image (very extensive output for digital camera images), video, audio, and other media files.

http://www.sno.phy.queensu.ca/~phil/exiftool/

Here is sample output for OGG, MP3, and MPC

CODE

exiftool "Patricia Barber-Companion-Use Me.mpc"
ExifTool Version Number         : 6.93
File Name                       : Patricia Barber-Companion-Use Me.mpc
Directory                       : .
File Size                       : 10 MB
File Modification Date/Time     : 2006:04:21 17:00:22
File Type                       : MPC
MIME Type                       : audio/x-musepack
Total Frames                    : 15035
Sample Rate                     : 44100
Quality                         : 6 (Xtreme)
Max Band                        : 31
Replay Gain Track Peak          : 32949
Replay Gain Track Gain          : 65416
Replay Gain Album Peak          : 39239
Replay Gain Album Gain          : 65161
Fast Seek                       : No
Gapless                         : Yes
Encoder Version                 : 1.1.5
Track                           : 02
Title                           : Use Me
Album                           : Companion
Artist                          : Patricia Barber
Comment                         : EAC / MusePack 1.15v --quality 6
Genre                           : Jazz
Ratesonic                       : 5
Sub-genre                       : Jazz
Year                            : 1999



CODE

exiftool "Stone Sour-Stone Sour-Bother.mp3"
ExifTool Version Number         : 6.93
File Name                       : Stone Sour-Stone Sour-Bother.mp3
Directory                       : .
File Size                       : 6 MB
File Modification Date/Time     : 2006:05:15 19:09:52
File Type                       : MP3
MIME Type                       : audio/mpeg
MPEG Audio Version              : 1
Audio Layer                     : 3
Audio Bitrate                   : 128000
Sample Rate                     : 44100
Channel Mode                    : Joint Stereo
MS Stereo                       : On
Intensity Stereo                : Off
Copyright Flag                  : False
Original Media                  : True
Emphasis                        : None
Album                           : Stone Sour
Artist                          : Stone Sour
Comment                         : *** / Foobar2000: MPC->MP3
Genre                           : Rock
Title                           : Bother
Track                           : 08
Recording Time                  : 2002
User Defined Text               : (sub-genre) Alt Metal
Year                            : 2002
Duration                        : 0:06:03.67 (approx)


CODE

exiftool "Cassandra Wilson-Blue Light 'Til Dawn-I Can't Stand The Rain.ogg"
ExifTool Version Number         : 6.93
File Name                       : Cassandra Wilson-Blue Light 'Til Dawn-I Can't Stand The Rain.ogg
Directory                       : .
File Size                       : 8 MB
File Modification Date/Time     : 2006:06:16 23:11:36
File Type                       : OGG
MIME Type                       : audio/x-ogg
Vorbis Version                  : 0
Audio Channels                  : 2
Sample Rate                     : 44100
Nominal Bitrate                 : 224000
Vendor                          : AO; aoTuV b4b [20051117] (based on Xiph.Org's libVorbis)
Comment                         : EACA/ Ogg Vorbis aoTuV beta4 -q 7
Title                           : I Can't Stand The Rain
Track Number                    : 12
Album                           : Blue Light 'Til Dawn
Artist                          : Cassandra Wilson
Genre                           : Jazz
Label                           : Capital - Blue Note
Ratesonic                       : 5
Sub-genre                       : Jazz
Date                            : 1993


** For Windows, there is a standalone executable that doesn't require Perl to be installed. I use Exiftool mostly in Linux, however.
Nikola
FooForThought, oh boy, is this sweet! Thank you so much!!! smile.gif
FooForThought
QUOTE(Nikola @ Jul 18 2007, 21:02) *

Thank you so much!!! smile.gif


You're welcome.
Nikola
What a cool tool... I've been playing with it for a while and it's perfect so far.. haven't been able to stomp it with some weird file.

CODE
$ exiftool Boys\ and\ Girls\ in\ America/01\ Stuck\ Between\ Stations.mp3
ExifTool Version Number         : 6.93
File Name                       : 01 Stuck Between Stations.mp3
Directory                       : Boys and Girls in America
File Size                       : 8 MB
File Modification Date/Time     : 2006:12:20 06:05:47
File Type                       : MP3
MIME Type                       : audio/mpeg
MPEG Audio Version              : 1
Audio Layer                     : 3
Audio Bitrate                   : 192000
Sample Rate                     : 44100
Channel Mode                    : Joint Stereo
MS Stereo                       : On
Intensity Stereo                : Off
Copyright Flag                  : False
Original Media                  : True
Emphasis                        : None
Album                           : Boys and Girls in America
Artist                          : The Hold Steady
Genre                           : Rock
Title                           : Stuck Between Stations
Track                           : 01
Year                            : 2006
Comment                         :
Duration                        : 0:09:09.03 (approx)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.