Search code examples
linuxshellmp3id3

Getting specific fields from ID3 tags using command line tool?


I'm looking for a way that would let me get specific fields from ID3 tags from mp3 files.

All tools I have so far found return all fields, and they also format them for "easier reading". I need just some fields, and formatted differently (artist\talbum\ttitle\n) for reporting purposes.

Is there any such tool? I would love tool that would let me output separately values from ID3v1 and ID3v2.


Solution

  • id3v2 -R sounds like it does what you want. Debian package name is id3v2, upstream is http://id3v2.sourceforge.net/

    From the manpage:

       -R, --list-rfc822
              Lists using an rfc822-style format for output
    

    Example:

    $ id3v2 -R 365-Days-Project-04-26-sprinkle-leland-w-the-great-stalacpipe-organ.mp3 
    
    Filename: 365-Days-Project-04-26-sprinkle-leland-w-the-great-stalacpipe-organ.mp3
    TALB: Released independently through Luray Caverns
    TPE1: Leland W. Sprinkle
    TIT2: The Great Stalacpipe Organ
    COMM: ()[eng]: � 2004, Copyright resides with the artist, The 365 Days Project,  and UbuWeb (http://ubu.com) / PennSound (http://www.writing.upenn.edu/pennsound/). All materials at UbuWeb / PennSound are available for free exchange for noncommerical purposes.
    365-Days-Project-04-26-sprinkle-leland-w-the-great-stalacpipe-organ.mp3: No ID3v1 tag