{"id":1155,"date":"2013-09-02T18:02:08","date_gmt":"2013-09-02T22:02:08","guid":{"rendered":"http:\/\/livingarguments.com\/?p=1155"},"modified":"2013-09-02T18:25:08","modified_gmt":"2013-09-02T22:25:08","slug":"r-pi-time-lapse-camera","status":"publish","type":"post","link":"https:\/\/livingarguments.com\/?p=1155","title":{"rendered":"R-PI Time-lapse Camera"},"content":{"rendered":"<p>A few weeks back while I was furloughed, I decided to buy a Raspberry Pi as a cheap way to pass the time. The time lapse camera seemed the quickest way to entertain myself.<\/p>\n<h2>Parts<\/h2>\n<ol>\n<li>1 Raspberry Pi Model B<\/li>\n<li>1 Transcend 32 GB JetFlash 500 Retractable USB Flash Drive<\/li>\n<li>1 Dynex USB 2.0 4 port powered hub<\/li>\n<li>1 Logitech\u00a0HD Webcam C310<\/li>\n<li>1 Transcend 8 GB SDHC card<\/li>\n<li>1 cell phone charger<\/li>\n<\/ol>\n<h2>Directions<\/h2>\n<p>I geeked out for a few hours after getting my RPi. For several years I spent a significant amount of time using Debian (or a variant) as my primary desktop at home. Using Raspbian was like going home. I initially did a <a href=\"http:\/\/www.raspberrypi.org\/quick-start-guide\">quick setup<\/a> using an SD card, but quickly switched to a flash usb drive to improve stability. I followed the directions from <a href=\"http:\/\/www.dingleberrypi.com\/2013\/05\/install-and-run-raspbian-from-a-usb-flash-drive\/\">Dingleberry Pi<\/a>\u00a0to transfer my root directory to the usb flash drive. After following those directions and shutting down the device, I hooked the usb flash drive into the 4 port hub. The hub gave me the ability to power external usb devices and my RPi from the same source.<\/p>\n<p>Once I finished configuring the RPi, moving the OS and powering it through a hub, I started playing with linux commands to access the webcam and take pictures. The <a href=\"http:\/\/elinux.org\/RPi_VerifiedPeripherals#USB_Webcams\">RPi hub<\/a> was a great source of information on webcam<\/p>\n<p>s that were compatible with the Pi. I chose a Logitech C310. In order to grab data from the webcam, I decided to use <a href=\"http:\/\/linux.die.net\/man\/1\/streamer\">streamer<\/a> and <a href=\"http:\/\/libav.org\/avconv.html\">avconv<\/a>. Streamer captures images and video from the webcam, and avconv changes the format and combines different audio and video sources. These two packages aren&#8217;t installed by default on Raspbian. Use apt-get to install everything.<\/p>\n<address>sudo apt-get install steamer<\/address>\n<address>sudo apt-get install libav-tools<\/address>\n<p>&nbsp;<\/p>\n<p>I played with the inputs for a little while to determine the results that I wanted. After a little command line play, I found these results worked best.<\/p>\n<address>streamer -t 02:00:00 -r 0.10 -j 99 -q -s 1900&#215;1425 -o picTest0000.jpeg &amp;<\/address>\n<address>avconv -r 30 -i picTest%04d.jpeg -y output.avi &amp;<\/address>\n<p>The first command captur<\/p>\n<p>es one jpeg image every 10 seconds for two hours. The second command creates an avi video at 30 fps.<\/p>\n<h2>The Results<\/h2>\n<p><iframe loading=\"lazy\" src=\"http:\/\/api.smugmug.com\/services\/embed\/2678548630_FQXP3BB?width=640&amp;height=480&amp;albumId=30963977&amp;albumKey=MXxG9s\" height=\"480\" width=\"640\" frameborder=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<p>Other examples can be found <a href=\"http:\/\/dpack.smugmug.com\/Photography\/Time-Lapse-Videos\/30963977_MXxG9s#!i=2678548630&amp;k=FQXP3BB\">here<\/a>.<\/p>\n<p><a href=\"http:\/\/raspberrypi.org\/\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-thumbnail wp-image-1158\" alt=\"Raspi_Colour_R\" src=\"https:\/\/livingarguments.com\/wp-content\/uploads\/2013\/09\/Raspi_Colour_R-124x150.png\" width=\"124\" height=\"150\" srcset=\"https:\/\/livingarguments.com\/wp-content\/uploads\/2013\/09\/Raspi_Colour_R-124x150.png 124w, https:\/\/livingarguments.com\/wp-content\/uploads\/2013\/09\/Raspi_Colour_R-248x300.png 248w, https:\/\/livingarguments.com\/wp-content\/uploads\/2013\/09\/Raspi_Colour_R-849x1024.png 849w, https:\/\/livingarguments.com\/wp-content\/uploads\/2013\/09\/Raspi_Colour_R.png 1134w\" sizes=\"auto, (max-width: 124px) 100vw, 124px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A few weeks back while I was furloughed, I decided to buy a Raspberry Pi as a cheap way to pass the time. The time lapse camera seemed the quickest way to entertain myself. Parts 1 Raspberry Pi Model B 1 Transcend 32 GB JetFlash 500 Retractable USB Flash Drive 1 Dynex USB 2.0 4 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":1158,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-1155","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology","entry"],"_links":{"self":[{"href":"https:\/\/livingarguments.com\/index.php?rest_route=\/wp\/v2\/posts\/1155","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/livingarguments.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/livingarguments.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/livingarguments.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/livingarguments.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1155"}],"version-history":[{"count":5,"href":"https:\/\/livingarguments.com\/index.php?rest_route=\/wp\/v2\/posts\/1155\/revisions"}],"predecessor-version":[{"id":1161,"href":"https:\/\/livingarguments.com\/index.php?rest_route=\/wp\/v2\/posts\/1155\/revisions\/1161"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/livingarguments.com\/index.php?rest_route=\/wp\/v2\/media\/1158"}],"wp:attachment":[{"href":"https:\/\/livingarguments.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1155"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/livingarguments.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1155"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/livingarguments.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1155"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}