View Single Post
Posts: 391 | Thanked: 912 times | Joined on Aug 2011 @ suncity
#47
Originally Posted by tetris11_ View Post
A quick fix until then would be to install cron, phone-control, and imagemagik and run:

TimeLapse.sh:
=============
Code:
#!/bin/bash

# Edit these
cap_script=/home/user/MyDocs/cap_script.sh
cap_dir=/var/tmp

an_script=/home/user/MyDocs/animate_script.sh
output_anim= $cap_dir/output_animation.gif

every_N_min=20
between_hour="11-12"

####################


# Make capture script
echo "
#!/bin/bash
phone-control --capture $cap_dir/`date +%Y_%m_%d-%H_%M_%S`.jpg
" >  $cap_script

# copy+backup current crontab
crontab -l  > old_cron.txt
cp old_cron.txt current_cron.txt

# Make the animate script that also restores the previous cron (and deletes the timelapse job)
echo "
#!/bin/bash
convert   -delay 20   -loop 0   $cap_dir/*.jpg  $output_anim
crontab old_cron.txt
rm old_cron.txt
" >  $an_script


# The following will execute the capture script "every N minutes" between the hours of "between_hour" just for today

echo "#min  hour   dom  mon dow year" >> current_cron.txt
echo " */$every_N_min   $between_hour   `date +%d\ %m\ %w\ %Y` $cap_script >> current_cron.txt

# Add animation script an hour after it runs to cron
echo " 0   $(( `echo $between_hour | egrep "[0-9]+$"` + 1 ))   `date +%d\ %m\ %w\ %Y`  $an_script >> current_cron.txt


# Write new crontab
crontab current_cron.txt
rm current_cron.txt
Hi tetris11_,

thanks for the reply and fix!

I was wondering about using gst-launch with "sleep x seconds".

EDIT: OK, forget about gst-launch; I'm unable to take apropriate pictures: the results are greenish and dark even with the back camera...

EDIT: My bad, it is possible to take fine pictures, just need to use the appropropriate commands: http://wiki.maemo.org/Phone_control#...h_front_camera

Cheers,

jm

Last edited by justmemory; 2014-10-07 at 07:23.
 

The Following User Says Thank You to justmemory For This Useful Post: