• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Issues with Android Media Scanner or built-in media library

howardknob

Lurker
Apr 28, 2017
3
0
I noticed an issue while using the app PlayerPro where a bunch of my albums didn't appear when searching by artist. I noticed later on that the missing albums in question were all listed under unknown artist. After looking at the files themselves (both mp3 and m4a) I noticed that the artist information is listed correctly on the actual file tags (id3 tags), but for some reason that metadata must not be picked up by the built-in Android media scanner. I also noticed that under the album view, the albums in question are all listed with my other albums so that data is being picked up during the media scan and listed in the media library database without issue.

I noticed the exact same issues (exact same artists/albums too) when using the built-in Google Play app too, which leads me to believe that the issue is related to the built-in media scanner or built-in library database.

My phone specs and configuration:

Moto G4 plus 64 GB
Android v.7.0 Nougat
About 85 GB of Music stored on an SD card (formated as portable storage so it can be removed and used in another device)
PlayerPro (my main music app, but the problem is also evident in the stock Google Play app)​

Troubleshooting performed:

  1. I looked for “.nomedia” files in the music directories in question, but didn’t find any.
  2. I deleted the songs in question from my phone and then re-added them.
  3. I went to settings > storage > internal shared storage and cleared my cached data. I then went to settings > apps > media storage > storage > clear data. After doing these two things, I restarted the phone. This caused the media scanner to run and it rebuilt the library database.
  4. I went to settings > apps > PlayerPro > storage and then cleared the cache and cleared the data.
  5. I uninstalled PlayerPro, deleted the root PlayerPro directory, and reinstalled PlayerPro (also doing step 3, and restarted the phone to try and have everything start fresh).

After doing all that and the media library was rebuilt, I noticed that I had the same exact problem with the same exact albums in question - they were showing up under unknown artist.

I’ve read that the built-in media scanner doesn’t do so well with large libraries and also doesn’t accurately read id3 tags (depending on file type and version). The strange thing is that I tested breaking one album into 2 separate albums (with different album names) and the “new” album I created was indexed just fine, while the “old” album that remained (this time with fewer tracks) started having the issue (and now shows up under unknown artists).

This problem has me stumped and I’m not sure if there is anything I can do to more aggressively remove the old library database without reloading the entire phone. I’ve heard that for large libraries, it may be better to use PowerAmp since it has its own media scanner and was designed for really large libraries. Any thoughts?
 
I have a this same issue on a Motorola Moto G4 16GB running Nougat 7.0. I only have about 20GB of music on my SD card, though.

I have tried a lot of the same troubleshooting fixes as you, as well as renaming the files, removing the ID3 tags (not just clearing the fields, but actually using software to remove the metadata), and a few other things, and have pretty much come to the same conclusion.

There is an app called ID3fixer that allows you to update the tag information in the Media Library database, and while it is able to fix the unknown artist problem, there are still some other issues for me, such as track duration being 0:00, that aren't fixed.

It's interesting that by splitting an album into 2, that you were able to get it to recognize the new one. I have to try that now.

I am curious about what your directory structure is. I keep my music in seperate folders for each album. Each folder is labeled by artist name followed by album name, and each file is labeled by track number followed by track name. You said that your media player could sort by album, but mine ends up sorting these problem albums by folder name. Do you happen to name your folders for the album it holds?

Anyway, the metadata is there on the file and can be read. I used the app Phonograph which is a free media player with the ability to edit tags. When opening a file with their tag editor, my custom tag info for lyrics was there. Also, if you tap the "More Options" dots next to a track and choose 'song info', all of the fields are filled with the tag info as well.
 
Upvote 0
Not sure if you are still looking for a solution, but I found one for my problem that might help. It turned out the file size of my embedded artwork was causing the problem for me. Most of the artwork was over 1MB. I wasn't able to find an exact number for max size, but under 700kB worked for me.

There was one anomaly with one album. NIN The Slip was a free download. It came already tagged and had individual artwork for each song. For some reason, they used .png for the 2nd song, while all the rest used .jpg. The scanner would read the first file fine, but the second file would cause a problem. That would cause the rest of the files in the album to mess up as well, even though the artwork was fine.

After I compressed the file size of all of the problem artwork and did a data wipe of the Media Storage app I was good to go. No more unknown artist.
 
Upvote 0
I have a this same issue on a Motorola Moto G4 16GB running Nougat 7.0. I only have about 20GB of music on my SD card, though.

I have tried a lot of the same troubleshooting fixes as you, as well as renaming the files, removing the ID3 tags (not just clearing the fields, but actually using software to remove the metadata), and a few other things, and have pretty much come to the same conclusion.

There is an app called ID3fixer that allows you to update the tag information in the Media Library database, and while it is able to fix the unknown artist problem, there are still some other issues for me, such as track duration being 0:00, that aren't fixed.

It's interesting that by splitting an album into 2, that you were able to get it to recognize the new one. I have to try that now.

I am curious about what your directory structure is. I keep my music in seperate folders for each album. Each folder is labeled by artist name followed by album name, and each file is labeled by track number followed by track name. You said that your media player could sort by album, but mine ends up sorting these problem albums by folder name. Do you happen to name your folders for the album it holds?

Anyway, the metadata is there on the file and can be read. I used the app Phonograph which is a free media player with the ability to edit tags. When opening a file with their tag editor, my custom tag info for lyrics was there. Also, if you tap the "More Options" dots next to a track and choose 'song info', all of the fields are filled with the tag info as well.
Thank you for your detailed response! I'll have to check out that ID3fixer - After reading the description to the app in the play store it says it fixes either ID3 tags or it has a mode to fix the Android database only. Which fix did you do? Did you go to each album with the issue and have it fix the song tags, or did you just fix the entire database?

My music directory structure is similar but slightly different to the way you have organized your music. I have Artist folders with Album sub folders. Within my Album sub folders I have song files titled with track number and then song name. It's basically the itunes default as I use itunes on my computer and just simply copied my music directory over to my phone's sd card.

Thank you for all your help and I'll give the ID3fixer a try!
 
Upvote 0
Not sure if you are still looking for a solution, but I found one for my problem that might help. It turned out the file size of my embedded artwork was causing the problem for me. Most of the artwork was over 1MB. I wasn't able to find an exact number for max size, but under 700kB worked for me.

There was one anomaly with one album. NIN The Slip was a free download. It came already tagged and had individual artwork for each song. For some reason, they used .png for the 2nd song, while all the rest used .jpg. The scanner would read the first file fine, but the second file would cause a problem. That would cause the rest of the files in the album to mess up as well, even though the artwork was fine.

After I compressed the file size of all of the problem artwork and did a data wipe of the Media Storage app I was good to go. No more unknown artist.
This is a good point. I do have a lot of high res artwork. Some of it I suspect is over 1MB. Did you use a specific tool to batch compress all the album artwork for your files (I'm assuming that all your artwork is embedded in your files - this is what I do), or did you manually fix each one with the problem?

Also - I remember when NIN's The Slip came out! I too downloaded it back in the day and have that one on my phone. Like you, my second track off of that album appears in the unknown artists list under that album, but none of the rest of the songs from that album have that issue.
 
Upvote 0
ID3fixer is a little clunky as an app. I used the fix database mode, because the fix tag mode did absolutely nothing, and while it worked for the unknown artist issue, it didn't completely fix the problem for me. It left other fields empty like track duration which was not acceptable.

The true fix for me was compressing the artwork. I only had about 20 albums that were giving me problems so I ended up doing it all manually. It probably would have taken me just as long to figure out how to setup a batch process.

I use Tagscan on my computer to handle all of my mp3s, so I used that to copy the artwork, GIMP to compress it, and then Tagscan to update the mp3s with the new artwork. Tagscan lets you select an entire album at once, so you don't have to update each track individually. That would have drove me crazy. It only took me about half an hour total.

I'm not sure how many you have to update, so that process might be a little too time consuming. It might not even be your issue either. If it is and you do decide to go that route and need more details, just let me know.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones