{"id":460,"date":"2008-12-15T13:32:47","date_gmt":"2008-12-15T20:32:47","guid":{"rendered":"http:\/\/gregbaker.ca\/blog\/?p=460"},"modified":"2009-08-20T15:12:28","modified_gmt":"2009-08-20T22:12:28","slug":"time-lapse-movie","status":"publish","type":"post","link":"http:\/\/gregbaker.ca\/blog\/2008\/12\/15\/time-lapse-movie\/","title":{"rendered":"Time Lapse Movie"},"content":{"rendered":"<p>We had our first (annual?) holiday open house on Saturday.  We had a good turnout: thanks to everybody that came.  I think the whole thing was a success.<\/p>\n<p>There was food, and Kat has promised she will blog about that sometime soon.<\/p>\n<p>For me, the conversation piece was the camera on a tripod in the corner.  It was hooked up to my laptop and taking an image every 30 seconds (then displaying it).  The setup was based on <a href=\"http:\/\/www.dsi.unive.it\/~marzolla\/software\/time_lapse_movies\/\">somebody else&#8217;s instructions on creating a time lapse movie<\/a> in a similar way.<\/p>\n<p>I wasn&#8217;t entirely sure what I was going to do with these pictures.  I thought that a time lapse movie of the party might be cool.  I thought it might accidentally capture some good images.  What I didn&#8217;t realize was that neither Kat or I was going to have a chance to take any pictures anyway, so these were almost the only ones that we would have.<\/p>\n<p>I have gone through the pictures in a cursory way and posted some (along with the few pictures we did take by hand) in <a href=\"http:\/\/gregbaker.ca\/gallery2\/2008\/xmas-open-house\/\">our gallery<\/a>.<\/p>\n<p>I did put the frames together into <a href=\"http:\/\/gregbaker.ca\/gallery2\/2008\/xmas-open-house\/movie.avi.html\">a time lapse movie<\/a> (that link is about 24MB; I also did <a href=\"http:\/\/gregbaker.ca\/gallery2\/2008\/xmas-open-house\/movie2.avi.html\">a smaller 12 MB version<\/a>, or use the <a href=\"http:\/\/gregbaker.ca\/gallery2\/2008\/xmas-open-house\/movie2.avi.html\">direct link to the movie<\/a> if you&#8217;re having plugin problems, or <a href=\"http:\/\/www.facebook.com\/video\/video.php?v=538132082993\">the Facebook version<\/a> if all else fails).<\/p>\n<p>I&#8217;m actually pretty happy with how the movie turned out.  I kind of wish I had left the camera running until we had really finished the cleanup that night (with the last frame being lights-out, say), but that didn&#8217;t seem as important as actually cleaning stuff up at the time.<\/p>\n<h4>Camera Setup<\/h4>\n<p>I played with the camera settings for a while before I got it rolling.  What I ended up with was the smallest image the camera would take (about 2 MP), <a href=\"http:\/\/www.sigma-photo.com\/lenses\/lenses_all_details.asp?id=3320&#038;navigator=6\">my Sigma zoom<\/a> at 18mm, ISO 1600, auto white balance, auto exposure (most shots were around f\/2.8 and 1\/30 s), manual focus at about 3 m (depth of field was surprisingly good for the wide aperture), LCD image review off (to save battery).<\/p>\n<p>If I was doing it again, I might lock the white balance and aperture, just to keep everything in the video as consistent as possible.<\/p>\n<p>I swapped out the battery in the camera twice during the day.  I&#8217;m not totally sure that was necessary, but I didn&#8217;t want to take the chance of it running out.<\/p>\n<p>The net result was 1800 exposures in 15 hours: almost as many as I usually take in a year.<\/p>\n<h4>Computer Setup<\/h4>\n<p>When I had the idea, I thought I was going to have to do some low-level USB hacking, but it turns out <a href=\"http:\/\/www.gphoto.org\/proj\/gphoto2\/\">gphoto2<\/a> will do exactly what I want.  The script to start it was this: (gphoto does die occasionally, which is why it&#8217;s in the loop)<\/p>\n<blockquote><p><code><\/p>\n<pre>#!\/bin\/sh\r\nINTERVAL=30\r\n\r\nkillall gvfsd-gphoto2 2>\/dev\/null # kill program hogging the camera\r\ngphoto2 --set-config \/main\/camera\/setcameratime=1 # set time from computer\r\n\r\nwhile true ; do\r\n  killall gvfsd-gphoto2 2>\/dev\/null\r\n  gphoto2 \\\r\n    --set-config flashmode=0 --set-config beep=0 \\\r\n    --capture-image --interval ${INTERVAL} --hook-script hook\r\n  sleep ${INTERVAL} # keep going if gphoto dies\r\ndone<\/pre>\n<p><\/code><\/p><\/blockquote>\n<p>And the script &#8220;hook&#8221; that just bumps the display:<\/p>\n<blockquote><p><code><\/p>\n<pre>#!\/bin\/sh\r\nif [ $ACTION = \"download\" ] ; then\r\n  gqview -r $ARGUMENT # press \"f\" for full screen\r\nfi<\/pre>\n<p><\/code><\/p><\/blockquote>\n<p>I did have a small <a href=\"http:\/\/sourceforge.net\/mailarchive\/forum.php?thread_name=804668850805190103i4e226f7ey86eaeabad34a487%40mail.gmail.com&#038;forum_name=gphoto-user\">problem with gphoto and the Rebel XT<\/a> which was fixed with a one-line patch.  Also, the original instructions above are pretty liberal with the bitrate: I encoded with 1000 and 500 bps for the large and small movies.  I also had to crop the frames from the Rebel&#8217;s 3:2 aspect ratio to the 4:3 of your average video.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We had our first (annual?) holiday open house on Saturday. We had a good turnout: thanks to everybody that came. I think the whole thing was a success. There was food, and Kat has promised she will blog about that sometime soon. For me, the conversation piece was the camera on a tripod in the [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,14,10],"tags":[],"class_list":["post-460","post","type-post","status-publish","format-standard","hentry","category-life","category-photos","category-tech"],"_links":{"self":[{"href":"http:\/\/gregbaker.ca\/blog\/wp-json\/wp\/v2\/posts\/460","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/gregbaker.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/gregbaker.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/gregbaker.ca\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/gregbaker.ca\/blog\/wp-json\/wp\/v2\/comments?post=460"}],"version-history":[{"count":18,"href":"http:\/\/gregbaker.ca\/blog\/wp-json\/wp\/v2\/posts\/460\/revisions"}],"predecessor-version":[{"id":828,"href":"http:\/\/gregbaker.ca\/blog\/wp-json\/wp\/v2\/posts\/460\/revisions\/828"}],"wp:attachment":[{"href":"http:\/\/gregbaker.ca\/blog\/wp-json\/wp\/v2\/media?parent=460"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/gregbaker.ca\/blog\/wp-json\/wp\/v2\/categories?post=460"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/gregbaker.ca\/blog\/wp-json\/wp\/v2\/tags?post=460"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}