Sziasztok!
Kérdésem a következő lenne. Adott a következő conf file:
motion.conf:
############################################################
# External Commands, Warnings and Logging:
# You can use conversion specifiers for the on_xxxx commands
# %Y = year, %m = month, %d = date,
# %H = hour, %M = minute, %S = second,
# %v = event, %q = frame number, %t = thread (camera) 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
# %f = filename with full path
# %n = number indicating filetype
# Both %f and %n are only defined for on_picture_save,
# on_movie_start and on_movie_end
# Quotation marks round string are allowed.
############################################################
# Do not sound beeps when detecting motion (default: on)
# Note: Motion never beeps when running in daemon mode.
quiet on
# Command to be executed when an event starts. (default: none)
# An event starts at first motion detected after a period of no motion defined by gap
on_event_start
# Command to be executed when an event ends after a period of no motion
# (default: none). The period of no motion is defined by option gap.
on_event_end
# Command to be executed when a picture (.ppm|.jpg) is saved (default: none)
# To give the filename as an argument to a command append it with %f
on_picture_save '%f'
# Command to be executed when a motion frame is detected (default: none)
on_motion_detected '%f'
# Command to be executed when a movie file (.mpg|.avi) is created. (default: none)
# To give the filename as an argument to a command append it with %f
on_movie_start '%f'
# Command to be executed when a movie file (.mpg|.avi) is closed. (default: none)
# To give the filename as an argument to a command append it with %f
on_movie_end '%f'
############################################################
# Common Options For MySQL and PostgreSQL database features.
# Options require the MySQL/PostgreSQL options to be active also.
############################################################
# Log to the database when creating motion triggered image file (default: on)
sql_log_image on
# Log to the database when creating a snapshot image file (default: on)
sql_log_snapshot on
# Log to the database when creating motion triggered mpeg file (default: off)
sql_log_mpeg on
# Log to the database when creating timelapse mpeg file (default: off)
sql_log_timelapse on
# SQL query string that is sent to the database
# Use same conversion specifiers has for text features
# Additional special conversion specifiers are
# %n = the number representing the file_type
# %f = filename with full path
# Default value:
insert into security(camera, filename, frame, file_type, time_stamp, text_event) values('%t', '%f', '%q', '%n', '%Y-%m-%d %T', '%C')
sql_query insert into security(camera, filename, frame, file_type, time_stamp, event_time_stamp) values('%t', '%f', '%q', '%n', '%Y-%m-%d %T', '%C')
############################################################
# Database Options For MySQL
############################################################
# Mysql database to log to (default: not defined)
mysql_db 'motion'
# The host on which the database is located (default: localhost)
mysql_host localhost
# User account name for MySQL database (default: not defined)
mysql_user root
# User password for MySQL database (default: not defined)
mysql_password '12345'
############################################################
# Database Options For PostgreSQL
############################################################
# PostgreSQL database to log to (default: not defined)
; pgsql_db value
# The host on which the database is located (default: localhost)
; pgsql_host value
# User account name for PostgreSQL database (default: not defined)
; pgsql_user value
# User password for PostgreSQL database (default: not defined)
; pgsql_password value
# Port on which the PostgreSQL database is located (default: 5432)
; pgsql_port 5432
############################################################
# Video Loopback Device (vloopback project)
############################################################
# Output images to a video4linux loopback device
# The value '-' means next available (default: not defined)
; video_pipe value
# Output motion images to a video4linux loopback device
# The value '-' means next available (default: not defined)
; motion_video_pipe value
##############################################################
# Thread config files - One for each camera.
# Except if only one camera - You only need this config file.
# If you have more than one camera you MUST define one thread
# config file for each camera in addition to this config file.
##############################################################
# Remember: If you have more than one camera you must have one
# thread file for each camera. E.g. 2 cameras requires 3 files:
# This motion.conf file AND thread1.conf and thread2.conf.
# Only put the options that are unique to each camera in the
# thread config files.
thread /usr/local/etc/thread1.conf
; thread /usr/local/etc/thread2.conf
; thread /usr/local/etc/thread3.conf
; thread /usr/local/etc/thread4.conf
Kérdésem a következő létrehoztam egy adatbázist motion névvel viszont nem vágom hogy miért nem loggol a motion bele. Ha esetleg valakinek van vmilyen ötlete kérjem írjon.
Előre is köszi.