Thursday, January 8, 2009

Embedding cover images in MP3 files for Android, iTunes, iPhone, Windows Media Player, and Windows Explorer

This is the continuation of a short series of blog postings about how I tag my MP3 files. Today I'll share my experience in displaying cover art in various media players.

I am using two portable players: An Android phone and an iPhone. On my laptop I usually use iTunes, but sometimes I fall back to Windows Media Player because of its fast startup time. I keep MP3 files in individual folders per album, so I also want the thumbnail view of Windows explorer to show the cover art.

Let's start with a short summary of what works for me: Embed cover images into the first track of every album, and additionally save them as Folder.jpg files in the album directories. See below for the long story.

Analysis of different players

There are various ways of attaching cover art to MP3 files, and every player that I use seems to do it slightly differently. Here is what I found out:

  • iTunes stores cover images in its own proprietary storage in some ITC2 format that I do't know anything about (My Documents\My Music\iTunes\Album Artwork\Download\6118F104927B998E\10\10\05\6118F104927B998E-6DBB7171FCCCC5AA.itc2). Fortunately, it also shows images that are included in the MP3 files.
  • The iPhone seems to display whatever iTunes displays.
  • Android also works fine with cover images embedded into the MP3 files.
  • Windows Explorer expects cover art in Folder.jpg files. It does not show embedded images.
  • Windows Media Player seems to keep cover art in a whole bunch of different hidden files like Folder.jpg, AlbumArtSmall.jpg, AlbumArt_{SOME_GUID}_Large.jpg, etc. It does read covers from the MP3 files however. If you import a MP3 file into the Windows Media Player library it automatically generates all files. This includes Folder.jpg, which is needed for Windows Explorer

In summary, all of my players show images that are embedded in MP3 files. It seems to be enough to embed a cover image into the first track of an album. Windows Explorer needs Folder.jpg, which is easiest to create by importing files into Windows Media Player.

Caveat: Windows Media Player resizes Folder.jpg files to 200x200 pixels without asking, so don't use this file as your primary storage. I want my covers to be 600x600 pixels, which seems to be a good compromise between file size and high quality (e. g. for iTunes cover flow). Because of that I have an additional Cover.jpg file in all of my album directories. This is not needed for any player, but I like to have it there for scripts that I use, e. g. to generate listings of my files.

Getting and embedding cover images with iTunes

Before you can embed cover art into an MP3 file you need to have it. Of course you can scan them yourself, but I find it much easier to use iTunes, which has many album covers in a very high quality.

Here is what you need to do: Import the album MP3s into the iTunes library and choose "Get Album Artwork" in the album context menu:

Sometimes iTunes does not have a matching cover - then you are back to scanning yourself. But more often than not you get a cover image. As mentioned above, iTunes stores it in its own proprietary format, but fortunately it is quite easy to extract. Open the album and right-click the first track, and then "Get Info":

In the dialog that opens go to the "Artwork" tab, select the image and copy it with Ctrl-C or using the context menu. Then immediately paste it back using the context menu or Ctrl-V. Click OK and iTunes saves the image directly into the MP3 file.

It is worth mentioning, that you can of course also paste the copied image into your favorite graphics editor, or straight into an Explorer window. The latter creates a file "image 1.bmp", which you can then convert into a JPEG, e. g. to use it as Folder.jpg

If you don't want to create Folder.jpg yourself, simply import the folder with your MP3 files (and with the embedded cover) into the Windows Media Player library. It will then generate Folder.jpg for you.

10 comments:

  1. is there any way to automatically associate the album art from itunes to the actual file... Ie. can I embed in the file the album art stored in the itunes ITC2 file without selecting all albums, copying the file, the pasting it in?

    Is there any script or anything you are aware of that will embed the jpg to the mp3 without the manual copy, paste?

    ReplyDelete
  2. Hi Perkna,

    I have not used any software that does this automatically. Could be that MusicBridge (http://jrmwillis.googlepages.com/) can do this, but I don't know.

    Mike

    ReplyDelete
  3. songbird stores the album art in the file automatically. if the cover is not found for any reason there is this nice drag and drop feature to add them to the file.

    ReplyDelete
  4. check out Teridon's iTunes Scripts
    http://lifehacker.com/5166186/teridons-itunes-scripts-lets-you-batch-edit-your-itunes-collection

    ReplyDelete
  5. Thanks for sharing such an valuable information, these are very useful.

    ReplyDelete
  6. Is it possible to show pictures for individual mp3 files (not just folders) on windows explorer? Obviously windows explorer can show thumnail pictures for video and image files, and for folders containing mp3 files, but is there any way of adding a picture for an individual music file or any other type of file within windows explorer?

    ReplyDelete
  7. Within the "Artwork" tab, I copy and then paste back the image. Sometimes the result is that the image become imbeded in the mp3 file but it does not work every time. I don't understand why. Sometimes, even if the file grows in size, the image does not show.

    When the copy/paste procedure does not work, I simply copy the image in a folder then use a id3 tag editor to imbeding the image in the mp3 file.

    ReplyDelete
  8. Here is a link to a simple python script that can embed images into MP3s (on Linux)...

    http://blog.lostpaperclips.com/2010/10/16/embedding-images-in-mp3-files-redux

    ReplyDelete
  9. Thank you so much for this!
    I am using a Android HTC Desire HD, HTC sync software to take certain playlists off Itunes and onto my mobile. However it only takes a (seemingly) random selection of the album art.
    However by following your advice and forcing Itunes to embed the picture it is fixed!.

    Thanks again.

    ReplyDelete
  10. is there a way to remove artwork from a mp3 file i have a audi with a mp3 player which shows a lot of ghost files all of the mp3,s that have art work .i have to run through these before getting to the files that are music files
    thanks nickt@powerdsl.com.au

    ReplyDelete