java iTunes 使用的“专辑艺术家”标签是什么?有什么方法可以使用java设置它?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5922622/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-30 13:27:43  来源:igfitidea点击:

What's this "Album artist" tag iTunes uses? Any way to set it using java?

javamp3id3

提问by CookieMonster

iTunes uses an ID3tag called "Album Artist", and for one album to be actually grouped as an album in iTunes, both the Album Name and Album Artist must be the same.

iTunes 使用名为“专辑艺术家”ID3标签,并且要在 iTunes 中将一张专辑实际分组为专辑,专辑名称和专辑艺术家必须相同。

As far as I'm concerned, Album Artist isn't an official ID3tag, and from the ID3libraries I've seen so far, none supported "Album Artist".

就我而言,专辑艺术家不是官方的ID3标签,而且从我目前看到的ID3库中,没有人支持“专辑艺术家”。

Preview

预览

Does anyone know more about this strange tag, and how to set it in java (or with any command line utility).

有没有人更了解这个奇怪的标签,以及如何在 java(或任何命令行实用程序)中设置它。

回答by Cowan

The commenters above are correct, TPE2("Band/Orchestra/Accompaniment") is the ID3 tag which is usually repurposed for this. I know that at least iTunes, Windows Media Player, J River Media Center, and XBMC all use this tag, because I use it extensively in my own music collection and all of those applications have supported it seamlessly.

上面的评论者是正确的,TPE2(“乐队/管弦乐队/伴奏”)是 ID3 标签,通常用于此目的。我知道至少 iTunes、Windows Media Player、J River Media Center 和 XBMC 都使用这个标签,因为我在自己的音乐收藏中广泛使用它,并且所有这些应用程序都无缝支持它。

To edit this tag:

要编辑此标签:

Graphically: you really can't go wrong with mp3tag, the only graphical editor (Windows in this case, but works fine under Wine) I've used which handles multiple files really well (leaves values alone unless you specifically change them), lets you customise which fields you have (and how they map to ID3 or FLAC tags, etc), and has other nice stuff like handling multiple image types for the APICtag (front cover, back cover, disc image, band photo) cleanly, etc. Highly recommended.

图形上:你真的不会出错mp3tag,唯一的图形编辑器(在这种情况下是 Windows,但在 Wine 下工作正常)我使用过它处理多个文件非常好(单独留下值,除非你特别更改它们),让您可以自定义您拥有的字段(以及它们如何映射到 ID3 或 FLAC 标签等),还有其他不错的东西,例如APIC干净地处理标签的多种图像类型(封面、封底、光盘图像、乐队照片)等。强烈推荐。

From the command line: the id3v2command-line tool works a treat in this case:

从命令行id3v2命令行工具在这种情况下起作用:

$ id3v2 -l foo.mp3 
[...]
id3v2 tag info for foo.mp3:
TFLT (File type): MPG/3
TIT2 (Title/songname/content description): Because Of The Blood (Single Version)
TPE1 (Lead performer(s)/Soloist(s)): Sin Fang
TPE2 (Band/orchestra/accompaniment): Sin Fang
[...]

$ id3v2 --TPE2 "Spice Girls" foo.mp3

$ id3v2 -l foo.mp3 | grep TPE2
TPE2 (Band/orchestra/accompaniment): Spice Girls

(this tool is available by default in the Ubuntu repos, sudo apt-get install id3v2)

(默认情况下,此工具在 Ubuntu 存储库中可用,sudo apt-get install id3v2

From Java:

来自爪哇:

Use something like the javamusictagproject. I haven't used this in a while but something like:

使用类似javamusictag项目的东西。我有一段时间没有使用过这个了,但类似于:

MP3File file = new MP3File(new java.io.File("foo.mp3"));
((FrameBodyTPE2) file.getID3v2Tag().getFrame("TPE2").getBody()).setText("Backstreet Boys");
file.save();

is pretty close (or at least, close enough to get you started).

非常接近(或者至少,足够接近让您入门)。