Friday, 26 October 2007

Ladybird on Sneezeweed

A very quick post today as this is the first time I've had chance to sit down all day. The house moving has been hectic and we haven't even got to the furniture yet -- that is tomorrow.

Anyway, as the nights draw in I thought I'd throw a little sunshine on my blog with this photo taken back in July of 2005. I think that Sneezeweed is an interesting looking plant to start with, but the addition of a ladybird helps make the photo just that little bit more interesting.

Tuesday, 23 October 2007

Deer Shelter

I've not had much time recently to blog what with moving house and lots of stuff to do at work. I'm going to probably keep the blog going with a few photos that I haven't got around to talking about before while my life gets back to normal and I have the time to write proper blog entries again.

Now I'm not usually overly impressed with modern art of any form. I may, however, have to change my opinions following a very enjoyable trip to the Yorkshire Sculpture Park back in June. Some of the more impressive displays were inside and I couldn't take photos. Outside, however, I was struck with the simple elegance and tranquillity of James Turrell's Deer Shelter.

Saturday, 20 October 2007

From Floppy Disk to Star Trek

While this verges on the ridiculous it at least gives a use for the boxes of floppy disks I have kicking around that I no longer use.

Hopefully my model making skills are good enough for you to recognise the photo as a model of the Starship Enterprise from Star Trek.

I can't claim responsibility for the instructions, but given that most people have floppy disks they no longer use, it will at least give you ten minutes of model making fun!

Friday, 19 October 2007

First Sunset: 18th October 2007

As some of you may know we are having to move house. We now have the keys to the new place and where there doing some cleaning and stuff last night. As we have already seen the old house was a good place for seeing interesting sunrises and sunsets. It looks from this as if the new place will be just as good.

I really liked the light from the sunset last night, unfortunately it didn't last long and I was too busy to fully appreciate it anyway. I also quite like the way in which the panorama contains the moon (a small crescent visible on the far left, which is much easier to see in the large version available when you click on the image) as well as the sunset -- especially given that I didn't notice that the moon was out when I took the photos!

Sunday, 14 October 2007

Missing DVD Subtitles

I like watching films and as such over the years I've built up quite a large VHS based film collection. VHS tapes don't last forever and buying a new video recorder is becoming increasingly difficult. So whenever I see a sale on DVDs I tend to see if I can pick up replacement copies of films I enjoy. The problem with buying older films on DVD is that often the disc is badly put together as the studios know that they are never going to make lots of money on them.

While I like watching extras on some of the DVDs I own, I'm quite happy with buying DVDs which just contain the film. What I'm not happy about is when the disc is so badly put together as to make the film unwatchable. I've found that a common problem is missing subtitles.

While my eye sight has deteriorated over the last few years I don't seem to be going deaf and so don't usually need subtitles. What I do need though are the forced subtitles which give English translations.

One film I picked up recently was Death Train. Whilst slightly predictable I still find it a highly enjoyable film, especially when I want a simple action film that doesn't require much in the way of concentration. The film includes a crazed Russian general, who funnily enough often speaks Russian! Now I don't speak Russian and so subtitles would be useful, unfortunately they seem to be missing from the DVD, and believe me I've looked for them. Fortunately I found the subtitles were missing from the DVD before I got rid of the old VHS copy I had, so after a long evening I managed to transcribe the subtitles. Now for the tricky part -- adding them to the DVD.

Firstly I used Subtitle Workshop to transcribe the subtitles and save them into the correct format. I then used a combination of these two tutorials to add the subtitles to the DVD, and this tutorial to force the subtitles to always be on so that I don't have to manually turn them on each time I watch the film.

Whilst the instructions may look complicated the procedure is actually relatively straightforward although a little time consuming. The most complex bit is actually transcribing and syncing the subtitles to the film. Fortunately for many films you can find the subtitles somewhere on the web. Unfortunately for me I couldn't find any subtitles for Death Train so I had to transcribe them myself -- although now no one else will have to as they can use mine.

Friday, 12 October 2007


One of the advantages of not living in the centre of a large city is relatively clean air, which gives rise to some fantastic sunrises and sunsets. This was the view from my bedroom window early on Thursday morning.

Sunday, 7 October 2007


Although I was probably the last person I know to move from film to digital photography I have now fully embraced the new format. In fact I haven't really used my film camera at all since I bought my first digital camera.

The one downside to a digital camera is that I print far fewer photos than before and so the photos I take tend to sit neglected on my computer. To try and solve this problem and to allow me to appreciate the photos I have been taking I went and bought a digital photo frame. Not knowing how much I would use it I opted for the cheapest one Amazon had to offer at the time and ended up with a 7" frame from ATMT (model number 7TFTDPF). For the price I paid it is an excellent frame and has been great for showing off the photos I take.

The only problem with the frame is converting the photos to fit the screen size. The frame is widescreen and requires the photos to be both cropped and resized before it will show them correctly and make full use of the visible area of the frame. Now you can do the resizing and cropping in any image editor but it becomes tedious if you want to convert a number of photos at once.

So given that I'm a software engineer I set about solving the problem by developing a small program to do the tedious work for me! The result was the aptly titled Convert4Frame application. In essence this application allows you to easily define the part of a photo you wish to display in the frame and then resizes and crops the original for you. To use the application simply it direct from this page.

Currently it is designed to work with the 7" frames from ATMT, but it should correctly resize your photos for any digital frame with a native resolution of 480x342 (or any multiple of). Let me know in the comments if it works with your frame, or if you have a frame which requires different resizing/cropping let me know the details and I'll add support for it.

Update (06/02/2010): I've moved the code into a publicly accessiable SVN repository, see here for details.

Update (30/12/2007): I've made a number of small changes which should deal with the few cases in which the image wasn't correctly filling the display area (basically the image is now scaled down to the frame size).

Saturday, 6 October 2007

Roast Chicken Risotto

I'm not entirely sure where this recipe originated from but it has been a firm favourite for as long as I can remember. This is a "leftover" recipe and so the ingredients list tends to vary a little each time I cook it. For example, you can vary the amount of roast chicken, at Christmas you could use leftover roast turkey, and if you don't like mushrooms it works just as well without them. The ingredients list is exactly what I used last time I cooked this.

Ingredients (Serves 2)
14oz roast chicken
l medium onion
2 tomatoes
8 fl oz long grain rice
6 mushrooms
1 large handful of frozen peas
20 fl oz chicken stock

Cooking Instructions
Finely chop the onion and gently fry in a little olive oil in a large frying pan.

While the onions are frying skin and dice the tomatoes (to skin a tomato score the skin with a sharp knife then place in a bowl of water for a minute, remove from the water and the skin will slide off), peel and slice the mushrooms, and chop the roast chicken into bite sized chunks.

Once the onion is soft add the rice and tomatoes. Fry for a minute or two to ensure the rice is nicely coated with oil. Add the chicken stock and stir. Bring to the boil and then simmer with a lid on for about 15-20 minutes adding more stock if necessary.

Add the chicken and mushrooms and stir thoroughly continue to cook with the lid on for about ten minutes. Once you have added the chicken cook the frozen peas. Once everything is cooked stir the frozen peas into the risotto and serve.

Friday, 5 October 2007

Concert Review: Runrig

While I may have been at the University for ten years, I had never before been to a concert held at the University. That all changed last night when I went see one of my favourite groups, Runrig. Firstly the tickets were easy to buy. None of this buying over the Internet or phone and then waiting months for them to arrive, I simply walked across campus and bought them direct. I was, however, worried that there would be no atmosphere given that I've only ever seen the room set out for an exam or graduation ceremony, but with the lights off and the beer flowing the atmosphere was fantastic.

Last night was the 2nd night of the tour to promote their latest album, Everything You See, and they were on top form. For those of you who listen to Runrig, I can easily say that the highlight of the evening was the very simple rendition of "Every River". For those of you who have no idea what Runrig's music is like then why not watch Abhainn An T-Sluaigh. This was a show broadcast a few weeks ago in Scotland which captures the band performing to 17,000 people on the banks of Loch Ness -- note that you do have to watch as well as listen as the show is in Gaelic with English subtitles!

My Rating: 5 Stars It was by far the best Runrig concert I've ever been to!

Thursday, 4 October 2007

Book Review: Michael Marshall

This won't be a straightforward book review as I want to point you towards an interesting author, Michael Marshall, rather than a specific book of his. He write what I would describe as conspiracy theory thriller novels, which usually revolve around a select group of people getting away with despicable things. Anyway rather than reviewing a specific book I thought I'd give my favourite quotes from two of his books The Straw Men (the first in a series which also includes The Lonely Dead and Blood of Angels) and The Intruders.

"I like the Internet. Really, I do. Any time I need a piece of shareware or I want to find out the weather in Bogotá ... I’m the first guy to get the modem humming. But as a source of information, it sucks. You got a billion pieces of data, struggling to be heard and seen and downloaded, and anything I want to know seems to get trampled underfoot in the crowd."

"This young man already spent a lot of time alone, and seldom seemed more content than when taking something apart or putting it back together. That was cool, of course, but she hoped it wouldn't be too long before she saw evidence of his first hangover. Man cannot live by coding skills alone, not even in these strange days"

My Rating: 5 Stars The themes of the novels may not be to everyone's tastes but I really enjoyed all four books that I've read.

Wednesday, 3 October 2007

Stretched Video and Nonsquare Pixels

As you might remember from a previous post I've been playing around with the new iPlayer service from the BBC. This is a great service allowing you to catch up on TV you missed in the last 7 days. The available content is limited to stuff the BBC has the distribution rights for, but even so I can still watch a lot of TV this way. Also it gives access to regional programming so I can watch things that are only broadcast on BBC Scotland or BBC Wales which I couldn't have watched before. Basically I'm a fan! This post, however, isn't about the iPlayer but rather about some weird behaviour I came across while using it and a solution.

The programmes available through the iPlayer are provided as Windows Media Video (WMV) files. The current version is encoding the programmes using a technique known as nonsquare pixels. Computer images are usually encoded with square pixels, i.e. the sampling rate is the same horizontally as it is vertically. With nonsquare pixels there tends to higher sampling in the vertical dimension. This means that if you look closely, the picture looks like a brick wall rather than a square grid of pixels. In WMV files this is achieved (I think) by stretching the image to be encoded so that it fits the square grid and then when it is played back squashing the square pixels back to their intended shape. The files from the iPlayer have a pixel aspect ratio of 16/11 which means that each pixel is about half as high as it is wide.

Assuming the pixel aspect ratio is correctly encoded in the video files (for those interested in the technical details there are two metadata entries AspectRatioX and AspectRatioY that specify the values used to squash the square pixels) then the file should play back as intended. If the pixel aspect ratio values are missing (which I have seen in a few cases) then the effect is similar to that seen when widescreen (16:9) content is stretched to fill a traditional (4:3) TV screen -- everyone looks tall and thin. If you are seeing this problem and you think it might be missing metadata then you can use the WMVARChanger tool to add the metadata entries to the file. Missing metadata is a rare occurrence yet it seems that a number of people still see stretched content.

I'd heard a number of people complaining that files they were trying to watch were stretched and unwatchable, yet I knew that there was no problem with the files themselves as I'd also downloaded the same programmes and watched them without issue. At this point I started to try watching files encoded with nonsquare pixels on as many different computers using as many different versions of Windows Media Player as I could find. Fortunately this is quite straightforward for anyone to do as Microsoft kindly provides a number of different nonsquare pixel test files. In all but one instance the file played back correctly and looked as it does in the first image below. But in one case I got stretched content as you can see in the second image.

Given that the white shapes are meant to be perfect circles you can see that the first image is fine, whereas the second image is stretched vertically distorting the image. Now I don't know exactly why the problem occurs but I do know the culprit and how to fix it.

It turns out that when the problem occurs disabling video acceleration (via the Performance tab of the Windows Media Player Options dialog box) fixes the problem and the file is played back at the right size. In fact you don't have to fully disable video acceleration just disabling the "Use video mixing renderer" in the advanced options seems to do the trick. I'm assuming that the problem is actually the video driver, that is either ignoring the pixel aspect ratio settings or is simply unable to display nonsquare pixels. Either way at least there is a (albeit nasty) solution.

If you really want to reproduce the problem yourself then you can. It turns out that the video acceleration provided by Microsoft Virtual PC suffers from the problem. So if you setup a Windows XP virtual machine and then try the sample files you will see that it does not behave correctly (tested with a standard Windows XP and SP2 installation).

Tuesday, 2 October 2007

Ten Years

Yesterday saw the start of the new academic year at the University. This means that I have now studied and worked in the same place for ten years. It makes me feel very old, especially when I see how young the new students look.

Although as someone I lived with in my first year pointed out, we may be ten years older but I don't know if we are ten years wiser!