Skip to content

Commit

Permalink
Revisions to configuration options
Browse files Browse the repository at this point in the history
Revisions to configuration options.

1.  Revise config options to be `movie_` and `picture_`
2.  Revise config options to align with topic and code.
    *  motion_video_pipe, ipv6_enabled, rtsp_uses_tcp
    *  switchfilter, logfile, process_id_file
3.  Revise depreciated options to still be valid for webcontrol and config files.
4.  Revise distributed config files to only include most common options
5.  Revise sequence of config options to be arranged by topic.
6.  Revise code to use names consistent with config parms.
7.  Revise manual, guide and code to specify same default values.
8.  Update guide and manual to reflect revised option names.
  • Loading branch information
Mr-DaveDev authored and Mr-Dave committed Aug 18, 2018
1 parent 197ac4e commit 5d863a1
Show file tree
Hide file tree
Showing 25 changed files with 2,749 additions and 3,355 deletions.
4 changes: 2 additions & 2 deletions alg.c
Expand Up @@ -425,7 +425,7 @@ void alg_threshold_tune(struct context *cnt, int diffs, int motion)
if (sum < top * 2)
sum = top * 2;

if (sum < cnt->conf.max_changes)
if (sum < cnt->conf.threshold)
cnt->threshold = (cnt->threshold + sum) / 2;
}

Expand Down Expand Up @@ -1242,7 +1242,7 @@ int alg_diff(struct context *cnt, unsigned char *new)
{
int diffs = 0;

if (alg_diff_fast(cnt, cnt->conf.max_changes / 2, new))
if (alg_diff_fast(cnt, cnt->conf.threshold / 2, new))
diffs = alg_diff_standard(cnt, new);

return diffs;
Expand Down
72 changes: 15 additions & 57 deletions camera1-dist.conf.in
Expand Up @@ -3,69 +3,27 @@
# This config file was generated by @PACKAGE_NAME@ @PACKAGE_VERSION@

###########################################################
# Capture device options
# Configuration options specific to camera 1
############################################################
# User defined name for the camera.
camera_name MyCam1

# Camera Id
# Consistent identification number to assign to each camera across multiple
# invocations of Motion.
# Default: The order when the camera file was read
# camera_id = 1
# Numeric identifier for the camera.
camera_id 101

# Videodevice to be used for capturing (default /dev/video0)
# for FreeBSD default is /dev/bktr0
videodevice /dev/video0
# The full URL of the network camera stream.
netcam_url rtsp://yourcamera1ip:port/camera/specific/url

# The video input to be used (default: -1)
# Should normally be set to 1 for video/TV cards, and -1 for USB cameras
input -1
# Image width in pixels.
width 1280

# 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 1


############################################################
# Target Directories and filenames For Images And Films
# For the options snapshot_, picture_, mpeg_ and timelapse_filename
# you can use conversion specifiers
# %Y = year, %m = month, %d = date,
# %H = hour, %M = minute, %S = second,
# %v = event, %q = frame number, %t = camera id number,
# %D = changed pixels, %N = noise level,
# %i and %J = width and height of motion area,
# %K and %L = X and Y coordinates of motion center
# %C = value defined by text_event
# Quotation marks round string are allowed.
############################################################

# Target base directory for pictures and films
# Recommended to use absolute patch. (Default: current working directory)
#target_dir /tmp/motion/cam1
# Image height in pixels.
height 720

# File path for motion triggered images (jpeg, ppm or webp) relative to target_dir
# Default: %v-%Y%m%d%H%M%S-%q
# Default value is equivalent to legacy oldlayout option
# For Motion 3.0 compatible mode choose: %Y/%m/%d/%H/%M/%S-%q
# File extension .jpg, .ppm or .webp is automatically added so do not include this
# Set to 'preview' together with best-preview feature enables special naming
# convention for preview shots. See motion guide for details
picture_filename CAM1_%v-%Y%m%d%H%M%S-%q


############################################################
# Live Stream Server
############################################################

# The mini-http server listens to this port for requests (default: 0 = disabled)
stream_port 8081
# Text to be overlayed in the lower left corner of images
text_left CAMERA 1

# Command to be executed when a picture (.ppm|.jpg|.webp) is saved (default: none)
# The filename of the picture is appended as an argument for the command.
#on_picture_save /usr/local/motion-extras/camparse2.pl
# File name(without extension) for movies relative to target directory
movie_filename CAM01_%t-%v-%Y%m%d%H%M%S

# Command to be executed when a movie file (.mpg|.avi) is closed. (default: none)
# Filename of movie is appended as an argument for the command.
#on_movie_end /usr/local/motion-extras/mpegparse2.pl

74 changes: 17 additions & 57 deletions camera2-dist.conf.in
Expand Up @@ -3,69 +3,29 @@
# This config file was generated by @PACKAGE_NAME@ @PACKAGE_VERSION@

###########################################################
# Capture device options
# Configuration options specific to camera 2
############################################################
# User defined name for the camera.
camera_name Patio

# Camera Id
# Consistent identification number to assign to each camera across multiple
# invocations of Motion.
# Default: The order when the camera file was read
# camera_id = 2
# Numeric identifier for the camera.
camera_id 102

# Videodevice to be used for capturing (default /dev/video0)
# for FreeBSD default is /dev/bktr0
videodevice /dev/video1
# The full URL of the network camera stream.
netcam_url http://yourcamera2ip:port/camera/specific/url

# The video input to be used (default: -1)
# Should normally be set to 1 for video/TV cards, and -1 for USB cameras
input 1
# Image width in pixels.
width 352

# 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 2
# Image height in pixels.
height 288

# Text to be overlayed in the lower left corner of images
text_left Camera2

############################################################
# Target Directories and filenames For Images And Films
# For the options snapshot_, picture_, mpeg_ and timelapse_filename
# you can use conversion specifiers
# %Y = year, %m = month, %d = date,
# %H = hour, %M = minute, %S = second,
# %v = event, %q = frame number, %t = camera id number,
# %D = changed pixels, %N = noise level,
# %i and %J = width and height of motion area,
# %K and %L = X and Y coordinates of motion center
# %C = value defined by text_event
# Quotation marks round string are allowed.
############################################################

# Target base directory for pictures and films
# Recommended to use absolute patch. (Default: current working directory)
#target_dir /tmp/motion/cam2

# File path for motion triggered images (jpeg, ppm or webp) relative to target_dir
# Default: %v-%Y%m%d%H%M%S-%q
# Default value is equivalent to legacy oldlayout option
# For Motion 3.0 compatible mode choose: %Y/%m/%d/%H/%M/%S-%q
# File extension .jpg, .ppm or .webp is automatically added so do not include this
# Set to 'preview' together with best-preview feature enables special naming
# convention for preview shots. See motion guide for details
picture_filename CAM2_%v-%Y%m%d%H%M%S-%q


############################################################
# Live Stream Server
############################################################

# The mini-http server listens to this port for requests (default: 0 = disabled)
stream_port 8082

# Command to be executed when a picture (.ppm|.jpg|.webp) is saved (default: none)
# The filename of the picture is appended as an argument for the command.
#on_picture_save /usr/local/motion-extras/camparse2.pl
# Text to be overlayed in the lower right corner of images.
text_right Patio\n%Y-%m-%d\n%T-%q

# Command to be executed when a movie file (.mpg|.avi) is closed. (default: none)
# Filename of movie is appended as an argument for the command.
#on_movie_end /usr/local/motion-extras/mpegparse2.pl
# File name(without extension) for movies relative to target directory
movie_filename CAM02_%t-%v-%Y%m%d%H%M%S

74 changes: 19 additions & 55 deletions camera3-dist.conf.in
Expand Up @@ -3,69 +3,33 @@
# This config file was generated by @PACKAGE_NAME@ @PACKAGE_VERSION@

###########################################################
# Capture device options
# Configuration options specific to camera 3
############################################################
# User defined name for the camera.
camera_name Front Door

# Camera Id
# Consistent identification number to assign to each camera across multiple
# invocations of Motion.
# Default: The order when the camera file was read
# camera_id = 3
# Numeric identifier for the camera.
camera_id 103

# Videodevice to be used for capturing (default /dev/video0)
# for FreeBSD default is /dev/bktr0
videodevice /dev/video2
# The full URL of the network camera stream.
netcam_url rtmp://yourcamera3ip:port/camera/specific/url

# The video input to be used (default: -1)
# Should normally be set to 1 for video/TV cards, and -1 for USB cameras
input -1
netcam_userpass myusername:mypassword

# 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 3
# Image width in pixels.
width 2048

# Image height in pixels.
height 1536

############################################################
# Target Directories and filenames For Images And Films
# For the options snapshot_, picture_, mpeg_ and timelapse_filename
# you can use conversion specifiers
# %Y = year, %m = month, %d = date,
# %H = hour, %M = minute, %S = second,
# %v = event, %q = frame number, %t = camera id number,
# %D = changed pixels, %N = noise level,
# %i and %J = width and height of motion area,
# %K and %L = X and Y coordinates of motion center
# %C = value defined by text_event
# Quotation marks round string are allowed.
############################################################

# Target base directory for pictures and films
# Recommended to use absolute patch. (Default: current working directory)
#target_dir /tmp/motion/cam3

# File path for motion triggered images (jpeg, ppm or webp) relative to target_dir
# Default: %v-%Y%m%d%H%M%S-%q
# Default value is equivalent to legacy oldlayout option
# For Motion 3.0 compatible mode choose: %Y/%m/%d/%H/%M/%S-%q
# File extension .jpg, .ppm or .webp is automatically added so do not include this
# Set to 'preview' together with best-preview feature enables special naming
# convention for preview shots. See motion guide for details
picture_filename CAM3_%v-%Y%m%d%H%M%S-%q


############################################################
# Live Stream Server
############################################################
# Text to be overlayed in the lower left corner of images
text_left Camera3

# The mini-http server listens to this port for requests (default: 0 = disabled)
stream_port 8083
# Text to be overlayed in the lower right corner of images.
text_right FrontDoor\n%Y-%m-%d\n%T-%q

# Command to be executed when a picture (.ppm|.jpg|.webp) is saved (default: none)
# The filename of the picture is appended as an argument for the command.
#on_picture_save /usr/local/motion-extras/camparse2.pl
text_scale 4

# Command to be executed when a movie file (.mpg|.avi) is closed. (default: none)
# Filename of movie is appended as an argument for the command.
#on_movie_end /usr/local/motion-extras/mpegparse2.pl
# File name(without extension) for movies relative to target directory
movie_filename CAM03_%t-%v-%Y%m%d%H%M%S

75 changes: 17 additions & 58 deletions camera4-dist.conf.in
Expand Up @@ -3,69 +3,28 @@
# This config file was generated by @PACKAGE_NAME@ @PACKAGE_VERSION@

###########################################################
# Capture device options
# Configuration options specific to camera 4
############################################################
# User defined name for the camera.
camera_name Server room

# Camera Id
# Consistent identification number to assign to each camera across multiple
# invocations of Motion.
# Default: The order when the camera file was read
# camera_id = 4
# Numeric identifier for the camera.
camera_id 104

# Videodevice to be used for capturing (default /dev/video0)
# for FreeBSD default is /dev/bktr0
videodevice /dev/video3
# Video device (e.g. /dev/video0) to be used for capturing.
videodevice /dev/video0

# The video input to be used (default: -1)
# Should normally be set to 1 for video/TV cards, and -1 for USB cameras
input -1
# Image width in pixels.
width 640

# 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 4
# Image height in pixels.
height 480

# Text to be overlayed in the lower left corner of images
text_left

############################################################
# Target Directories and filenames For Images And Films
# For the options snapshot_, picture_, mpeg_ and timelapse_filename
# you can use conversion specifiers
# %Y = year, %m = month, %d = date,
# %H = hour, %M = minute, %S = second,
# %v = event, %q = frame number, %t = camera id number,
# %D = changed pixels, %N = noise level,
# %i and %J = width and height of motion area,
# %K and %L = X and Y coordinates of motion center
# %C = value defined by text_event
# Quotation marks round string are allowed.
############################################################

# Target base directory for pictures and films
# Recommended to use absolute patch. (Default: current working directory)
#target_dir /tmp/motion/cam4

# File path for motion triggered images (jpeg, ppm or webp) relative to target_dir
# Default: %v-%Y%m%d%H%M%S-%q
# Default value is equivalent to legacy oldlayout option
# For Motion 3.0 compatible mode choose: %Y/%m/%d/%H/%M/%S-%q
# File extension .jpg, .ppm or .webp is automatically added so do not include this
# Set to 'preview' together with best-preview feature enables special naming
# convention for preview shots. See motion guide for details
picture_filename CAM4_%v-%Y%m%d%H%M%S-%q


############################################################
# Live Stream Server
############################################################

# The mini-http server listens to this port for requests (default: 0 = disabled)
stream_port 8084

# Command to be executed when a picture (.ppm|.jpg|.webp) is saved (default: none)
# The filename of the picture is appended as an argument for the command.
#on_picture_save /usr/local/motion-extras/camparse2.pl

# Command to be executed when a movie file (.mpg|.avi) is closed. (default: none)
# Filename of movie is appended as an argument for the command.
#on_movie_end /usr/local/motion-extras/mpegparse2.pl
# Text to be overlayed in the lower right corner of images.
text_right Camera4\n%Y-%m-%d\n%T-%q

# File name(without extension) for movies relative to target directory
movie_filename CAM04_%t-%v-%Y%m%d%H%M%S

0 comments on commit 5d863a1

Please sign in to comment.