I have previously experimented with time lapse videos, but wanted a more dedicated platform which could be set up, and run pretty much anywhere.
This is the first iteration, where the the purpose is to get the system up and running with headless operation.
Next iteration will be to construct a chassis with built-in power source (battery), hence the “part 1″.
The Linksys NSLU2 aka. “slug”. The one I had ran Debian 5.0 Lenny, but had to be upgraded in order to get the webcam to work.
I recklessly tried doing a dist-upgrade, but ended up with bricked slug. Guess a fresh installation was the right answer indeed.
Debian Squeeze on a NSLU2
Due to a required proprietary firmware, the official Debian 6.0 installer does not ship with support for the on board Ethernet controller – which is bad because this is the only way of communicating the the device. Well, technically you can use the serial pin header or an USB Ethernet device, but I think I have burned the circuit for the serial port in a previous modding attempt :-\
There is a few guides that give you directions on how to add the proprietary firmware to the installer image, and after about 5 reflashes I finally had one that worked.
Before starting the installation, I checked around for known installation errors. The installation takes about 5 hours, so you really want to get i right the first time.
I learned that others had experienced out of memory errors during the installation. Though luck.
To the rescue came Martin Michlmayr. He has the answer to all my quarrels; a compiled guide, with a complete Debian 6 userspace and kernel. This saved me a lot of time.
Install and configure Motion
You can install motion by
apt-get install motion
as root or via sudo.
On Debian (Squeeze in my case), Motion is disabled by default – as many other services. Enable it, as mentioned in the notice:
Not starting motion daemon, disabled via /etc/default/motion ... (warning).
Setting the value start_motion_daemon to yes in /etc/default/motion as such:
The trick to disable motion detection in Motion, is to set the threshold to 0 in the config file:
Enabling time-lapse by setting the following in /etc/motion/motion.conf:
# Use ffmpeg to encode a timelapse movie # Default value 0 = off - else save frame every Nth second ffmpeg_timelapse 10
In this case, I take a pictures every ten seconds.
You should also adjust the width and height parameters, and the target_dir.
You can also get a copy of my preconfigured motion.conf by running the following set of commands
/etc/init.d/motion stop mv /etc/motion/motion.conf /etc/motion/motion.conf.orig wget http://retrospekt.dk/files/motion.conf -O /etc/motion/motion.conf mkdir /home/motion chown motion:motion /home/motion chown root:motion /etc/motion/motion.conf chmod g+r /etc/motion/motion.conf /etc/init.d/motion start
An example can be seen here: http://retrospekt.dk/files/timelapse.mpg