Tuesday, 15 December 2009

Animation

Laura and I have been experimenting with stop-motion animation - set up a camera on a tripod with a remote shutter release, then position a scene in front of it, and change it by a very small amount between shooting frames.
10 frames per second seems to work ok for what we are doing (and you get more video for your money, so it is a bit more rewarding!).
I am using mencoder to turn the jpeg images from the camera into a mpeg4 video using the following:

mencoder mf://*.JPG -mf fps=10 -o leaves.avi -ovc lavc -lavcopts vcodec=msmpeg4v2:vbitrate=800 -vf scale=640:480

This produces an mpeg4 encoded .avi file, scaled to 640x480 pixels.
You can then run mencoder again to add a mp3 audio stream.
The results can be seen at http://flickr.com/jones139.

Animation

Laura and I have been experimenting with stop-motion animation - set up a camera on a tripod with a remote shutter release, then position a scene in front of it, and change it by a very small amount between shooting frames.
10 frames per second seems to work ok for what we are doing (and you get more video for your money, so it is a bit more rewarding!).
I am using mencoder to turn the jpeg images from the camera into a mpeg4 video using the following:

mencoder mf://*.JPG -mf fps=10 -o leaves.avi -ovc lavc -lavcopts vcodec=msmpeg4v2:vbitrate=800 -vf scale=640:480

This produces an mpeg4 encoded .avi file, scaled to 640x480 pixels.
You can then run mencoder again to add a mp3 audio stream.
The results can be seen at http://flickr.com/jones139.

Sunday, 29 November 2009

Town Guide (again)

Progress with the Town Guide program stalled a bit when I went on holiday, then was rather busy at work for a while. I am back to thinking about it now.
The current version has two output modes, HTML and PDF - both are quite crude, but work.
The PDF output uses LaTeX, which seemed like a good idea at the time, but I am struggling because LaTeX thinks it knows better than me what the output is supposed to look like - it keeps putting the tables etc. at the end, rather than where I ask for them.
This means I have two options - either do battle with LaTeX to sort it out, or abandon it and go for a more 'direct' PDF production.
I think that as the output I am producing is short and simple, I may as well go for 'direct' production. I am going to have a try with ReportLab's python library (http://www.reportlab.org/oss/rl-toolkit/guide/).
I'll go and read the instructions and see how it goes....

Town Guide (again)

Progress with the Town Guide program stalled a bit when I went on holiday, then was rather busy at work for a while. I am back to thinking about it now.
The current version has two output modes, HTML and PDF - both are quite crude, but work.
The PDF output uses LaTeX, which seemed like a good idea at the time, but I am struggling because LaTeX thinks it knows better than me what the output is supposed to look like - it keeps putting the tables etc. at the end, rather than where I ask for them.
This means I have two options - either do battle with LaTeX to sort it out, or abandon it and go for a more 'direct' PDF production.
I think that as the output I am producing is short and simple, I may as well go for 'direct' production. I am going to have a try with ReportLab's python library (http://www.reportlab.org/oss/rl-toolkit/guide/).
I'll go and read the instructions and see how it goes....

Sunday, 4 October 2009

Free Town Guide

For ages I have been intending to write a program to produce a nice guide to a town or area based on OpenStreetMap data.
I finally decided that I knew enough about postgresql and python to have a go.
The result is a program called townguide.py. The idea is that you load the openstreetmap data into a postgresql database (like you do if you want to render it using Mapnik), then produce an xml file to tell townguide.py what you want rendering. It then goes and produces the nice output for you.
Version 0.1 is working and is on SVN. At the moment it only produces html output (because that is easy), and it is not very pretty.
The next stage is to make it produce postscript to give nice printable output on a defined paper size.
An example of the html output is at http://hartlepoolmap.webhop.net.

Having looked at the output it looks like it will be quite useful from a mapping point of view - if you know the area you can review the features that are summarised and look for missing banks, supermarkets etc.

Free Town Guide

For ages I have been intending to write a program to produce a nice guide to a town or area based on OpenStreetMap data.
I finally decided that I knew enough about postgresql and python to have a go.
The result is a program called townguide.py. The idea is that you load the openstreetmap data into a postgresql database (like you do if you want to render it using Mapnik), then produce an xml file to tell townguide.py what you want rendering. It then goes and produces the nice output for you.
Version 0.1 is working and is on SVN. At the moment it only produces html output (because that is easy), and it is not very pretty.
The next stage is to make it produce postscript to give nice printable output on a defined paper size.
An example of the html output is at http://hartlepoolmap.webhop.net.

Having looked at the output it looks like it will be quite useful from a mapping point of view - if you know the area you can review the features that are summarised and look for missing banks, supermarkets etc.

Saturday, 19 September 2009

Using a Graphics Tablet in Ubuntu 9.04

I have a cheap Trust graphics tablet that I used to use for drawing in Inkscape or Gimp.
It stopped working at some point (Can't remember which Ubuntu version), but I decided I needed to use it again, because drawing with a touchpad on a laptop is a pain in the thumb...
It was surprising that it didn't just work when you plug it in, because I'm sure a previous version of Ubuntu behaved like this.
I found the instructions at https://help.ubuntu.com/community/AiptekTablet.
You basically have to install the Aiptek xorg driver and put a configuration file in a directory under /etc/hal. I wondered where the X11 configuration was now that Xorg.conf is so small....

Anyway, it works now...