jhe2 / gmu

The Gmu Music Player
GNU General Public License v2.0
23 stars 16 forks source link

Covers embedded in OGG metadatas are not displayed #15

Open schmurtzm opened 9 months ago

schmurtzm commented 9 months ago

Describe the bug mp3 covers embedded in metadata are OK (you need the right libraries to display the jpg but after that it works perfectly). But it's not the same for OGG

To Reproduce Steps to reproduce the behavior:

  1. Embbed a jpg file to the ogg or opus file thanks to mp3tag or kid3
  2. Play it into gmu -> no cover

Expected behavior As the cover is displayed in VLC we could expect the same ability for GMU.

System (please complete the following information):

jhe2 commented 3 months ago

I just had a little bit of time to look into this. First of all, Gmu indeed does not currently support embedded cover artwork images in Ogg Vorbis files.

Since it has been a while since I wrote that piece of code I had to research a bit why I didn't implement it back then. It appears the primary reason was that there was no official way of embedding images into a VorbisComment back then. Since at least the Xiph.org wiki now mentions a way to embed such data, I'd say it would be okay to do it this way.

At the moment I can't tell you when I'll be able to work on this, but it appears to be fairly straight forward. At some point I probably will.

It is basically an additional METADATA_BLOCK_PICTURE field in the VorbisComment with base64 encoded data, containing some meta data about the image and the png or jpeg image data itself. That would need to be parsed and the image data extracted.