开发者

JAudioTagger and Android - Change a value in an mp3?

开发者 https://www.devze.com 2023-02-19 20:02 出处:网络
I can read meta information like title, artist, album art and other information from audio files, but I have never been able to succ开发者_StackOverflow社区essfully write the meta information.

I can read meta information like title, artist, album art and other information from audio files, but I have never been able to succ开发者_StackOverflow社区essfully write the meta information.

Any have any experiences with this? Are there better libraries than JAudioTagger?

I'd offer some example code, but I've tried a dozen things that didn't work.


Something like

AudioFile audioFile = AudioFileIO.read(testFile);
Tag newTag = audioFile.getTag();
newTag.setField(FieldKey.ALBUM,"October");
newTag.setField(FieldKey.ARTIST,"U2");
audioFile.commit();

but if you are using android you also need to do

TagOptionSingleton.getInstance().setAndroid(true);

because of some bugs with android version of Java

0

精彩评论

暂无评论...
验证码 换一张
取 消