How to export download and view events

From ZoneMinder Wiki
Jump to navigationJump to search

--stagecoach 15:34, 23 October 2010 (BST)

Go back to the How To pages...

Prerequisites

To export, download and view the events from ZoneMinder there are 3 prerequisites.

  1. Access to your ZoneMinder website.
  2. An application to unpack the exported files.
    • For Linux most distributions include an application like unzip or untar.
    • For Windows an excellent open source alternative to the default archive manager is 7-Zip

Export Methods

There are three ways to export events from ZoneMinder. Depending on what events you wish to export one of these methods will usually be superior.

Front end interface method

This is the easiest way to view events if you want to check all events in the hour/day/week/month or all events for a certain particular camera.

Steps

ZoneMinder homepage
Events view allows you to select which events to export
  1. Login to ZoneMinder as a user who has rights to view the desired monitor.
  2. From the home page you should see a table with columns labeling camera name events per hour/day/week/month/all. The very bottom column of this table totals the events across all cameras for the given hour/day etc. Click on the total events under the hour row to continue.
  3. You should now be on the event view page. This pages purpose is to list the events selected by your query method. From this view we are provided with many statistics about individual events. We may choose to review the events from this page by clicking on the name of the event, however for the purpose of this how to we will simply choose to export all events by selecting the check-box in the top right cell. After selecting all the events from this view we open up the export dialog by clicking the EXPORT button located in the bottom right corner.
  4. This export options dialog that pops up allows us to select the file type that is exported. Before clicking the export button you must first make sure too check the following settings:
    1. Export Event Details
    2. Export Frame Details
    3. Export File Format: Zip
Typical Export form settings
  1. Once you click the export button ZoneMinder will go through the process of packaging and formatting the events for you, this process can be quite intensive for the server if a large number of events are selected. When the process is completed a download link for a file called zmExport.zip should pop up, select save file and click ok. It is important to make a note of where you save your file as you will need to access it later.

Event Filter

Events Filter form

The filter method of exporting events gives the user the most detail and control in the event query. As this method allows you to make very refined queries it does add some complexity to the process. To illustrate the power of this export method I will show you how Event Filter can create a custom query that is saved for future use, this custom query will select all events that have had more than 50 alarm frames on Mondays.

Steps

  1. On the bottom left side of your ZoneMinder homepage there should be a button labeled "Filter"
  2. The form section under the use filter select box is the area where we will define steps the event filter evaluates. To add the second step for the event filter simply click the + button on the bottom left of the field-set
    1. The first filter should be Alarm Frames - greater than - 50
    2. Your second filter should be and - Weekday - equal to - Monday
  3. To save this event filter method click on the save button. Make sure to write in a descriptive name for the filter.
Events Filter save form box
  1. Executing the event filter after you have saved it is as simple as clicking execute at the bottom of the page.
  2. You should now be on the event view page. This pages purpose is too list the events selected by your query method. From this view we are provided with many statistics about individual events. We may choose to review the events from this page by clicking on the name of the event, however for the purpose of this how to we will simply choose to export all events by selecting the check-box in the top right cell. After selecting all the events from this view we open up the export dialog by clicking the EXPORT button located in the bottom right corner.
  3. This export options dialog that pops up allows us to select the file type that is exported. Before clicking the export button you must first make sure too check the following settings:
    1. Export Event Details
    2. Export Frame Details
    3. Export File Format: Zip
  4. Once you click the export button ZoneMinder will go through the process of packaging and formatting the events for you, this process can be quite intensive for the server if a large number of events are selected. When the process is completed a download link for a file called zmExport.zip should pop up, select save file and click ok. It is important to make a note of where you save your file as you will need to access it later.

Individual camera export

Individual camera view allows you to select specific events
From the individual event view exporting is as simple as clicking export (top left)

This export Method is the simplest way to check and export an individual event that has happened recently on a specific monitor

Steps

  1. From your ZoneMinder homepage open the individual view of a specific camera
  2. On the "watch" view of a monitor the recent events should be listed by date under the live stream. Click on an event from this list to view the individual event.
  3. On the individual event view page you should get a stream of the event. To export this event simply click the Export link located at the top of the page.
  4. This export options dialog that pops up allows us to select the file type that is exported. Before clicking the export button you must first make sure too check the following settings:
    1. Export Event Details
    2. Export Frame Details
    3. Export File Format: Zip
  5. Once you click the export button ZoneMinder will go through the process of packaging and formatting the events for you, this process can be quite intensive for the server if a large number of events are selected. When the process is completed a download link for a file called zmExport.zip should pop up, select save file and click ok. It is important to make a note of where you save your file as you will need to access it later.

Extracting Events

A note about this section of the how to, For the examples i am using a custom export_functions.php plug-in that comes native in stagecoach wireless ZoneMinder installs. Once you have selected your desired set of events you need a logical way to organize them and store them on your computer. My suggestion is too unzip all ZoneMinder exports to a specific folder so you have them all in one place to easily browse and backup.

How to unpack the export files

Most operating systems have many different applications that allow you to extract zoneminder.zip packages. For this example i will show you one way to do this.

Linux

Ready to extract the events folder for viewing
  1. Navigate to the folder where zmexport.zip was downloaded to. In this example i have 4 zmexport.zip files extracted to the folder
  2. Double click opening up the archive manager
  3. Drag the events folder from the archive manager window into another folder. For ease of use i suggest you make a separate folder to store all your ZM export events in.

Windows

  1. Navigate to the folder where zmexport.zip was downloaded to. In this example i have 4 zmexport.zip files extracted to the folder
  2. Right-click the filename and select open with your archive manager (e.g 7-zip, winzip or winrar if you are using windows)
  3. When your archiving software is loaded up you should be able to select the events folder from zmexport.zip and drag it to your desired location in the file structure.

Viewing Extracted Events

zmEventImagesMaster.html has a time-stamp identifier so you can extract multiple events to one folder and still organize them by date

To view the events you have just extracted simply browse to the events folder. To view the interface of all events open up the newest zmEventImagesMaster file in Fire Fox. From this page you get a tabbed view showing you events organized by monitor and chronological order. Within each events view you can display individual frames from the event or meta data about the event date/time/length

Events folder structure

  • events
    • monitor-ids
      • event-ID
        • zmEventDetail.html (this is the file that contains meta data about an individual event)
        • zmEventFrames.html (this is the file containing a listed view of all event frames)
        • xxx-capture.jpg (individual snapshot from the event)
    • zmEventImagesMaster.html (this is the file that acts as the "home" page for each event extraction. you can extract multiple event sets to the events folder and acquire a list of these files