JAudioTagger and Android - Change a value in an mp3?

3.1k views Asked by At

I can read meta information like title, artist, album art and other information from audio files, but I have never been able to successfully 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.

1

There are 1 answers

2
Paul Taylor On

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