Saturday 14 November 2009

Post-trip photo sorting

I've just spent half a day sorting through photos of my recent trip, ready to bore my extended family and friends should they dare to ask me where I've been. Here's a brief rundown what took up all this time.

True to form, I'd neglected to update my camera settings properly as I moved between timezones and, for the changes I did make, even managed to change one camera and not the other, further complicating the situation. In order to have Picasa, iPhoto or whatever display the photos in the correct chronological order it was necessary to do a little rework.

My cameras save the date and time into the EXIF data of each photo as a discrete value, with no adjustment or recording of timezone or daylight saving settings. After working out the required time corrections by reviewing the photos against the cameras' current times, I created a plain text file ("dir /B IMG*.jpg > list.txt") containing one picture filename per line and then manually chopped this up so I had one file per time adjustment, e.g. "plus4.txt".

Using the excellent EXIFutils and the good old command-line "FOR", I was able to modify the EXIF data easily by adding the appropriate correction. The "exitdate.exe" tool allows you to add or subtract an amount of time to or from the existing timestamp data. A sample of my workings appears in the screenshot. (Remember, you need "%%i" in script files, "%i" if running the command interactively.)

Modifying the date/time of the AVI videos from my compact camera required a different tool. Each file contains metadata that can be edited with many downloadable tools, the best I've yet found is abcAVI. However nice it is for the metadata to be correct, this data is generally ignored and it's the file's modification time that is used by most photo libraries to determine the sort order for video clips. To correct this I used "touch" (in fact "touch.exe" from the UnxUtils toolset) to set the modification time back to the manually corrected time from the metadata. By the way, this is a bit of a pain as you need to make sure you preserve the file modification times as you move them around, sometimes a challenge if you're using FTP etc.

Now all I need to do is wade through the snaps and brutally cut out all but the ones that are worth keeping. Being a hoarder, that's something where I really struggle.

No comments :