Posts Tagged ‘antarctica’

Watching the Antarctic days roll by

Sunday, November 22nd, 2015

[Note: this post embeds some very large gif files. Cancel now if on a slow connection…]

A while ago, I was playing with imagemagick (it’s an amazing tool) and trying to make animated gifs. It worked, sort of. One of the things I’d been meaning to try for a while – but never quite got around to – was animating webcam images. Last week, I finally got around to it.

At work, we have a webcam pointed at the Halley VI Antarctic station. It’s turned on year-round, sending back one picture hourly, fairly reliably. Being on a pole in the middle of Antarctica, it’s also free from the major problem that arises when trying to animate webcams – someone moving them around every now and again.

And the pictures are remarkable. Halley VI is an imposing-looking building at the best of times, but on a dark morning, looming out of a snowstorm, it’s like something from a film.

Twenty days in late November 2014 – note the sun tracking by the top of the image each day.

Ten days at the end of January 2015, with 24-hour daylight and a lot of activity around the station.

One shot each day (at 12.30pm UK time, so about 10am? local solar time), chained over 373 days – so slightly more than a full year. It opens in mid-November 2014, about the time the first aircraft arrive and the summer activities begin, passes through the (very busy) summer season, then quietens down as winter approaches. The nights appear as momentary flashes, then get longer and longer until they’re permanently dark in June/July. Then it slowly returns…

The code for this is pretty simple. Assemble all the files in a single directory – either sourced locally or downloaded with wget/curl – and ensure they’re named in a sequential way. All of these, for example, were of the form halley-2015-01-02-12-30.jpg – the 12.30 shot on January 1st.

Make sure to delete any that returned error messages in the download or are below a certain size. I had one or two zero-content frames that made the system hiccup a bit, and find images/*.jpg -size 0 -delete is good for handling these.

Then run:

convert -resize 500x500 images/*.jpg animation.gif

That’s it. The resize is to prevent it getting disgustingly large; adding -optimize shaves a little more off the filesize. Even so, though, you’ll find that assembling more than a few hundred frames makes your system quite unhappy (it may lock up) and the resulting gif is far too large to be useful. For the images above, some examples of filters on the merge:

convert -resize 500x500 images/halley-2015-01-2*.jpg animation.gif

convert -resize 500x500 images/*12-30.jpg animation.gif

– so it only pulled together the frames we were interested in. Of course, you could do a simpler (or more complex) merge by copying the relevant ones to a separate directory and just merging everything there.

Given the size problems of gifs, making a larger one is probably best left to video. Here’s the entire year, using every frame (23 MB):

A year at Halley VI

Note how short the day/night pulses get towards the ends of the spring/autumn.

For this, you don’t have to resize, and you can produce it at the full size of the webcam images (in this case, 1920×1080):

mencoder mf://images/*.jpg -mf w=1920:h=1080:fps=25:type=jpg -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -o halley.avi

The key part here is the images list (you can filter again as before) and the fps=25; I ran it at various speeds and found 40fps seemed to be a happy medium. 25fps is just a little jerky. The version above is reduced to 512px wide:

mencoder mf://images/*.jpg -mf w=1920:h=1080:fps=25:type=jpg -vf scale=512:288 -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -o halley.avi

Not all encyclopedias are created equal

Saturday, August 3rd, 2013

Wikipedia has some way to go before it can comprehensively replace the great Britannica in all its many roles. From Shackleton’s South, a passage in which he and his crew are stranded on a drifting ice-floe in the Weddell Sea, November 1915:

In addition to the daily hunt for food, our time was passed in reading the few books that we had managed to save from the ship. The greatest treasure in the library was a portion of the “Encyclopaedia Britannica.” This was being continually used to settle the inevitable arguments that would arise. The sailors were discovered one day engaged in a very heated discussion on the subject of Money and Exchange. They finally came to the conclusion that the Encyclopaedia, since it did not coincide with their views, must be wrong.

“For descriptions of every American town that ever has been, is, or ever will be, and for full and complete biographies of every American statesman since the time of George Washington and long before, the Encyclopaedia would be hard to beat. Owing to our shortage of matches we have been driven to use it for purposes other than the purely literary ones though; and one genius having discovered that the paper, used for its pages had been impregnated with saltpetre, we can now thoroughly recommend it as a very efficient pipe-lighter.”

We also possessed a few books on Antarctic exploration, a copy of Browning and one of “The Ancient Mariner.” On reading the latter, we sympathized with him and wondered what he had done with the albatross; it would have made a very welcome addition to our larder.