<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>https://wiki.computech.dev/w/index.php?action=history&amp;feed=atom&amp;title=Camera_timelapse</id>
	<title>Camera timelapse - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.computech.dev/w/index.php?action=history&amp;feed=atom&amp;title=Camera_timelapse"/>
	<link rel="alternate" type="text/html" href="https://wiki.computech.dev/w/index.php?title=Camera_timelapse&amp;action=history"/>
	<updated>2026-11-24T12:33:37Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in Computech CMS Wiki</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://wiki.computech.dev/w/index.php?title=Camera_timelapse&amp;diff=1464&amp;oldid=prev</id>
		<title>Simon Zeberli: Die Seite wurde neu angelegt: „==Installation==  sudo wget href=&quot;https://bitbucket.org/fotosyn/fotosynlabs/raw/0a5f212958637ce20f502fc579fc28338b33d87e/RaspiLapseCam/raspiLapseCam.py   sudo …“</title>
		<link rel="alternate" type="text/html" href="https://wiki.computech.dev/w/index.php?title=Camera_timelapse&amp;diff=1464&amp;oldid=prev"/>
		<updated>2014-08-28T13:44:14Z</updated>

		<summary type="html">&lt;p&gt;Die Seite wurde neu angelegt: „==Installation==  sudo wget href=&amp;quot;https://bitbucket.org/fotosyn/fotosynlabs/raw/0a5f212958637ce20f502fc579fc28338b33d87e/RaspiLapseCam/raspiLapseCam.py   sudo …“&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Installation==&lt;br /&gt;
 sudo wget href=&amp;quot;https://bitbucket.org/fotosyn/fotosynlabs/raw/0a5f212958637ce20f502fc579fc28338b33d87e/RaspiLapseCam/raspiLapseCam.py&lt;br /&gt;
&lt;br /&gt;
 sudo apt-get install mencoder&lt;br /&gt;
==Betrieb==&lt;br /&gt;
 cd /&amp;lt;your_timelapse_folder&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 ls *.jpg &amp;gt; list.txt&lt;br /&gt;
&lt;br /&gt;
 mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4:aspect=16/9:vbitrate=8000000 -vf scale=1920:1080 -o timelapse.avi -mf type=jpeg:fps=24 mf://@list.txt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Python Code==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; line start=&amp;quot;1&amp;quot; highlight=&amp;quot;5&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
#!/usr/bin/env python&lt;br /&gt;
#&lt;br /&gt;
#  raspiLapseCam.py&lt;br /&gt;
#&lt;br /&gt;
#  Created by James Moore on 28/07/2013.&lt;br /&gt;
#  Copyright (c) 2013 Fotosyn. All rights reserved.&lt;br /&gt;
#&lt;br /&gt;
#  Raspberry Pi is a trademark of the Raspberry Pi Foundation.&lt;br /&gt;
&lt;br /&gt;
#  Redistribution and use in source and binary forms, with or without&lt;br /&gt;
#  modification, are permitted provided that the following conditions are met:&lt;br /&gt;
&lt;br /&gt;
#  1. Redistributions of source code must retain the above copyright notice, this&lt;br /&gt;
#  list of conditions and the following disclaimer.&lt;br /&gt;
#  2. Redistributions in binary form must reproduce the above copyright notice,&lt;br /&gt;
#  this list of conditions and the following disclaimer in the documentation&lt;br /&gt;
#  and/or other materials provided with the distribution.&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &amp;quot;AS IS&amp;quot; AND&lt;br /&gt;
#  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED&lt;br /&gt;
#  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE&lt;br /&gt;
#  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR&lt;br /&gt;
#  ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES&lt;br /&gt;
#  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;&lt;br /&gt;
#  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND&lt;br /&gt;
#  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT&lt;br /&gt;
#  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS&lt;br /&gt;
#  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
&lt;br /&gt;
#  The views and conclusions contained in the software and documentation are those&lt;br /&gt;
#  of the authors and should not be interpreted as representing official policies,&lt;br /&gt;
#  either expressed or implied, of the FreeBSD Project.&lt;br /&gt;
&lt;br /&gt;
# This script sets up and runs a Python Script which, at intervals invokes a capture &lt;br /&gt;
# command to the Raspberry Pi camera, and stores those files locally in a dynamically&lt;br /&gt;
# named folder.&lt;br /&gt;
&lt;br /&gt;
# To invoke, copy this script to an easy to find file location on your Raspberry Pi&lt;br /&gt;
# (eg. /home/pi/), log into your Raspberry Pi via terminal and type:&lt;br /&gt;
#&lt;br /&gt;
# sudo python /your/file/location/raspiLapseCam.py (add &amp;amp;) if you wish to run as a&lt;br /&gt;
# background task. A process ID will be shown which can be ended with&lt;br /&gt;
&lt;br /&gt;
# sudo kill XXXX (XXXX = process number)&lt;br /&gt;
&lt;br /&gt;
# Based on your settings the application will no begin capturing images&lt;br /&gt;
# saving them to your chose file location (same as current location of this file as default.&lt;br /&gt;
&lt;br /&gt;
# Import some frameworks&lt;br /&gt;
import os&lt;br /&gt;
import time&lt;br /&gt;
import RPi.GPIO as GPIO&lt;br /&gt;
from datetime import datetime&lt;br /&gt;
&lt;br /&gt;
# Grab the current datetime which will be used to generate dynamic folder names&lt;br /&gt;
d = datetime.now()&lt;br /&gt;
initYear = &amp;quot;%04d&amp;quot; % (d.year) &lt;br /&gt;
initMonth = &amp;quot;%02d&amp;quot; % (d.month) &lt;br /&gt;
initDate = &amp;quot;%02d&amp;quot; % (d.day)&lt;br /&gt;
initHour = &amp;quot;%02d&amp;quot; % (d.hour)&lt;br /&gt;
initMins = &amp;quot;%02d&amp;quot; % (d.minute)&lt;br /&gt;
&lt;br /&gt;
# Define the location where you wish to save files. Set to HOME as default. &lt;br /&gt;
# If you run a local web server on Apache you could set this to /var/www/ to make them &lt;br /&gt;
# accessible via web browser.&lt;br /&gt;
folderToSave = &amp;quot;timelapse_&amp;quot; + str(initYear) + str(initMonth) + str(initDate) + str(initHour) + str(initMins)&lt;br /&gt;
os.mkdir(folderToSave)&lt;br /&gt;
&lt;br /&gt;
# Set the initial serial for saved images to 1&lt;br /&gt;
fileSerial = 1&lt;br /&gt;
&lt;br /&gt;
# Run a WHILE Loop of infinitely&lt;br /&gt;
while True:&lt;br /&gt;
    &lt;br /&gt;
    d = datetime.now()&lt;br /&gt;
    if d.hour &amp;gt; 2:&lt;br /&gt;
        &lt;br /&gt;
        # Set FileSerialNumber to 000X using four digits&lt;br /&gt;
        fileSerialNumber = &amp;quot;%04d&amp;quot; % (fileSerial)&lt;br /&gt;
        &lt;br /&gt;
        # Capture the CURRENT time (not start time as set above) to insert into each capture image filename&lt;br /&gt;
        hour = &amp;quot;%02d&amp;quot; % (d.hour)&lt;br /&gt;
        mins = &amp;quot;%02d&amp;quot; % (d.minute)&lt;br /&gt;
        &lt;br /&gt;
        # Define the size of the image you wish to capture. &lt;br /&gt;
        imgWidth = 800 # Max = 2592 &lt;br /&gt;
        imgHeight = 600 # Max = 1944&lt;br /&gt;
        print &amp;quot; ====================================== Saving file at &amp;quot; + hour + &amp;quot;:&amp;quot; + mins&lt;br /&gt;
        &lt;br /&gt;
        # Capture the image using raspistill. Set to capture with added sharpening, auto white balance and average metering mode&lt;br /&gt;
        # Change these settings where you see fit and to suit the conditions you are using the camera in&lt;br /&gt;
        os.system(&amp;quot;raspistill -w &amp;quot; + str(imgWidth) + &amp;quot; -h &amp;quot; + str(imgHeight) + &amp;quot; -o &amp;quot; + str(folderToSave) + &amp;quot;/&amp;quot; + str(fileSerialNumber) + &amp;quot;_&amp;quot; + str(hour) + str(mins) +  &amp;quot;.jpg  -sh 40 -awb auto -mm average -v&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
        # Increment the fileSerial&lt;br /&gt;
        fileSerial += 1&lt;br /&gt;
        &lt;br /&gt;
        # Wait 60 seconds (1 minute) before next capture&lt;br /&gt;
        time.sleep(60)&lt;br /&gt;
        &lt;br /&gt;
    else:&lt;br /&gt;
        &lt;br /&gt;
        # Just trapping out the WHILE Statement&lt;br /&gt;
        print &amp;quot; ====================================== Doing nothing at this time&amp;quot;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Simon Zeberli</name></author>
	</entry>
</feed>