Balloon Collaboration
June 26, 2017, 05:38:13 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Hosting for barntek.net has been extended for another 3 years
 
   Home   Help Search gallery Calendar Login Register  
Pages: [1]
  Print  
Author Topic: Time Lapse with Pi Cam  (Read 1707 times)
Larry
Administrator
Hero Member
*****
Posts: 1167



View Profile
« on: August 09, 2013, 10:14:31 PM »

I am currently running a collection using the following command:
sudo raspistill -o img_%03d.jpg -w 1920 -h 1080 -t 7200000 -tl 10000 &
sudo - execute with root priviledges
-o defines the output filename
%03 - increment filename out to 3 digits
.jpg - saves each image as a jpeg image
-w defines the width of the image
-h - defines the height of the image
-t - total elapsed time (in msec...  this is going for 2 hours)
-tl - delay increment  (btw, it is tango lima, not tango one)


An '&' at the end of the command line puts the process in the background, giving you a prompt, again.

Once complete, I will use ffmpeg to create a video file from the collected images using the following command:
ffmpeg -f image2 -i img_%03d.jpg TLVid.mp4
ffmpeg - I have it installed on my windows box, so no sudo...
-f - I have no idea, but I saw it on the examples I looked at.
-I - defines input files followed by the output file


08/09/2013 2 hours of clouds reduced to 29 seconds (720 images)
08/10/2013 4 hours of clouds reduced to 58 seconds (1440 images)
08/10/2013 1 hour of clouds reduced to 14 seconds (360 images)
08/11/2013 6 hours of clouds reduced to 1 minute 26 seconds (2160 images)
« Last Edit: August 11, 2013, 10:03:54 PM by Larry » Logged
Larry
Administrator
Hero Member
*****
Posts: 1167



View Profile
« Reply #1 on: August 11, 2013, 01:13:18 AM »

OK, I am now working on a bash script to handle the picture taking and transfer each image to my windows machine.  If you are going to do long runs, this is the way to go.  This way you don't have to transfer all those files at one time.

I am running Filezilla ftp client and the filezilla ftp server on my windows machine.  I then had to install a ftp client on the Pi.  Simple enough.
sudo apt-get install ftp

I set up the ftp server on my windows machine with a user and password that I had to put into the script so it could connect.

testscript.txt  This is the script I am working on.  it is running right now.  I have plans on making it better in the future.

The future has arrived!!!  Here is my improved script.

tl.txt

You can pass it arguments, now.  It defaults to elapsed time of 20 seconds, with a 1 second interval.
-e allows you to set your elapsed time in seconds
-i allows you to set you interval in seconds
-s allows you to set a start time in HHMM 24 hour format
-h give you helpful info...

Example:   sudo ./tl -e 3600 -i 10 s 0700 &
This assumes you named the script 'tl'.
This will run the camera for an hour, taking a picture every 10 seconds, and will start at 7:00 am.
If you give no -s argument, it will start immediately.
« Last Edit: August 14, 2013, 11:12:24 PM by Larry » 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!