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

June 09, 2012

Comments

ruediger

great, thx john and David of course.

ProtoKol

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.

panzi

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:
http://flac.sourceforge.net/format.html#def_PICTURE
http://flac.sourceforge.net/documentation_tools_metaflac.html
http://floex.cz/

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:
http://www.bigbuckbunny.org/index.php/complete-score-available-for-download/
http://wiki.xiph.org/VorbisComment#Cover_art

TagLib supports FLAC PICTURE tags:
http://developer.kde.org/~wheeler/taglib/api/classTagLib_1_1FLAC_1_1Picture.html

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:
https://gist.github.com/1468279

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.

-john

Alan

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.

Frank

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

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been saved. Comments are moderated and will not appear until approved by the author. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Comments are moderated, and will not appear until the author has approved them.