<分区>
嘿,谁能指导我使用最简单的 java mp3 库来读取 ID3v2 标签。
更新 1:
我忘了提到我需要在搜索栏上播放 mp3,因此需要一个 mp3 库,它可以通过下载最少的内容来读取长度。
<分区>
嘿,谁能指导我使用最简单的 java mp3 库来读取 ID3v2 标签。
更新 1:
我忘了提到我需要在搜索栏上播放 mp3,因此需要一个 mp3 库,它可以通过下载最少的内容来读取长度。
最佳答案
我用过 mp3agic过去。
够简单吗?
Mp3File mp3file = new Mp3File("SomeMp3File.mp3");
System.out.println("Length of this mp3 in seconds is: " + mp3file.getLengthInSeconds());
if(mp3file.hasId3v2Tag()) {
ID3v2 id3v2tag = mp3file.getId3v2Tag();
System.out.println("The artist in the ID3v2 tag is: " + id3v2tag.getArtist());
id3v2tag.setArtist("A new artist");
mp3file.save("ASavedMp3File.mp3");
System.out("Saved mp3 file with new name and artist set to 'A new artist'");
}
关于java - 用于流式传输 mp3 文件的 ID3v2 库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4570055/