使用命令行工具从ID3标签获取特定字段?

9 linux shell mp3 id3

我正在寻找一种让我从mp3文件中获取ID3标签的特定字段的方法.

到目前为止,我所有的工具都返回了所有字段,并且还将它们格式化为"更容易阅读".我需要一些字段,格式不同(artist\talbum\ttitle \n)用于报告目的.

有没有这样的工具?我希望能让我从ID3v1和ID3v2单独输出值的工具.

der*_*ert 8

id3v2 -R听起来像它做你想要的.Debian包名是id3v2,上游是http://id3v2.sourceforge.net/

从联机帮助页:

   -R, --list-rfc822
          Lists using an rfc822-style format for output
Run Code Online (Sandbox Code Playgroud)

例:

$ 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
Run Code Online (Sandbox Code Playgroud)