Howto: Timelapse video from photos

It’s amazing what shell tools can do: Flickr accepts HD video (720p, or max 1280×720) up to 30 FPS, so I tried to create one within those limits from the high resolution photos from today’s sunrise. Turns out to be incredibly easy with free tools on Linux:

  1. Resize to 720 pixels height (if your images are still wider than 1280 you’ll have to replace x720 with 1280 (without the “x“): mogrify -resize x720 *
  2. Find the width of the images, and plug that into the following command instead of 1080.
  3. Create the video: mencoder mf://* -mf w=1080:h=720:fps=30:type=jpg -ovc copy -oac copy -o output.avi

The result

Advertisements

How to serve vCards with the right encoding

It seems that some programs which recognize vCards only support the ISO-8859-1 character set. So if you’re serving vCards on your web site, you might want to check if the encoding is correct. Try inserting a non-ASCII character like “å” in a note or address, and see if it comes out as a strange character when loading it from the web site.

To fix this, first make sure that your editor uses the correct encoding. Open the file, change the encoding, save the file, re-open it and correct the contents if the characters were messed up after saving (not all editors change characters correctly).

You might also have to override the server’s default encoding. If you’re using Apache 2, just add the following to the .htaccess file at the root of the web site:
AddCharset ISO-8859-1 .vcf
AddEncoding text/x-vcard .vcf

Turns out that didn’t work so well (I didn’t find out until i did a shift-reload). I had to turn to this one instead:
<Files *.vcf>
ForceType 'text/x-vcard; charset=ISO-8859-1'
</Files>