Balloon Collaboration
December 15, 2019, 01:43:03 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: barntek.com is now part of the BarnTek information network...Currently redirected to barntek.net
 
   Home   Help Search gallery Calendar Login Register  
Pages: [1]
  Print  
Author Topic: Webcam Control & Time Lapse  (Read 1875 times)
Larry
Administrator
Hero Member
*****
Posts: 1167



View Profile
« on: January 15, 2013, 03:42:54 PM »

Well, I started out doing timelapse photography with my Canon EOS 40D on a tripod, running the EOS Utility program that came with the camera, then using JPGVideo to compile all the images into an avi video.  Workes realy well, and I still think it is the best way to go because you have better control over the quality and size of the final product.

But, this is a Pi forum, so I must tell you how to do this on the Pi.  After digging around, I found instructions how to do it.  Of course, they also tell how to make the Pi a WebCam server, but I am only interest in collecting the images...  so far.

I got this info from here.

First, install Streamer:
sudo apt-get install streamer

and that's it... hehe  It all runs from the command line.  if you do a server --help, it will show you all the options availible.  Here is a sample line that actually works:
sudo streamer -o 0000.jpeg -s 352x248 -j 100 -t 00:20:00 -r 0.1 -c /dev/video0
.

Some notes on the options:
  • "-o 0000.jpeg" specifies the filename format for the individual frames
  • "-s 352x248" specifies the resolution. I have used as high as 1280x720.
  • "-j 100" is the JPEG quality"
  • "-t 00:20:00" instructs it to capture for 20 minutes OR -t 20 will take 20 frames
  • "-r 0.1" indicates the frame rate of 0.1 frames/second (1 frame every 10 seconds)
  • "-c /dev/video0" specifies the video device.

I have made the above work with no problems.  I have not tried capturing just video, yet, but according to the help file, you should be able to do several different formats of videos and different framerates.  Obviously, it depends on how fast the Pi turns out and what it can handle.  For timelapse, I think it will work fine.  I just have to get portable and take the whole thing outside.  hehe
« Last Edit: January 15, 2013, 05:09:57 PM by Larry » Logged
Larry
Administrator
Hero Member
*****
Posts: 1167



View Profile
« Reply #1 on: January 16, 2013, 08:17:20 PM »

Today, I found another program, gPhoto2, which will connect to your SLR camera via USB and control it.  It is command line, which makes it perfect as a way to use the Raspberry Pi as a TimeLapse controller.  I have it working for Canon EOS40D, and it works pretty well.  I, also, have a usb stick mounted on the Pi, and have the camera download each picture to the stick as it takes it, which makes it much easier to transfer to the PC for compiling into a video.  Now, all I need is a good 5v source, and I can be completely portable for Time Lapse.

Anyway, if you are interested, just install gPhoto2 onto the Pi:
sudo apt-get install gphoto2

Once installed, go to this site to kinda walk you thru checking it out.

for Time Lapse Photography, I use this:
sudo gphoto2 --capture-image-and-download ---interval 10 -F 100
Be sure you are in the folder you want the images stored in when you execute this command.
If you want to keep the images on the camera instead, then just use--capture-image.
--interval 10 is 10 seconds between pictures
-F 100 tells it to capture 100 pictures, then stop
Logged
DaddyB
Administrator
Full Member
*****
Posts: 144



View Profile
« Reply #2 on: January 17, 2013, 05:21:29 AM »

I guess I know what I will be doing tomorrow.   
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!