Thursday, August 19, 2010

Mens Brazilian Wax Madison

ZoneMinder: Installing and configuring Debian with LXDE

Introduction

ZoneMinder is a suite of video surveillance that can record and monitor IP cameras, CCTV and Webcam connected to a computer with GNU / Linux with support Video For Linux (V4L). It consists of several components and scripts written in Perl and PHP (for web interface). Requires mainly server MySQL database, Apache Web server and ffmpeg.



ZoneMinder installation is not in lenny repositories, but if you are in squeeze where they can be installed.
First, install the necessary services and some other packages for better Management: # aptitude install apache2 libapache2-mod-php5 libapache2-mod-auth-mysql php5 php5-mysql mysql-server mysql-client


After installing ffmpeg:
# aptitude install ffmpeg


Then ZoneMinder installs: # aptitude install

zoneminder
This will install ZoneMinder and all its dependencies and create the database in MySQL zm. Settings




Add the user www-data to group video:

# gpasswd to www-data-video

Add an alias apache ZoneMinder to access the web server and restart or reload the apache configuration for the changes to take effect:
# ln-s / etc / zm / apache.conf / etc/apache2/conf.d / zoneminder.conf
# / etc/init.d/apache2 restart (or restart apache2ctl)
appropriate permissions are set to / usr / bin / zmfix so it can be read and executed by all users:

# chmod 4755 / usr / bin / zmfix
# zmfix-a

Maps to www-data as the owner of the temporary directory of ZoneMinder:

# chown www-data.www-data / usr / share / zoneminder / temp
Edit the file "/ etc / sysctl.conf" and add the following lines (to 128MB shared memory)


kernel.shmmax kernel.shmall = 134217728 = 134217728
is downloaded, unzip and copy Cambozola directory "/ usr / share / zoneminder /" to see the streeming cameras: $ wget http://www.charliemouse.com:8080/code/cambozola/cambozola-latest.tar.gz


$ tar-xvzf Cambozola-latest.tar.gz -0.76 # cp Cambozola / dist / cambozola.jar / usr / share / zoneminder /


then enables the streaming client Cambozola from options ZoneMinder administration console (Options / Images / OPT_CAMBOZOLA).
ZoneMinder by default uses a weak password for user query with the database. Therefore, it is recommended to change the username and password you use ZoneMinder. This is done by editing the file "/ etc / zm / zm.conf" and changing policies and ZM_DB_PASS ZM_DB_USER:
# nano / etc / zm / zm.conf
ZM_DB_USER = nuevouser
ZM_DB_PASS = nuevopasswd
Once modified
the user creates their password in MySQL: $ mysql-

uroot-p
GRANT all ON zm .* to nuevouser @ localhost IDENTIFIED BY 'nuevopasswd'; exit;


Another setting can be changed is the path where to save the events and images (perhaps another disk drive) by changing the symlink to point to the new route:


# rm / usr / share / zoneminder / events
# rm / usr / share / zoneminder / images
# rm / usr / share / zoneminder / temp
# mkdir / path / new / images
# mkdir / path / new / events
# mkdir / path / new / temp

# ln-s / path / new / images / usr / share / zoneminder / images
# ln -s / path / new / events / usr / share / zoneminder / events
# ln-s / path / new / temp / usr / share / zoneminder / temp www.data.www.data # chown-R / path / New /

If monitors have been added, before deleting the symbolic links are to stop the service of ZoneMinder. Once created symbolic links moves the contents of the directory "/ var / cache / zoneminder /" to the new route and the service is started ZoneMinder.


IMPORTANT: When you upgrade ZoneMinder by the package system will delete the links just created and create ones that come by default. So you have to repeat the steps, but first we must be careful to move the events of "/ path / new / events" out of that route because otherwise all events will be deleted when you start ZoneMinder.



Concepts and interesting information


- A monitor is setup either a camera to monitor or record images. Once configured, if done correctly, the camera is enabled and is accessible displays green, otherwise it will show red or orange.
- ZoneMinder console is the Web interface
- An event log is generated by a camera when recording images.
- By default, every 10 minutes (can change) creates a new event that contains the images of the recording.
- The images of the events are saved in the "events /"
- The filter is intended to show certain events based on configurable parameters (date, cause, drive percentage, id the monitor etc). A filter is included by default called PurgeWhenFull automatically eliminates old events when the disk reaches the configured rate.



Options Settings (Options) from the ZoneMinder console
these options are accessed from the link "options" in the main ZoneMinder console. If you make several changes are recommended to restart ZoneMinder to avoid inconsistency or loss of data. It is recommended to change at least the following options:

+ In the "System":
- LANG_DEFAULT option lets you change the language. It changes the language to English (es_AR). Much is not translated English, to continue translating must edit the file "/ usr / share / zoneminder / lang / es_ar.php." - OPT_USE_AUTH option must be marked to allow user authentication. When prompted to save user and default password is admin / admin. Also a tab called "Users" from which you can change the admin user password and create new users with the desired permissions.
+ In the Paths tab (links) can modify the paths in which to store pictures, sounds etc. DIR_EVENTS
leave
events DIR_IMAGES leave
PATH_ZMS images I'm not sure, I read somewhere that was changed to "/ cgi-bin/zms" I'm not sure, because by default is "/ cgi-bin/nph-zms." PATH_LOGS
save path logs. I recommend changed to "/ var / log / zm" (by default brings / tmp)

+ In the Web tab uncheck
WEB_RESIZE_CONSOLE

+ In the "Images" OPT_CAMBOZOLA
PATH_CAMBOZOLA cambozola.jar mark (which was saved earlier) Let STREAM_METHOD
jpeg, but not if there is a difference if you switch to "mpeg", because when I did not notice any difference. PATH_FFMPEG
Leave / usr / bin / ffmpeg


Creating users



+ In the tab "Users" (Users). To display this tab tick the option "OPT_USE_AUTH" from the tab "System."
- It modifies the admin password by clicking on the username. It is recommended not to remove the admin account at least until it created another account with full permissions.
- You create more user accounts. Users can be created with the following permissions:
language for that particular user account
Stream (allows you to view live video from cameras
Events (to view or modify or delete events)
Control (control chambers)
Monitors (allows view and edit screen)
System (determined if the user can view or modify the system settings. As the user or system wide) band width

restrict certain monitors




Settings
monitors multiple monitors can be configured for each camera and each monitor has its own configuration. The following explains the main
>> General tab
+ Source Type: Indicates the type of camera. If the camera is connected locally via USB, you have to choose "Local".
Function: Indicates how to act. The options are as follows. Monitor
.- It is used to monitor a camera without that generates events (not recorded anything)
Modect .- Detection of motion. We analyzed all the images and when motion is detected events are generated. Record
.- Generates events continuously, recording at all times whether or not motion detection
Mocord .- It is the combination of Modect and Record.
Nodect .- Not detected.

+ Enable: This flag if you want to enable the monitor.
+ Monitors Linked: Select other monitors. Can be used to force all cameras to record when motion is detected the monitor
+ Maximum FPS: Limits the maximum number of photos stored in the chamber even though This allows a higher FPS. This option allows the server to ease the burden especially when configured with multiple cameras. ZoneMinder can not change the MJPEG stream that will pass the IP cameras. Some IP cameras allow you to modify the settings directly on your FPS. To use this feature (FPS) method should be used "jpeg" instead of "mjpeg" (In the console Zm: Options, Images, STREAM_METHOD). Maximum Alarm
+ FPS: Allows override the "Maximum FPS" when something happens (eg motion detection)

>> Source tab The options will vary depending on connection type configured on the General tab. For
a camera connected locally, the options are:
On the General tab .- Source Type: Local. Function: Monitor or whatever you want
.- In the Source tab Device Path: / dev/video0 or device as appropriate. Capture Method: Video for Linux version 2. Device Format: PAL. Capture Palette: YUYV.

can view the list of supported hardware including IP cameras with specific configurations on this page

.

For IP Camera D-Link DCS-2102 (which is not included in the list and when I could not because I wanted to add loguearme and the time needed to try to register I could not do) the configuration is as follows for the RTSP:
Source Type: ffmpeg
Source Path: rtsp: / / username: password @ IPCamara/play2.sdp

>> Misc tab
+ Event Prefix: Prefix the name of the event.
+ Section Length: length of events in seconds. It is recommended that the value is between 300 and 900 seconds (5 to 15 min). By default is 600 seconds (10 minutes)



Add / Edit
areas

For each monitor that is created, it automatically generates a zone. An area used to indicate which zone (area) of the sample is used to generate events. You can access or add zones from the main ZoneMinder console in the "Zones".

Name + Label + Area Type: Active: The most frequently used and is defined by default to newly created monitors. Indicates that the area will trigger an alarm in any event that occurs within the area (in points).
Inclusive: This zone type can be used to activate the alarm only when another active zone has activated its alarm. For example, if you want to monitor a room in which there is a door, you can use an area "Active" covering the area of \u200b\u200bthe door and another region, "even" covering the rest of the room.
Exclusive: The alarm will be triggered only in this zone if no alarms were triggered and active areas.
Preclusive:
Inactive: This zone type is the opposite of the active zone. In such areas will not be reported never alarms. Can be used for areas not want to monitor.
+ Presets: contains a predefined list of some common configurations of the area.
+ Units: details whether the following settings will be in percentage or in pixels. It is recommended to use the proportion initially understand.
+ Alarm Colour:
+ Alarm Check Method: AlarmPixels or FilteredPixels
+ Min / Maximum Pixel Threshold:
+ Filter Width / Height: Recommend a small number (3 or 5)
+ Zone Area: + Min / Maximum Alarmed Area: value minimum percentage or pixel shift (which must meet or exceed) to enter the alarm. The maximum must not be exceeded or the alarm is cleared A suitable minimum value can be 10 or 30 if there is little or too much light.
+ Min / Maximum Filtered Area:
+ Min / Maximum Blob Area
+ Min / Maximum Blobs



View


monitors to see what is happening on a monitor must click on the name of the monitor located in the column "Name" from the ZoneMinder console. A window opens with the monitor and the bottom will list the last 10 events of that monitor.




Event Filtering

- In the main ZoneMinder console shows several columns which show the total monitors events filtered by hour, day, week and month.
- In the main console is a button called "Filters" that when clicking on it shows a window where you can create your own filters or edit existing ones. By default this is a filter that removes Unfiled events when the hard disk space reaches 85%.
- The filters consist of one or more conditions to be met configured actions are applied (run a custom command file, create a video and / or delete events) to the events involved.
- To create a filter simply choose one (s) condition (s), specify a value and choose (s) action (s) to apply.
- automated filters are implemented in Perl and analyzed by date, so it is important to use date type fields in formats compatible with PHP and Perl. An example valid in both methods is to use '-3 day' or similar.
- A special type of filter is "Disk Blocks" and "Percent Disk" that are not related to the events but if the hard disk partition where events are stored. These allow you to specify an amount of hard disk usage in blocks or as a percentage returned by the command "df" (referring to amount of hard drive space used and not free).
- To ensure that implement the changes recommended ZoneMinder restart the service.

Example of a filter that removes Unfiled events with more than 30 days of being created: [

] and [

day -30] (another option is the next line change "day" to " days ")
[
] and [

-30 days]
Limit to first 5 results only


Delete all matches before you save or run a filter is recommended to click on the" Submit "to check that events are affected by the filter to avoid mistakes and eliminate unwanted events.



View events To access the event is done from the main ZoneMinder console by clicking on the column that shows the total desired monitor events filtered by hour, day, week or month. A window that lists the events for that monitor. In this window there is a link called "Show Timeline" which opens a new window that displays events in a timeline in graphical form. Stills is useful if the stream does not work or is not supported or you want to access a particular photo. < less than> When you access a particular event in the window are several options to rename the event, delete, edit it (commenting on it), export (for download) archiving, access frames (individual photos), create a video (mpeg) of the event. There is also a link called "Stills" (pictures) that is different from "Frames" that shows thumbnails of individual images of the event and to click opens the image in its normal size. Instead Photos Frames list showing the time in which it occurred. Archive
an event means to be saved and will not show in the normal listings of events. It is useful to store events that are important or that you want to protect from being erased by automatic filters. Once the event is archived you can not accidentally eliminated or unarchive when viewing events are not archived. The option that generates videos using the ffmpeg encoder and by default the videos have the same duration as the event, but can be set before generating the video. Once generated video can be directly downloaded to the local computer and deleted from the server when not required. The process of generating the MPEG video may take several minutes. LOGS < less than>




As already mentioned, from the ZoneMinder console options in PATH_LOGS option you can specify the path where you saved some logs. But a lot of logs are saved in the file "/ var / log / messages" to separate the logs need to edit Zoneminder file "/ etc / sysctl.conf" and add at the beginning of the file the following lines: # Save

ZoneMinder messages to zm.log local1 .* / var / log / zm / zm.log

This will keep the logs of labeled Zoneminder local1 in / var / log / zm / zm.log. " However this does not guarantee that all messages will zm.log ZoneMinder being able to escape something to "/ var / log / messages."



Other interesting information


If apache will hang after some time by the number of connections that are up and they had to restart the service all the time, it would be necessary to amend the following in your "/ Usr / share / zoneminder / ajax / stream.php"

if ($ numSockets === false)
By:

if ($ numSockets === false




0 comments:

Post a Comment