Esempio n. 1
0
 def __init__(self):
     self.alive = False
     self.process = None
     self.FNULL = None
     self.command = "raspivid -t 9999999 -w {} -h {} -fps {} -b {}  -o - | ffmpeg -i - -vcodec copy -an -r 25 -f flv -metadata streamName=myStream tcp://0.0.0.0:6666".format(Helper.get("width"),Helper.get("height"),Helper.get("fps"),Helper.get("bitrate"))
Esempio n. 2
0
import time
import threading
from datetime import datetime
from PIL import Image
from Globals import Helper

# Motion detection settings:
# Threshold          - how much a pixel has to change by to be marked as "changed"
# Sensitivity        - how many changed pixels before capturing an image, needs to be higher if noisy view
# ForceCapture       - whether to force an image to be captured every forceCaptureTime seconds, values True or False
# filepath           - location of folder to save photos
# filenamePrefix     - string that prefixes the file name for easier identification of files.
# diskSpaceToReserve - Delete oldest images to avoid filling disk. How much byte to keep free on disk.
# cameraSettings     - "" = no extra settings; "-hf" = Set horizontal flip of image; "-vf" = Set vertical flip; "-hf -vf" = both horizontal and vertical flip
threshold = 40
sensitivity = int(Helper.get("sensitivity"))
forceCapture = False
forceCaptureTime = 60 * 60 *6 # Every six hours
filepath = Helper.get("filepath") #"/home/pi/elektro/webcam/webinterface/picam"
filenamePrefix = "capture"
diskSpaceToReserve = int(Helper.get("diskSpaceToReserve")) # Keep 40 mb free on disk
cameraSettings = ""

# settings of the photos to save
saveWidth   = int(Helper.get("saveWidth"))
saveHeight  = int(Helper.get("saveHeight"))
saveQuality = int(Helper.get("saveQuality")) # Set jpeg quality (0 to 100)

# Test-Image settings
testWidth = 100
testHeight = 75