mpatric / mp3agic

A java library for reading mp3 files and reading / manipulating the ID3 tags (ID3v1 and ID3v2.2 through ID3v2.4).
MIT License
1.2k stars 310 forks source link

Any idea why the Android Music app does not detect the cover image, while the "file manager" does? #150

Open Alanz2223 opened 6 years ago

Alanz2223 commented 6 years ago

I have two mp3 files. One is from an official album unmodified by this library yet when I examine the ID3 tag the version is "3". Then I have another mp3 file which I assign a new ID3 V3 tag with this library. This is running on an Android system and file 1 shows displays the image correctly in both the original music app and the file manager app while file 2, the one I modify with this library only shows the image in the file manager while it does display in the music app. I know it may not be an issue directly to this library but I figured this might be the best place to ask this question. Any idea why I am experiencing this behavior could be?

Here is all I am doing to file 2.

` Mp3File mp3file = new Mp3File(options.getString("tempPath"));

                       ID3v2 id3v2Tag;               

                       id3v2Tag = new ID3v23Tag();
                       String type = options.getString("thumbnailMime");

                id3v2Tag.setTitle(options.getString("title"));
                id3v2Tag.setAlbum(options.getString("album"));
                id3v2Tag.setAlbumImage(mu.stuff, type);
                mp3file.setId3v2Tag(id3v2Tag);
                mp3file.save(options.getString("toFile"));`
TheCardinalSystem commented 4 years ago

I was experiencing a similar issue where Android could not process MP3 metadata which I wrote with Mp3Tag. I found that changing the album artwork mime type (e.g image/jpeg -> image/png) fixed the problem. It seems to be a bug with Android. Use a photo editor or an online converter to change the album artwork format, and see if that works.