Showing posts with label time lapse. Show all posts
Showing posts with label time lapse. Show all posts

Wednesday, 8 May 2013

Time Lapse Videos of the Garden (3 of 3)

This is the last video in this time lapse series.

In this video I've removed all the images taken between 8pm and 5am. Don't worry, I didn't have to do this by hand! All the videos save with a similar file name which has the date and time in it so I wrote a little regular expression that deleted all the files with a 00 - 04 or a 20 - 23 in the hour slot. The commands looked like this:

rm 00A8F9005FCC\(IPCamera\)_0_2013????0{0..4}*
rm 00A8F9005FCC\(IPCamera\)_0_2013????{20..23}*

The rm command you should be familiar with, then it is the camera's MAC address (I think) followed by the name in brackets then _0_ (for some reason, maybe camera number) then the 4 digit year, 2 digit month (single digit wildcards), 2 digit date (single digit wildcards) then the 2 digit hour. Notice in the first command I put the first digit of the hour outside the curly bracket, I just wasn't sure 00..04 would work so opted for 0..4 instead. What came after the hour digits didn't matter so I just dropped in a multi digit wildcard.

Thursday, 18 April 2013

Time Lapse Videos of the Garden (2 of 3)

The camera looking out to the garden has been running for a while now. Since about the 28th of March given the date of my last post on it. As you can imagine it has gathered quite a large collection of images, 18,000 at the last count! So I thought it would be a good a time as any to give another time lapse video a try.

I used the same script as last time but made a slight change so it would create a copy of each image with a 5 digit number rather than 4 (cause we have over 9999 images) and out the video with a greater frame rate (20fps instead of 4).

x=0; for i in *jpg; do counter=$(printf %05d $x); cp "$i" /tmp/img"$counter".jpg; x=$(($x+1)); done
ffmpeg -f image2 -r 20 -y -i /tmp/img%05d.jpg garden.avi
rm /tmp/img*

The results were less than satisfactory (don't watch the whole video, the first minute or so gets the point across):

Thursday, 28 March 2013

Time Lapse Videos of the Garden (1 of 3)

I've gotten quite into hillwalking this year. In fact I even have another blog dedicated purely to that which I will shameless plug here: it is munrochallenge.wordpress.com and it details me and my friend Martyn's attempt to climb 52 munros this year. (We've managed 3 so far.) As part of this new hobby I signed up to a few on-line forums to meet other people with similar interests and one of the forums I go on frequently is the one at walkhighlands.co.uk.

It was on here that a user known as Alastair S (probably his real name!) posted up a thread talking about a little computer program he had made. What it does is connects to public internet cameras anywhere in the world you point it to and downloads an image from them once every minute. When it has a large collection of these images it creates a video out of them which is played back at 20 frames per second. This hence lets you watch an entire days, weeks, months or even years worth of footage in just a few minutes. It's a technique known as 'time lapse video' and it can make for some very interesting videos. Here are a couple he has produced so far: