|
2009-12-24
, 03:20
|
Posts: 377 |
Thanked: 97 times |
Joined on Dec 2009
@ US
|
#3
|
|
2009-12-24
, 03:24
|
Posts: 3,428 |
Thanked: 2,856 times |
Joined on Jul 2008
|
#4
|
mv photo.sh photo.pl
perl photo.pl
The Following User Says Thank You to fatalsaint For This Useful Post: | ||
|
2009-12-24
, 03:26
|
Posts: 377 |
Thanked: 97 times |
Joined on Dec 2009
@ US
|
#5
|
|
2009-12-24
, 03:30
|
Posts: 377 |
Thanked: 97 times |
Joined on Dec 2009
@ US
|
#6
|
|
2009-12-24
, 03:31
|
Posts: 3,428 |
Thanked: 2,856 times |
Joined on Jul 2008
|
#7
|
|
2009-12-24
, 20:39
|
Posts: 59 |
Thanked: 71 times |
Joined on Sep 2009
@ Brazil
|
#8
|
#!/usr/bin/perl -w # A simple intervalometer for the Nokia N900. # Author: Ricardo Mendonca Ferreira - ric@mpcnet.com.br # http://talk.maemo.org/showthread.php?t=38275 # This script requires gstreamer installed on your N900. # See the link above for more info. # Run this script on an X Terminal in your device with: # perl intervalometer.pl # 2009.12.17 First version. # 2009.12.24 Better gstreamer pipeline; more options, with better descriptions. use strict; #---- CONFIG SECTION ---- [BEGIN] ---- my ($x,$y) = (640, 480); # image resolution - try (2592, 1968) my $cam = 0; # camera: 0 = back, 1 = front my $dir = '/home/user/MyDocs/test'; # folder where images will be saved my $max = 10; # total number of images to take my $delay = 5; # interval between pictures #---- CONFIG SECTION ---- [END] ---- die "$dir not found!\n" if !-d $dir; my $gst = "/usr/bin/gst-launch v4l2camsrc device=/dev/video$cam num-buffers=1 ! ffmpegcolorspace ! video/x-raw-yuv,width=$x,height=$y ! jpegenc ! filesink location="; my $num=0; print "Intervalometer started - will take $max pictures at $x x $y\n"; while ($num < $max) { $num=sprintf'%05d',$num; `$gst$dir/$num.jpg`; printf "saved %d of %d", $num+1, $max; $num++; if ($num < $max) { print " - sleeping $delay sec."; sleep $delay; } print "\n"; }
The Following 19 Users Say Thank You to Ricardo For This Useful Post: | ||
BLC, burgwinkel, codeMonkey, Dak, dashti, ElGatoFlojo, F2thaK, iKneaDough, Ken-Young, kristoph76, mannakiosk, ossipena, qole, real_per, rm53, smoothc, thp, Tinnet, zimon |
|
2009-12-24
, 21:43
|
Posts: 377 |
Thanked: 97 times |
Joined on Dec 2009
@ US
|
#9
|
|
2009-12-27
, 02:10
|
Posts: 39 |
Thanked: 13 times |
Joined on Dec 2009
|
#10
|
I'm part of the KAPing with the N900 team, developing a KAP (Kite Aerial Photography) system for the Push N900 project.
While testing some ideas, I wrote this simple, quick-and-dirty intervalometer in Perl that you can run from the X Terminal of your N900. Install gstreamer, since this script will use it. You can take as many pictures as you want ($max) with a fixed interval in seconds ($delay). Just be sure to save them in a valid folder ($dir). I compiled a video with the pictures I took in a session, check it out if you want to.
So, here is the code, as requested:
EDIT: a better one is down on this page
Last edited by Ricardo; 2009-12-24 at 20:41. Reason: Added link for improved script