Renovation
Renovation is a messy business. Doing so in one of our house’s rooms recently made me appreciate the gloves I wore when removing literally a handful of fourty year old spider corpses. It’s the little tools that sometimes matter most.
To refactor code is a programmer’s everyday business and tools like uncrustify
and clang-tidy
help a lot with renovating desolate code. But that’s not what this post is about…
See you later, calculator
I was asked to compile an album of photos coming from different sources taken over the last four years. No problem, I thought, as I have a well sorted archive of shots from the last 13 years, so I should know how to arrange the files for the DVD due.
Usually, it’s a good idea to sort all the pictures chronologically, and I have a script that renames JPGs to their file creation date. But sometimes the creation dates are borked by clueless copying or strange transport media. Enter jhead
:
$ jhead -ft *.jpg
This will set the file time to the one in the EXIF. Done.
Well, not this time.
The cameras we have in our household get synchronized twice a year whenever DST changes. So they are most often off by only some seconds, and when members of my family shoot one occasion in parallel, a second sometimes matters for continuity when you later mix those shots. jhead
to the rescue, once again:
$ jhead -ta+0:0:6 *.jpg
This will adjust the EXIF times by +6 seconds. After a jhead -ft
run, all pictures are in the right order with my script. Done.
Well, not this time.
After I renamed and mixed all files I realized there were some files that were older than four years which wasn’t on par with their content. I checked the sources and found out: One camera’s clock was obviously never set and off by several months.
There are at least two ways to sync photo timestamps: Finding a wall clock or wrist watch on one of the pictures helps if you know the date and if it’s day or night. Unfortunately, I didn’t have a date.
The second way is a reference picture. Fortunately I found a picture in my archive taken on one occassion that was also in the source set of pictures. While mine was taken on 2014-06-24 18:49:30
the other one had the EXIF creation date 2013-09-25 03:27:47
.
I was about to write a little time conversion program to spit out the number of days, hours, and seconds to feed into jhead -ta
when I luckily took another look at the jhead
man page. That saved my evening:
$ jhead -da2014:06:24/18:49:30-2013:09:25/03:26:47 DSCI0*
Done.
Little tools welcome
There are sure other little tools that deserve some attention. If you know one, spread the word, be it here or in another topic.
Best,
Flössie