Dale Preston's Web Log
Tuesday, November 20, 2007

More Windows Media Player Album Art Tips

I have written often about the problems with album art and Windows Media Player. And still I continue to have problems with it.

Recently, I built a new home server for sharing my MP3 files across all the PCs in the house. The new server is a real power-house: Vista Ultimate X64 on dual quad-core Xeons with 8GB of RAM - for now - and 2 TB of disk space - also for now. After carefully migrating all my MP3 files to the new server, including all of the precautions I mentioned at http://dalepreston.com/Blog/2007/04/windows-media-player-and-album-art.html, I thought I was finally set. That was until I added the first new CD to my collection. As Windows Media Player is wont to do, it immediately overwrote my scanned images with reduced 200x200 pixel images.

So the latest defense I have come up with in this never ending battle to protect my property from Windows Media Player, I finally decided to come up with a simple way to set the file permissions to totally block Windows Media Player's access to my album art. The solution is a batch file calling Vista's security tool, cacls. There is a new tool, icacls, in Vista but I was not able to figure out how to get what I wanted with the new one. Luckily, cacls is still supported in Vista - and it has the benefit of also working in XP.

I've mentioned before that I never rip using Media Player because of the poor quality of the Microsoft online CD database. My current solution is to make a temporary holding folder into which I copy my MP3 files after ripping them using iTunes - make sure you are working with a copy; this is, afterall, Windows Media Player we're messing with here and Windows Media Player will try very hard to destroy your quality album art.

The content of my batch file used to run cacls is:

CD \MusicHoldingForACL
cacls Folder*.jpg /T /P Dale:R
cacls Folder*.jpg /T /E /G InstallUser:F
CD \My Music
cacls Folder*.jpg /T /P Dale:R
cacls Folder*.jpg /T /E /G InstallUser:F

First, it changes to the E drive. I never keep my media on the C drive. I don't want to run out of space on C. Next, I change directories to my temporary working folder, MusicHoldingForACL. This is the folder where I manually copied my ripped MP3s and placed my scanned album art, renamed to Folder.jpg in each album folder.

The first call to cacls changes all jpeg files beginning with "Folder". The /T option makes cacls iterate through folders and subfolders. The /P option tells cacls to replace all existing permissions for all users with the list provided. Finally, Dale:R means that Dale (me), will have only Read permission to the files.

Because I don't want to lose the ability to access the files completely, I next assign an alternate user full control. In my PC, I have created a user named InstallUser. This account is never used to log into the PC - and therefore never runs Windows Media Player. I normally use it from other PCs in the house for accessing shared installation files stored on the server. This account is also used by my backup PC to backup all of the PCs in the house to removable hard drives.

In the second call to cacls, I give InstallUser full control via the F in InstallUser:F. The /E option means to edit the existing permissions which means the InstallUser permission is added to the Dale:R permission from the first call to cacls. The /G option tells cacls that I am Granting the full control permission rather than /R for Revoking permission.

Next, and it might be that I am paranoid, I change directories to my regular music folder, My Music, and use the third and fourth calls to set the permissions in My Music all over again, just in case I missed something somewhere along the line.

The last step is to simply use Windows Explorer to copy the album folders from MusicHoldingForACL folder to My Music. This step could be easily added to the batch file as well.

Dale, if you use AAC (or Apple Lossless) rather than MP3 format, you can still play the tracks in WMP (with a suitable directshow filter) but even with the appropriate plugin for WMP to let it read meta tags from m4a (AAC and Apple Lossless) files, it will not be able to write to them (the plugins only give read access).

This means embedded artwork cannot be mutilated by WMP (hurray).

Unfortunately the plugins don't (yet) let WMP read the embedded artwork either, but you mentioned you use your own player application anyway. So, if you add the ability to read embedded artwork from m4a files yourself it will still work.

As a bonus, these formats will still work in your wife's iTunes.

I have my entire music library in Apple Lossless (ripped using iTunes) with embedded artwork mainly from the iTunes store (which is legal) and shared with WMP10 and Media Center 2005.

Note: by itself iTunes does not embed the artwork but it is easy to do by copying to the clipboard, clearing the downloaded artwork, and then pasting it back in (which embeds it).

Until (if ever) Microsoft actually get round to adding some new features to Media Center for Europeans, I am not bothering to upgrade (downgrade) to WMP11 and Vista.
I have always liked your Apple Lossless suggestion, John, and have been passing it on often in the newsgroups. At least that way you can create as good as possible quality in MP3s when you need them.

So far, WMP 11 does not mess with existing embedded art, only if it embeds the art itself. As they have admitted to trying to "close loopholes" that allow you to use yoru own or high-quality album art, I expect this to change in WMP 11.5 or WMP 12, such that they will destroy even album art embedded by other programs.

Currently, I use my ID3 Embed Pictures app to bulk embed album art which is much easier than one at a time, especially with an existing library.

Embedding art one at a time as CDs are ripped for new CDs wouldn't be too bad, after all, that's only a few a month.
So you have to login as Install user to edit images?
When copied it maintains the acl setting and acl does not consider copying as access?
So move won't work and to delete temps you have to login as install user?
You are saying even though wmp ignores:
1. Read only and system bit
2. All reg settings
3. Any firewall (sw & hw) setting
4. hosts file
It follows the acl rules?
Seems very bizarre the wmp d/l file won't allow my user to edit/clobber the file since system bit is set, yet denying acl access from my user will stop wmps viral behavior?
Still testing this.
Not sure I understand your script.
You set acl to read only and after that you add a user for full? Once they are set read only how can that read only user add a full access user? I use xp simple file sharing so only cmd will follow such rules, however your tests show WMP does too?
I am implementing your backup routine which will include nuking AlbumArt*.jpg. Maybe a mediamonkey script?
Are you aware of the new /d option for cd?
Google blog still seems to only post sometimes.
Please help me! Dale you seem to know everything about WMP. I cannot get album art onto my mp3 player no matter what i do. I know its possible because I did it before with this device on another computer. Whats strange is it won't transfer art that i add manually to the songs either. I hit Apply media changes before syncing and it normally says "Server Busy" or "Retrieving media information and updating files... Progress 0%" and it stays like that all day even for only a few songs, Im not around to see it complete but it does, yet the album art doesn't transfer to my device when syncing. I tried deselecting "Retrieve additional information updates for files" in options menu to solve the waiting problem but again the art isnt transferred to my device (even the art I added manually to the songs from my computer) I know public computers can restrict this but this computer is mine, am I missing something in the options menu? Maybe auto syncing will make it work? Im about to kick my new vista premium computer for depriving me of my precious album art!
Post a Comment

<< Home

Powered by Blogger