Re: [HOWTO]Watch 720p videos on n900 [09.12.2011 VIDEOCALL WORKS]
what about using a perl script...
this one is for timelapse
Code:
# 2009.12.17 First version.
# 2009.12.24 Better gstreamer pipeline; more options, with better descriptions.
use strict;
#---- CONFIG SECTION ---- [BEGIN] ----
my ($x,$y) = (800, 480); # image resolution - try (2592, 1968)
my $cam = 0; # camera: 0 = back, 1 = front
my $dir = '/home/user/MyDocs/FCamera'; # folder where images will be saved
my $max = 800; # total number of images to take
my $delay = 3; # 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";
}
is it possible to set delay to 1/8 second ?
|