Latest LQ Deal: Latest LQ Deals
Go Back > Linux Answers > Applications / GUI / Multimedia
User Name


By ////// at 2009-07-13 06:58
In this tutorial I quickly show how you can make timelapse movies.


First you need nice webcam where you can download pictures.
Here is couple of Google searches that I use when I'm looking for cameras.

Google image search: /record/current.jpg

Google image search: intext:"Shift-Reload to Refresh Image"


Next you need some kind of dl script that downloads pictures from webcams.
#!/usr/bin/perl -w

while ($count<10000) {

    ( $s,$m,$h,$mday ) = localtime( time ); 
    if( $s <  10 ) { $s = "0$s" } 
    if( $m  <  10 ) { $m  = "0$m" } 
    if( $h  <  10 ) { $h  = "0$h" } 
    if( $mday <  10 ) { $mday = "0$mday" } 
    $date_time = "$mday~$h-$m-$s";

    system("lwp-download /path/to/your/imagefolder/$date_time.jpg"); 
    sleep 60; # be polite and use reasonable time values ;)


Just choose a cam you like and start
"perl /usr/bin/"
go to sleep, after a (about)thousand pictures you are ready to make your movie, it is simple.
just cd into your imagefolder and use mencoder to make your movie.
cd /path/to/your/imagefolder
mencoder "mf://*.jpg" -mf fps=10 -o test.avi -ovc lavc -lavcopts vcodec=msmpeg4v2:vbitrate=800
Thats it.

Here is rather boring timelapse movie made from 996 pictures.


by pwc101 on Mon, 2009-07-27 14:41
Thanks for the idea!

I wrote a simple bash script to grab the images and save them with the time and date:

if [ \! -d $HOME/logs/webcams/soton/ ]; then
   mkdir $HOME/logs/webcams/soton/
cd $HOME/logs/webcams/soton/

while true; do
   DATE=$(date "+%y-%m-%d-%H-%M-%s")
   wget --timeout=15 --quiet -nd -np \ && \
   mv largesize.jpg soton_high_street_${DATE}.jpg
   sleep 900; # be polite and use reasonable time values ;)
I'm looking into how to do this with my own USB webcam - I should think it's possible to grab an image from it relatively easily and it'd make an interesting video to see how we move around the flat

by ////// on Tue, 2009-09-29 07:10
I'm glad you find this tut useful, did you manage to make your own movie from your webcam ?

by pwc101 on Tue, 2009-09-29 07:34
In the end, I didn't.

I found a program called grabby that would take a single image from a webcam and then store it in a particular folder, but I only managed to get it to compile on Slackware after I contacted the author and he provided me with a few patches. Even then, after it successfully compiled, it wouldn't get the images from my webcam, so I gave up.


All times are GMT -5. The time now is 01:09 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration