Motion tuning (don't run as root, backup include, config...)

This commit is contained in:
Arne Fitzenreiter
2009-07-07 23:07:20 +02:00
parent 8517ff5300
commit 833d0efb90
8 changed files with 97 additions and 14 deletions

View File

@@ -0,0 +1 @@
/etc/motion.conf

View File

@@ -109,13 +109,13 @@ netcam_tolerant_check off
# The auto_brightness feature uses the brightness option as its target value.
# If brightness is zero auto_brightness will adjust to average brightness value 128.
# Only recommended for cameras without auto brightness
auto_brightness off
auto_brightness on
# Set the initial brightness of a video device.
# If auto_brightness is enabled, this value defines the average brightness level
# which Motion will try and adjust to.
# Valid range 0-255, default 0 = disabled
brightness 0
brightness 128
# Set the contrast of a video device.
# Valid range 0-255, default 0 = disabled
@@ -195,20 +195,20 @@ minimum_motion_frames 1
# Recommended range: 0 to 5 (default: 0)
# Do not use large values! Large values will cause Motion to skip video frames and
# cause unsmooth mpegs. To smooth mpegs use larger values of post_capture instead.
pre_capture 0
pre_capture 5
# Number of frames to capture after motion is no longer detected (default: 0)
post_capture 0
post_capture 5
# Gap is the seconds of no motion detection that triggers the end of an event
# An event is defined as a series of motion images taken within a short timeframe.
# Recommended value is 60 seconds (Default). The value 0 is allowed and disables
# events causing all Motion to be written to one single mpeg file and no pre_capture.
gap 60
gap 0
# Maximum length in seconds of an mpeg movie
# When value is exceeded a new mpeg file is created. (Default: 0 = infinite)
max_mpeg_time 0
max_mpeg_time 86400
# Always save images even if there was no motion (default: off)
output_all off
@@ -279,7 +279,7 @@ ffmpeg_variable_bitrate 0
# flv - gives you a flash video with extension .flv
# ffv1 - FF video codec 1 for Lossless Encoding ( experimental )
# mov - QuickTime ( testing )
ffmpeg_video_codec mpeg4
ffmpeg_video_codec msmpeg4
# Use ffmpeg to deinterlace video. Necessary if you use an analog camera
# and see horizontal combing on moving objects in video or pictures.
@@ -321,7 +321,7 @@ text_right %Y-%m-%d\n%T-%q
# Draw a user defined text on the images using same options as C function strftime(3)
# Default: Not defined = no text
# Text is placed in lower left corner
; text_left CAMERA %t
text_left CAMERA %t\nhttp://nwww.ipfire.org
# Draw the number of changed pixed on the images (default: off)
# Will normally be set to off except when you setup and adjust the motion settings
@@ -356,7 +356,7 @@ text_double off
# Target base directory for pictures and films
# Recommended to use absolute path. (Default: current working directory)
target_dir /srv/motion/cam1
target_dir /var/motion/cam1
# File path for snapshots (jpeg or ppm) relative to target_dir
# Default: %v-%Y%m%d%H%M%S-snapshot
@@ -397,7 +397,7 @@ timelapse_filename %Y%m%d-timelapse
############################################################
# The mini-http server listens to this port for requests (default: 0 = disabled)
webcam_port 36000
webcam_port 2500
# Quality of the jpeg images produced (default: 50)
webcam_quality 75

View File

@@ -4,7 +4,7 @@ etc/rc.d/init.d/motion
etc/rc.d/rc0.d/K01motion
etc/rc.d/rc6.d/K01motion
etc/rc.d/rc3.d/S99motion
srv/motion/cam1/info
var/ipfire/backup/addons/includes/motion
#usr/share/doc/motion-3.2.11
#usr/share/doc/motion-3.2.11/CHANGELOG
#usr/share/doc/motion-3.2.11/COPYING

View File

@@ -81,7 +81,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make install
cp -vf $(DIR_SRC)/config/motion/motion.conf /etc
mkdir -pv /srv/motion/cam1
echo Folder for cam1 images > /srv/motion/cam1/info
install -v -m 644 $(DIR_SRC)/config/backup/includes/motion \
/var/ipfire/backup/addons/includes/motion
@rm -rf $(DIR_APP)
@$(POSTBUILD)

View File

@@ -6,7 +6,10 @@
case "$1" in
start)
boot_mesg "Starting motion webcam server..."
loadproc /usr/bin/motion
chown :video /dev/video*
mkdir -p /var/motion/cam1
chown -R video: /var/motion/cam1
loadproc sudo -u video /usr/bin/motion
;;
stop)

View File

@@ -0,0 +1,27 @@
#!/bin/bash
############################################################################
# #
# This file is part of the IPFire Firewall. #
# #
# IPFire is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
# IPFire is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with IPFire; if not, write to the Free Software #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
# #
# Copyright (C) 2007 IPFire-Team <info@ipfire.org>. #
# #
############################################################################
#
. /opt/pakfire/lib/functions.sh
extract_files
restore_backup ${NAME}
useradd -s /bin/false video

View File

@@ -0,0 +1,26 @@
#!/bin/bash
############################################################################
# #
# This file is part of the IPFire Firewall. #
# #
# IPFire is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
# IPFire is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with IPFire; if not, write to the Free Software #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
# #
# Copyright (C) 2007 IPFire-Team <info@ipfire.org>. #
# #
############################################################################
#
. /opt/pakfire/lib/functions.sh
make_backup ${NAME}
remove_files

26
src/paks/motion/update.sh Normal file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
############################################################################
# #
# This file is part of the IPFire Firewall. #
# #
# IPFire is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
# IPFire is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with IPFire; if not, write to the Free Software #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
# #
# Copyright (C) 2007 IPFire-Team <info@ipfire.org>. #
# #
############################################################################
#
. /opt/pakfire/lib/functions.sh
./uninstall.sh
./install.sh