R-PI Time-lapse Camera

A few weeks back while I was furloughed, I decided to buy a Raspberry Pi as a cheap way to pass the time. The time lapse camera seemed the quickest way to entertain myself.

Parts

  1. 1 Raspberry Pi Model B
  2. 1 Transcend 32 GB JetFlash 500 Retractable USB Flash Drive
  3. 1 Dynex USB 2.0 4 port powered hub
  4. 1 Logitech HD Webcam C310
  5. 1 Transcend 8 GB SDHC card
  6. 1 cell phone charger

Directions

I geeked out for a few hours after getting my RPi. For several years I spent a significant amount of time using Debian (or a variant) as my primary desktop at home. Using Raspbian was like going home. I initially did a quick setup using an SD card, but quickly switched to a flash usb drive to improve stability. I followed the directions from Dingleberry Pi to transfer my root directory to the usb flash drive. After following those directions and shutting down the device, I hooked the usb flash drive into the 4 port hub. The hub gave me the ability to power external usb devices and my RPi from the same source.

Once I finished configuring the RPi, moving the OS and powering it through a hub, I started playing with linux commands to access the webcam and take pictures. The RPi hub was a great source of information on webcam

s that were compatible with the Pi. I chose a Logitech C310. In order to grab data from the webcam, I decided to use streamer and avconv. Streamer captures images and video from the webcam, and avconv changes the format and combines different audio and video sources. These two packages aren’t installed by default on Raspbian. Use apt-get to install everything.

sudo apt-get install steamer
sudo apt-get install libav-tools

 

I played with the inputs for a little while to determine the results that I wanted. After a little command line play, I found these results worked best.

streamer -t 02:00:00 -r 0.10 -j 99 -q -s 1900×1425 -o picTest0000.jpeg &
avconv -r 30 -i picTest%04d.jpeg -y output.avi &

The first command captur

es one jpeg image every 10 seconds for two hours. The second command creates an avi video at 30 fps.

The Results

Other examples can be found here.

Raspi_Colour_R

 

Share