« "Workflow" change ideas for Magnatune | Main | Cover art in OGG/FLAC files now »

June 09, 2012



great, thx john and David of course.


This is excellent news. Thanks for taking the trouble to do this :)

Daniel Clements

Excellent! Now I don't have to do it manually anymore.

J.B. Nicholson-Owens

For FLAC files, use the flac encoder at flac.sourceforge.net and try reading the documentation on --picture. That should do what you want.

I did the following and it worked in Totem (with a sample track in my present working directory):
$ wget 'http://he3.magnatune.com/music/Cancer%20Killing%20Gemini/It%20Only%20Hurts%20When%20We%20Breathe/cover.jpg'
$ flac --picture=cover.jpg -f 01\ -\ Christcontrol.flac
$ totem 01\ -\ Christcontrol.flac

to see the cover art with the person in the welding helmet looking at a tree with no leaves.

I imagine one could use PBM tools, Imagemagick, or a workalike to scale cover art down to a 32x32 PNG suitable for embedding as image type #1—file icon.


The command line utility "metaflac" (part of the official flac package) has options for cover art. See the --import-picture-from option, that supports 21 different picture types (the appropriate one here is the default, 3: Cover (front)). At least VLC shows me such covers, and e.g. the albums from Floex (Tomáš Dvořák) on Bandcamp do include such cover art. See:

Also the Big Buck Bunny soundtrack OGGs include album art that can be displayed by VLC, but neither ogginfo, vorbiscomment nor VLC's metadata dialog tell me how the cover art is stored. I only know that there is cover art because VLC *displays* some. Anyway the Xiph Wiki says that you should just use a FLAC PICTURE tag encoded as Base64 in a Vorbis tag called "METADATA_BLOCK_PICTURE". See:

TagLib supports FLAC PICTURE tags:

So for OGG one just can render a FLAC::Picture into a ByteVector, encode this ByteVector in Base64 and sets the Vorbis tag "METADATA_BLOCK_PICTURE" to that. I even found a gist that does that:

This is supported by the most players (VLC, Winamp, etc.), so it would be standard enough for me, even if it wouldn't be recommended by Xiph.org. Or is it that the tools that you use don't support this?

John from Magnatune

re: FLAC

Thanks, guys for letting me know how to add the covers to FLAC files. I'll make the changes and hopefully next week the FLAC files at magnatune should all be rebuilt with artwork.

re: OGG

I'll give it a try and see if I can make it work.



Thanks for fixing this issue. It will be a pleasure not to have to manually download the artwork anymore. much appreciated!

Spike Page

Thanks for doing this! Up until now I've just been copy/pasting the graphics into Windows Media Player, but then to get the album art to display with the songs once I moved them to my Mp3 player I had to use Stamp ID3 Tagger or I'd just get the generic icon.

This means now I can spend more time listening and enjoying and less time managing files.


Thank you. This will save me a lot of time!

The comments to this entry are closed.