3 posts tagged “metadata”
Thanks to all the people who dropped by after the link from John Gruber, and indeed to him for (evidently) leading people here. Hopefully it's been useful. I appreciate all the comments, on vox and off. I hadn't really thought about the implications of posting an article like that on a site that requires the creation of a login, and of course these days it's not exactly a great idea to leave your email address lying around, so bonus points to those of you who managed to evade my (rather bad) spam filtering.
Some specific comments, then. Thanks to Rod Begbie for his comments about MusicBrainz, which has apparently supported sort data for a while, and Todd Larason for his dissection of ID3 tags that iTunes uses. I also updated the article to clarify how to apply fields to multiple items after an email from Chris Brummel made me realise that they weren't quite clear enough.
Speaking of applying fields to multiple tracks, Jacob Rus sent through an AppleScript that allows you to select a batch of tracks and apply a "Sort Artist" to each of them. It's worth reading the commentary at the beginning, as it's a little fragile (as scripts that rely on orders often are), but it also looks to be a useful fix for some of the UI issues noted in my original piece.
One of the key new features in iTunes 7.1, which came out earlier this week, is "enhanced sort options". What does that mean? Why would you want such a thing? How do you use them? I'm here to answer all of these questions. Hopefully.
Before iTunes 7.1
Since at least iTunes 5, there's been automatic discarding of stopwords (for example, "the" and "a") at the beginning of group and album names. This means that The Beatles are found under B, not T. However, John Lennon still appears under J, because iTunes didn't do automatic name reversal.
(Of course, there are good technical reasons for this. Take "The Beatles", "Tori Amos" and "Carter USM" and tell me what order they come in. Naively you'd have "Carter USM, The Beatles, Tori Amos", and iTunes manages "The Beatles, Carter USM, Tori Amos", but a record store would be able to use human ingeniuity to list them as "Tori Amos, The Beatles, Carter USM". If you can codify rules for distinguishing Carter USM and Tori Amos, though, I'll be amazed.)
Some people modified their MP3s to have tags that put the names the other way around, just for sorting, but most of us just dealt with it as best we could and remembered to hit T for Tori Amos, even if we'd rather have looked in A.
One slightly odd implementation detail of this feature was that users whose iTunes interface was in languages other than English had their own list of stopwords, so for German users The Beatles were indeed sorted to T. Sven-S. Porst provided a small patch to correct this, but there was no official way to fix it, any more than there was a way to make John Lennon nestle amongst the Ls.
Apple obviously started caring about this, because iTunes 7 introduced a new sorting option, although it's far from obvious where to find it. If you click on any field heading in the main iTunes track list, the library is sorted by the desired field. However, if you click on
Album repeatedly, you get "Album by Artist", which sorts by artist first, then
by album, then "Album by Year", which is similar except the year of the album is taken into account (so you can
play through a band's career in chronological order.)
One consequence of this change is that to modify the sort ordering (from A-Z to Z-A, or chronological to reverse chronological), you now have to click on the arrow. Previously, you could use any part of the header, but the introduction of the sorting options discussed above made that impractical.
New in iTunes 7.1
iTunes 7.1 sees an overhaul of sorting. The easiest way to see this in action is to go to View > View Options (also available by using Command J) where you'll see a series of fields prefixed "Sort". Enable one (I suggest Sort Artist) and it will appear in the main library window, but you'll notice the contents are grey. Despite this, the contents are editable. Even if you've never used the feature before, you'll see a few fields filled in; these are the previously-implicit sort options discussed above. You can sort by the Sort Artist field, although this is a bit silly, as it's exactly the same as sorting by the Artist field- after all, that's the point. I imagine you'll want to switch the field off again, though, as it takes up a lot of space without telling you anything useful.
If, as I suggest, you don't use a column to show the sort ordering, how can you edit it? The easiest way to do so is to select a single track and open the Get Info window (command I). There's a new panel in this window, halfway along, called Sort Options. In this window you can customise the details of not only the album and artist name, but also the song name, and other fields. So if you want to move John Lennon from J to L, put "Lennon, John" in the Sort Artist track.
Astute readers will have realised this only applies to the track they've selected, and possibly leapt ahead and tried selecting multiple tracks and opening Get Info once more. Here we hit a snag- this dialog doesn't show any sort fields. How, then, do you fix up all those tracks? It's far from obvious, but there's a menu option: Advanced > Apply Sort Field (also available in the context menu). Select a track for which you've already mofidied a sort field, then select this option, and you'll see one of the least clear dialog boxes I've seen recently.
What it's really asking is "Do you want to change the sort artist of all tracks by 'John Lennon' to 'Lennon, John'?". You probably want to both say Yes to this, and to check the "Don't ask me again" box for good measure.
Custom sort data is written to MP3 files; for example, the Sort Artist is in the ID3v2.3 field TSOP. However, the initial (implicit) sort data (such as "The Beatles", mentioned earlier) isn't encoded into tags. (Thanks to Sven-S. Porst for the correction.)
As a final side note, I'll mention that the new "Album by Artist/Year" option noted above didn't work over iTunes Library Sharing in versions of iTunes, until the release of 7.1, so it's nice that that's fixed.
In conclusion: is it any good?
Sort field customisation is a really powerful feature, but Apple's implementaton is pretty annoying. I'd rather not have had the option to view sort fields in the library, and instead get a more sensible way of applying sort fields to multiple tracks, either by a second pane in the multiple track Get Info window, or an automatic "You've changed John Lennon; do you want to apply this to all John Lennon tracks?" dialog.
Apple's documentation of this feature is also nearly non-existent. There's a single page in the Help Book for iTunes on sorting, and while it says "For example, you could set up iTunes to sort songs by an artist's last name instead of the first", it gives you no idea on how to manage this. Let's face it, people don't write blog entries like this for obvious features.
On the other hand, as far as I know, no other major music library manager application has attempted to solve this problem before, and the underlying infrastructure is fairly sound. I just hope that there's a chance to apply a little UI polish in the future.
(Thanks to Tom Insam for poking at a copy of iTunes while I was at work and Sven-S. Porst for his post on iTunes 7.1 which prompted me to make more of a how to guide.)
As I've already said, I've moved a bunch of my old photos across to Flickr. I've also picked off another of the scripting chores mentioned there: I went back to the files on disk, looked up the ordering, and applied it within the sets. I've also ordered the sets by reverse date, and I have a bunch of handy .flickr files so that I can find the ID on Flickr given just the filename on husk.org.
You'd think I'd be done, but my quest for perfect organisation (which will be apparent to anyone who's seen my music collection's metadata- although I have to admit there are niggling holes there too) means that I have further problems.
Replicating heirarchy: sets vs tags
On stem, my old photo album, there was a heirarchy of directories, although I didn't really use it that much. Mainly, sets fell into five categories: "trips", "walks/wanders", "walks/crisps", "people" and "random".
Flickr doesn't (yet?) have a feature that allows you to put sets into other sets, so I can see three ways of retaining this information:
- set titles - at the moment things are called eg "Trips - New York"
- multiple sets - add all photos that were in Trips to a huge "Trips" set, so that the heirarchy is visible in what Flickr calls "context"
- tags - as well as my existing "stem" tag, use a psuedo-triple* like "stem:random"
I think I'm probably going to use the latter, since it feels most Flickr-y, but it does mean I'm going to have to do a bit more scripting to apply the tag across.
Re-uploading
In my previous post I mentioned that a lot of my photos are overcompressed. They also generally have had the EXIF stripped (because I edited them using Photoshop 5.5 - how retro).
In theory, finding the photos which do have EXIF is straightforward- find the photo (using the .flickr files above, that's easy), find its date, and then find it either on the filesystem (reasonably easy) or with iPhoto (which is proving annoyingly hard**). This is also useful for photos I've uploaded in the last year- I don't always have a record of which local file I uploaded to Flickr, and I may want to replace images with their full-res version at some point for printing.
However, for those with no EXIF data, the problem is much harder. One sensible thing I did with stem was to put the date in every folder name, and I've copied this across to Flickr's photo date properties, but it only gives me day resolution. This means that I may have 40 photos on Flickr, and another 400 at home, and have to find the smaller set in the larger. Even worse, the photos on Flickr may be cropped or colour-corrected (again, in Photoshop).
I suspect the only solution is to take the local files, and the original iPhoto images for that day, and use a script based on something like Image::Seek, a Perl library based on imgSeek, to try and find similarites and save me doing so. I haven't really started poking at code, though, so this might all fail horribly. We'll see.
Organising ... and is it worth it?
Finally, there's tidying up the photos before publication; fixing titles (which were previously limited in both length and by what's sensible in filenames), maybe adding descriptions, and definitely adding tags
However, by this point I'm wondering if it's even worth going through all this faff. Is it worth bothering will all this coding and organising? Already, just with day resolution and the old title metadata, I'm finding it easy to look for images. Perhaps I should just call it a day, make everything public, and change my attention to another app - sourcing stem from Flickr.
If anybody has any thoughts, though, I'd love to hear them.
* Inspired, I think, by the geotaggers, I use tags like "lens:50mm" rather than the (much) more common pair of "lenstagged canonef50f1.8". I'm well aware that Flickr doesn't really do anything useful with the colon to turn them into real triples, but I still think I might do some time, and if pressed I'll argue that the tags are for my use, not yours, so I stick with them. If I ever really care I'll batch change them.
** Unfortunately I've come to expect that from scriptable applications. In theory iPhoto (and iTunes) should be able to be fast object databases, queryable on anything you like, including date, name, artist and so on. In practice, sadly, they're not; the timeouts I was getting from iPhoto last night either mean I'm doing something horribly wrong or that it's doing linear searches for date properties. Oh well. I must admit this is a niche activity.