About | Rules and Guide
Construction1990’s Internet Montage? No!
Please excuse the site weirdness. Mike is fixing and making things.
Ludum Dare 31 — Coming December 5th-8th 2014!

  • ??? Begins: in 7 days, 14 hours, 35 minutes, 45 seconds
  • October Ends: in 8 days, 14 hours, 47 minutes, 45 seconds
  • Ludum Dare 31 begins: in 43 days, 15 hours, 35 minutes, 45 seconds
  • (FYI: Clock might be off) | Ludum Dare 31: Real World Gatherings (Now Open!)

    [ October Challenge 2014 | Resources | Submit/Edit | View All ]

    Creating a timelapse in Linux

    Posted by (twitter: @kvisle)
    August 19th, 2011 7:30 am


    I’ve written a couple of scripts for making timelapses in Linux. It’s fairly simple stuff;

    Create a screenshot every 15th second by running the following script in a terminal;


    # Takes a screenshot of my second monitor every 15 seconds
    # Only have one monitor? Drop the -crop part ...

    mkdir ~/img

    while [ 1 ]; do
    # Uncomment the line below if you only want timelapse of your second monitor, and both monitors are 1680x1050 big.
    # import -window root -crop 1680x1050+1680+0 ~/img/LD21-$(date +%y%m%d-%H%M%S).jpg

    import -window root ~/img/LD21-$(date +%y%m%d-%H%M%S).jpg
    sleep 15

    (The script is interrupted by pressing CTRL+C)

    Then encoding the images can be done using mencoder, like this;

    mencoder mf://*.jpg -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell -oac copy -o output.avi

    If you want audio, add ‘-audiofile somefile.mp3′.


    Tags: ,

    4 Responses to “Creating a timelapse in Linux”

    1. N0_Named_Guy says:

      Or you can use scrot instead of import =)

    2. [...] this I figured out with the help of Kvisle’s Post on this [...]

    3. Or you can use Glapse, https://github.com/siondream/glapse, “conceived to be used at Ludum Dare”

    Leave a Reply

    You must be logged in to post a comment.

    All posts, images, and comments are owned by their creators.

    [cache: storing page]