SimpleMobileTools / Simple-Music-Player

A clean music player with a customizable widget, stylish interface and no ads.
https://www.simplemobiletools.com
GNU General Public License v3.0
1.29k stars 408 forks source link

Question: How to format thumbnails to make them show up in the Simple-Music-Player? #324

Closed Carltoffel closed 3 years ago

Carltoffel commented 3 years ago

Hi everyone,

I'm having a hart time figuring out how to add a custom thumbnail to a track. I want to add the track names for whole albums or mixes in the thumbnail, so I can see which track currently is playing. But my thumbnails aren't displayed in the player view. I got it to work once (screenshot) but other tests are constantly failing. Most of the times my thumbnail is only displayed in the player notification and sometimes on the lockscreen background. Are there restrictions to the thumbnail size/format/quality in order to make it displayed not only in the notification? The command I tried around with is this: ffmpeg -i majesty.mp3 -i art.bmp -map_metadata 0 -map 0:0 -map 1 -ar 44100 -ac 2 -b:a 256k horton-majesty.mp3 and I tried it with different formats (mostly png and jpg) and other sizes. For reference, this is the output of ffmpeg -i with the working track:

  Metadata:
    encoder         : Lavf58.76.100
  Duration: 01:01:38.55, start: 0.025056, bitrate: 131 kb/s
  Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 128 kb/s
    Metadata:
      encoder         : Lavc58.13
  Stream #0:1: Video: png, rgba(pc), 900x900 [SAR 11811:11811 DAR 1:1], 90k tbr, 90k tbn, 90k tbc (attached pic)
    Metadata:
      comment         : Other

screenshot

btw: I created a script which automatically draws the track names, I will share it in the near future... but first I want to figure out how the image has to be formatted.

Another point I want to mention is that although there is plenty of space on the screen, the thumbnail isn't displayed completely. There are 50 pixels (out of 900) missing, each at the top and at the bottom. Maybe this could be changed in a future update?

tibbi commented 3 years ago

thumbnails are taken from the systems mediastore, try updating the info there with some app.

Carltoffel commented 3 years ago

I don't think the mediastore is the problem, because the cover always gets loaded in the notification (see below). Additionally I always copied the file to a new filename. This way there shouldn't be any issues with the cache/database.

There has to be some difference between the cover in the notification and the player in the app. I searched for 'cover' in this repo but I don't understand the differences.

Correct cover loaded in the notification, but still only the placeholder in the app itself:

drawing
Carltoffel commented 3 years ago

After some further testing I figured that it suddenly works, when I set some metadata like title and artist, which sounds a little bit strange to me.

Edit: I think this might be related to a bug in android + the album metadata tag But still the correct cover is displayed in the notification...