Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Linux command line tool to display MP3 metadata (length, CBR/ABR/VBR m (Read 10311 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Linux command line tool to display MP3 metadata (length, CBR/ABR/VBR m

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!

Linux command line tool to display MP3 metadata (length, CBR/ABR/VBR m

Reply #1
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

Linux command line tool to display MP3 metadata (length, CBR/ABR/VBR m

Reply #2
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: [Select]
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: [Select]
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: [Select]
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.

Linux command line tool to display MP3 metadata (length, CBR/ABR/VBR m

Reply #3
FooForThought, oh boy, is this sweet! Thank you so much!!!


Linux command line tool to display MP3 metadata (length, CBR/ABR/VBR m

Reply #5
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: [Select]
$ 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)