Dale Preston's Web Log
  
Sunday, March 04, 2007
 

ID3 Embed Pictures



Click to view full size

Note: ID3EmbedAlbumArt is no longer available for download. Checkout my newer album art tool, ID3AlbumArtFixer.



ID3 Embed Pictures is a small but powerful utility for embedding artwork in your MP3 files. Note, it does not work with WMA or AAC - only MP3. That's because only MP3 files support ID3 tags.

Because both AAC and WMA format files are used for both protected and unprotected music, I recommend never using either. MP3 files cannot be protected and you can never lose the ability to exercise your fair-use rights or to listen to the music you have purchased. Virtually every portable player ever made plays MP3 files - thus the term MP3 Player even for players that are not playing MP3 files - because even iPod will play MP3.

To use Preston Media ID3 Embed Pictures, you must have the Microsoft .Net framework, version 2.0 or version 3.0 installed on your computer. All Vista computers have .Net 3.0 and will run Preston Media ID3 Embed Pictures.

Why use Preston Media ID3 Embed Pictures


I have tested and used ID3 Embed Pictures on my media library for over 2 years before this initial public release with no harm done to my existing files or library. Even so, until you are sure how it works on your own library, I suggest that you work with backups of your media tracks and artwork.

Dale Preston and Preston Media will assume no responsibility for any loss of data or damages related to the use of this program.

Remember: Backup your files before using any program to make changes, including Preston Media ID3 Embed Pictures.

ID3 Embed Pictures is designed to quickly embed album art or other images into the ID3 tags of your MP3 files. ID3 Embed Pictures only works with MP3 files.

If you use Microsoft Windows Media Player, it will automatically download album art to your music folders but it does not embed the art into your MP3 files. You may want to embed the art to preserve the relationship so that you don't lose the album art when you move tracks from one PC to another or from your PC to a portable device or MP3 player.

Another reason for embedding album art in your MP3 files is that iTunes and some other media players only displays album art that is embedded in the file.

The best reason for embedding album art for Windows Media Player users is that the album art provided by the Microsoft/AMG database is often low quality or wrong. Additionaly, the Windows Media Player product team has added code to Windows Media Player to limit album art to 200x200 pixels - a ridiculously small image size for displaying on any modern PC monitor. In fact, in Windows Media Player 11, they have patched what they called loopholes by resizing images being embedded using Windows Media Player down to 200x200 pixels. If you create your own images by scanning your CD covers or downloading 500x500 pixel images from Amazon, Windows Media Player will still shrink the images as it embeds them. Preston Media ID3 Embed Pictures gets around that because, so far, Windows Media Player does not change images embedded outside of Windows Media Player. When playing tracks in Windows Media Player, embedded album covers will be displayed, if they exist, instead of the potentially erroneous, always low quality, Windows Media Player provided album art.

How to use Preston Media ID3 Embed Pictures


To use ID3 Embed Pictures, start by obtaining the album art you want to embed. The best choice is to scan your own CD cover. Alternatively, at the time of this writing, Amazon has 500x500 pixel album art of most CDs that they sell. Place the album art for each album in the folder for the album. You can name the image Folder.jpg to use it as the folder art when viewing icons in Windows Explorer.

Be careful, though, because Windows Media Player hijacks this published Windows behavior for its own album art. The Windows Media Player team behaves as though they own that art and will replace or resize it to their own specifications without warning, the ability to opt out, or creating a backup first. This is even if you had spent hours hand (mouse) creating your own album art. Make sure you keep backup copies of all your custom album art to prevent its destruction by Windows Media Player.

If you are more concerned about the embedded art and not about the Folder.jpg functionality in Windows Explorer, just name the file something other than Folder.jpg - ID3 Embed Pictures can handle it. The important thing is that all the files you are going to embed should be named the same. ID3 Embed Pictures will search starting with the folder you specify, and optionally any subfolders as well, and will embed any image matching the name you specify into any MP3 files in the same folder.

Specific Instructions



1. Image file name:
Enter the filename of the image to be embedded into each track. Do not include the path to the image. ID3 Embed Pictures looks for the image filename you provide in each album folder. If the filename you specify does not exist in any album folder, no changes will be made to the MP3 files in that album folder.

2. Description:
Enter the description for the image. This can be anything you want up to 64 characters in length.

3. Select image type:
The image types available are all those defined in the ID3 specification at http://www.id3.org. Yes, that includes the entry for "A brightly coloured fish".

You can embed multiple images of most types except for "32x32 pixels 'file icon' (PNG only)" and "Other file icon". Both of those types can only exist one time in the ID3 tag. ID3 Embed Pictures will always replace one of those types if you try to add another instance of that type. Any other type can exist multiple times as long as the description field is different in each successive image. If the image type you embed is the same as an existing image type in the ID3 tag and the description is the same as the existing description, ID3 Embed Pictures will always replace the pre-existing image.

I have not tested the behavior of any player, including Windows Media Player, if there is an image of type other than "Cover (front)" and no instance of "Cover (front)". I suggest that, in addition to any other image types you choose to embed, you always embed the "Cover (front)" type for display in whatever player you listen to your media with.

4. Include subfolders
Check this box to include all subfolders. This is handy if you want to embed album art into your entire library or all tracks for an artist. If you have existing album art in each album folder named Folder.jpg from Windows Media Player and you want to embed that image into every track of your library, just browse to the root of your music library, typically My Music. This should be the folder where all your artists are shown. Check Include subfolders and when you click Execute, album art will be embedded into every file in your My Music folder.

5. Delete existing images
If you do not check this box, no existing images will be deleted when you add an image using ID3 Embed Pictures except for those instances described in the paragraph titled "Select image type" above.

With Delete existing images checked, you have the option to either:

• Delete all pre-existing images, leaving only the image you are currently embedding when you are complete.

• Or you can choose to delete only pre-existing images of the same type (regardless of the description field). For instance, if you have pre-existing "Cover (front)" images, regardless of description, and you choose to delete pictures of the same type while embedding a new "Cover (front)" picture, all pre-existing "Cover (front)" images will be deleted but any pre-existing images of other types will still be in the tag.

6. Enforce maximum size
If you do not check this box, ID3 Embed Pictures will attempt to embed the image you specify regardless of its size.

The ID3 specification includes features that limit the maximum size of a tag including all metadata and all embedded images to a total of 256 MB combined. It is indetermined what behavior you will get when creating tags larger than 256 MB. Typically, a 480x480 image (my favorite size for embedding) will be at or below 100KB in size. You would have to embed thousands of images (defintely not recommended!) to get into trouble. But if you scan your album art at high resolution, it is very possible to get images that could go over this limit. Again, that is not recommended. Reduce your scanned images to a reasonable size. I suggest no larger than 500x500 pixels - much better than the seemingly arbitrary (but more likely content ownership related) hard limit of 200x200 pixels allowed by Microsoft Windows Media Player. In any case, the choice is yours.

If you do check the Enforce maximum size box, you can specify any size you choose from 32x32 pixels to 10000x10000 pixels and ID3 Embed Pictures will resize the image to meet your specifications.

If you select a picture type of "32x32 pixels 'file icon' (PNG only)", Enforce maximum size will always be checked and the maximum size will be set to the required 32x32 pixels.

7. Results
The results panel shows what is happening as it happens. Each track that gets the image will be listed along with a display of the album art currently being embedded. This image will change as ID3 Embed Pictures navigates through your library showing the current album being processed.

When the whole process is complete, the number of ID3 tags updated may not show the same number as the number of files that could have been updated. This probably means that one or more of the album folders did not have an image file matching the image filename you specified.

Note: ID3EmbedAlbumArt is no longer available for download. Checkout my newer album art tool, ID3AlbumArtFixer.



To use Preston Media ID3 Embed Pictures, you must have the Microsoft .Net framework, version 2.0 or version 3.0 installed on your computer. All Vista computers have .Net 3.0 and will run Preston Media ID3 Embed Pictures.


Comments:
I was wondering if you were working on a way to automate the album art. I've heard of other programs that search your library (or selected folders) and will then search Amazon.com for the album art, and add it to each file. I was wondering if you were developing something like that, because it would be useful, espically if it was accurate.
 
Also, it would be nice to do the opposite of what your program does (scan the directory for MP3 files, copy the album art, resize if necessary, and paste the file as a FOLDER.JPG file for Windows to use.)
 
Your question about automating retrieval of album art from Amazon is interesting. I will look into the legalities and copyright issues. If it is legal, I will consider adding it in a future revision.

The other question extracting images from the MP3 file is interesting as well. That is on my todo list already. I don't think I would re-size them but I might include the option. Increasing the size of an image is always a bad idea, even though Windows XP Media Center does it by design (YUCK!).

And I see no reason to resize down. I wouldn't want mine scaled down. And Windows Media Player 11 is going to scale them down to 200x200 pixels whether you or I want it to or not.
 
On a completly different subject, I was wondering if you were going to add "advanced" folder handling. Here's what I mean by "Advanced". Most programs will default the library to an Artist folder, with Album subfolders, all within a single "base" folder. My library is too large for this organization. I have added one more level (between the "base" folder and the "artist" folder.) I have the "base" folder, then a folder for each letter of the alphabet (A, B, C, etc.), then I have the Artists that begin with the letter in the correct folder. This makes it easier to search for music using the folder views.

Obviously, this "advanced" feature would only be needed for large libraries, but it would be nice if your program had that option.

P.S. Is this blog the correct way to contact you about these issues, or is there another way? Also, I was wondering if you were looking for a beta tester? I can offer mainly my experience with MP3s since the Napster era, user interfaces from different programs, and ideas.
 
Annon, I believe you have the mistaken idea that I have something to do with Windows Media Player. I do not. I am simply a music and, prior to WMP 11, Windows Media Player fan. I have written the utilities I publish here for my own use over the last few years to address shortcomings in Windows Media Player and have discovered in the Windows Media Player newsgroups that others have the same frustrations that I have and would benefit from my utilities. So I published them for all to use.

As for your advanced folder idea, I do not know of any way to make a suggestion or submit a bug to the Windows Media Player product team. They have chosen not to use any of the community feedback mechanisms that other Microsoft products use. There's really no way to communicate WMP issues to Microsoft except to call Microsoft Product Support for a fee of anywhere from 35 dollars (soon to be 59 dollars) up to several hundred dollars depending on your eligibility and support needs. If you purchased your copy of Windows through an OEM included on your PC, you are not eligible for any support from Microsoft and you cannot report a bug or suggestion to Microsoft for any amount of money.

Also, I think it would make more sense to use blog comments to comment about the blog article. A better way to communicate with me would be to find me where I hang out almost daily: the Windows Media Player newsgroups at http://www.microsoft.com/windows/windowsmedia/community/newsgroups/windowsmedia/default.mspx.
 
Actually, I never thought you officially had anything to do with WMP. Granted, I found your website when you responded to a problem I posted on Microsoft's WMP forum, but I was under the impression that you an independent person. From those posts, I gathered that you are developing some sort of program to mess with ID3 tags, which is why these little utilities are comming out. Each utility was part of a larger program, which you were developing. I was just trying to provide input for you.

In the future, I'll keep my posts "on-topic".

Thank you for your help, and I look forward to more little utilities.
 
Hi Dale,
I'm very impressed with you're utilities so far. U have skill

I have a request/suggestion.

The ID3 Embed Pictures utility is good for people wanting to embed folders.jpg, but for people like me there is nothing that will work.

I have recently upgraded to media center edition and i have the newest and greatest media player etc. anyway, the problem with it is that MCE doesn't like embedded images and preffers just the folder.jpg images in the folder. I have both.

I'd like to be able to (in a batch manner like you're program) remove all embedded images in all mp3 files in a certain folder, leaving folder.jpg in place.

anyway keep up the good work and i look forward to your collection...
 
I seem to be having some issues with your program. It doesn't always embed the Folder.jpg in the file. It seems like it is only on some folders and mp3s. I have completely cleared the id3 tags on those mp3 and they still don't get the image. I have changed the name of the folder to test thinking it was the folder name and still no images. The progress bar just zooms by and nothing in tag. It seems to work on other folders. I have tested it on Vista Enterprise, Windows Server 2003, and Windows XP with the same effects. I have also tried the mp3 on the local hard drive and on a shared network drive. Any ideas?
 
Hey Dale,

This is a very useful application! I am a user of Sony Ericsson and the Walkman feature on it is only able to show embedded album art. Many users stumble upon the problem of mass processing their music collection.

I found that your application has issues with certain files and gives me the 'FrameValue does not represent a valid COMMframe' error message (whatever it might mean). I don't know if it is possible to export the faulty folders to some 'quarantaine' folder and let the program go on with processing. I don't know how to handle those files yet (maybe you do) but I might replace them by other copies. Furthermore it would be handy to have the app actually installed instead of running the .exe so that it can record the latest settings.

This is just my input but I really think that your program has great potential! Thanks you for sharing.

Ize
 
Ize,

COMM frames are used for storing comments in ID3 tags. iTunes is a big user of comment frames and creates comment frames that do not follow the specification. Other ID3 tag editors may very well do the same thing.

I built my ID3 libvrary to handle the bugs in iTunes COMM frames - at least those that I have run across - but I cannot say about all of the others ID3 editors that may have problems.

If you will email me one of the defective tracks to dalepres and then the at symbol and then msn and then dot com, I would like to see what is breaking the COMM frames and if I can build in a work around.

You may also want to try looking at my ID3 Raw Tag Viewer. You can use it to delete specific frames or tags from your MP3 files - assuming it can handle the broken frames. If not, you'd have to delete the entire tag.

With frames that do not comply with the ID3 standards from http://www.id3.org, I cannot always interpret what the program that created those frames was trying to do, and I cannot interpret what the user wants to do.

Dale
 
Well, what you said is proven to be true because what I did is load all the files in ID3-TagIt and copy the vital track information to the filename, then delete the tags and extract the info for new tags. Then I could easily embed the art into the new tags. Downside is that at this moment I don't have any faulty tracks left! I will save the next error encounter and send it to you. By the way, I have succesfully embedded art into nearly 10k MP3's! Looks really cool on my Walkman phone with 4GB storage. :)
 
Dale,

Hello. Great program! This is exactly what I was wanting, and I was about ready to write one myself -- in C# no less -- when I found yours.

However, I encountered the same problem as Ize. All of my MP3s would give the COMMframe error he describes.

I decided to investigate. First, using your raw tag viewer, I found that my MP3s all have a single v2.3 COMM frame which is, essentially, empty (no description, no text). After language is a single null and nothing more. According to the ID3 v2.3 specs for the COMM frame, this is valid. The text between the language and the null would be the description; the text after the null but before the end (as computed using the header size field) would be the text.

Being the impatient, overzealous type, I used Lutz Roeder's .NET Reflector tool to extract (disassemble) your assembly to C# code and set to work figuring out how to solve the problem for my own situation. The problem occurs in ID3Lib. It appears that Frame.ParseNullTerminatedStringList(...) is returning "new string[0]" for these empty frames because it sees that "bytes.Length" (1, the null) is equal to the "terminationBytes.Length" (1) plus "bOM.Length" (0). COMMFrame.ParseFrameValue(...) then sees this 0-length array and throws the error because it is expecting 2 strings to come back (desc, text).

In my own particular case, I saw no reason why I couldn't simply remove these empty comment frames from my files... So, I modified COMMFrame.ParseFrameValue(...) to record via a bool member whether the frame is "empty" (textArray.Length == 0). I modified COMMFrame.Write(...) to return 0 if this member is true, which of course results in these frames being skipped during the write-back stage. I then ran the modifications against some test folders and it worked for me.

Thanks for all your work on this! All the 'semi-professional' tagging software I've tried seems to think that I actually want to sit there manually browsing 13,000+ times to add art to my 13,000+ tracks. Automatically using Folder.jpg seems like common sense to you and me.
 
Hi Dale,

I seem to experience the same problems as the "anonymous user" above.

I'm using .NET framework 3.0, and the embedding works only on a few directories. For a large majority of them, the progressbar completes quickly and indicates success x/x tags written, but the files are not modified.

At first I thought about a directory name issue, but it seems to have no link to my problem..

Is there something i'm missing ?
 
I forgot to tell you that your piece of software is very nice and to thank you for your work ! Simple, easy to use and efficient, software as I like it.
 
It appears that the program doesn't like it when the specified image does not exist (i.e. "Album Art.jpg"). I'd like to just set "My Music" as the root folder and scan my entire collection, skipping any directories that don't have "Album Art.jpg", but this isn't currently possible. The error I'm getting on any folder containing mp3s but no image is "Valud of 'null' is not valid for 'stream'".
 
Great little program - like some other commenters here, I was worried I would have to make something like it myself.

Anyhow, question: does the "Delete existing images?" option delete the original image files or the prior id3-embedded images or both? What I want to do is only delete existing id3 images.

Thanks,
Bjorn
 
I would also love to see a way to batch run your program on all of my album folders at once. I thought the "Include subfolders" option would do that, but it caused the following error message:
http://i10.tinypic.com/6pgvzg6.jpg

Bjorn
 
Bjorn,

You didn't provide the details section of that error report so I can't say for sure but your problem may be related to a newly discovered issue with the program. With multi-core processors, there is a threading issue. I have identified the bug in my program that never showed up in any of my PCs, even multi-core, except in Windows Vista. I am working on a workaround.

As for your question about deleting files, that option in in the program only deletes the embedded files in your ID3 tags; it does not delete any image files from your PC.
 
I just tried this out on a group of six albums. Five albums worked, but one gave me the error: "Frame already exists: Cover (front), Description:". In addition to this, two songs from two different albums disappeared from my Windows Media Player library. The files are still there and I can play them by double-clicking on the file, but they will no longer show up in the WMP library.
 
The two tracks that no longer show up in your library probably have corrupted ID3 tags. I am not sure why they would have gotten corrupted. It is probably related to the error you got about the frame already existing. Make sure you delete existing pictures when adding new. I wouldn't have expected this to cause you a problem but unexpected bugs do happen in software :). Use my Raw ID3 Tag Viewer or ID3 Tag Backup to remove the now corrupted ID3 tags, rebuild the tags in WMP and try again. Let me know how it works.

I am very interested in identifying and resolving the issue that caused your problem. Email me at dalepres at msn dot com and let's work on it together.

Thanks,

Dale
 
This application is great. I have one question. Using the id3lib.dll how does one just tag a jpg file into the APIC frame using Jscript.NET ?

var id3 = new ActiveXObject("Id3com.ID3comTag");
var AlbumArt : FileInfo = new FileInfo(path+"folder.jpg");
id3.link(fileMP3);
id3.title = id3title;
id3.Artist = id3artist;
id3.Album = id3album;
id3.year = id3year;
????id3.APIC = AlbumArt; ???
id3.Savev1Tag;
id3.Savev2Tag;
id3.clear;
 
Dale, Thank you so much for this utility. It's exactly what I've been looking for for around a month. I was just starting to write something of my own to get all of my music tagged with album art for iTunes and just happened to stumble upon your tool.

Thanks,
Hans
 
I'm trying to use the program, but I'm getting an error.

When I click execute it says FrameValue does not represent a valid COMMFrame.

???
 
Hey Dale, great tool - perfect..!!
 
The application has problems with some formats for COMM frames - particularly Apple's format. I don't think Apple's COMM frames follow the description in the ID3 spec but other ID3 experts disagree with me. In the end, it's Apple. I have to find the issue and fix it to work with iTunes (and any other program with the same format for COMM frames).

For those having the issue, I apologize that I have not fixed it yet; this is freeware and there's no one to pay the bills for me to spend the time on it right now.
 
Being Greek I have many CDs with Greek songs. I use Greek Language Keyboard (MS) and use the various accents/intonation marks. I used your id3 embedder for my album art. However, once I embed the album art, I end up having the greek information being replaced by jibberish. Is there a reason why this is happening? Can it be avoided?
 
Prodromos,

I am sorry you're having trouble. Because this has been a one man development effort, and I don't speak a second language or have a computer configured for a second language, I am unable to test the code I put in for globalization.

If you would send me a couple of your working MP3 files (those you haven't broken by using my tools) I will see if I can test it. I can set up a virtual machine for the Greek language - I think. It will be an interesting test. Email me at dalepres at m s n dot c o m with the sample files and the exact language setup you use on your PC. I can't promise how quickly I can look into it or if I can fix the problem but I will do what I can.
 
Dale -

Thank you SO much! I was fighting with WMP because it was showing some 200x200 art work even though I had embedded art work at 500x500. I deleted the files through WMP and reapplied the artwork using your embed tool. Then I added them back to WMP. Voila! Now the 500x500 shows.

Question - where can I download the player you created? It would be perfect for me.

Thanks again.
 
Post a Comment

<< Home

Powered by Blogger