How to use Motion Detection (Dashboard V2)
When motion is detected it is called an event. This tutorial applies to any event, even Object Detections.
Dashboard V3 users please follow this article
This article assumes you have already successfully setup a Monitor.
RTSP / H.264 camera users please be sure to have a peek at this article before moving onward : How I optimized my RTSP camera.
Open the Detector Settings
1. Open the Monitor Settings for the monitor you wish to run Motion Detection on.
2. Set the view to Advanced to reveal Global Detector Settings
3. You may notice in this section that there are a lot of options. Don't be worried.
The best thing to do, if you don't know the selection, is to leave it. Majority of the default options are optimized for a general selection of cameras.
This is how you setup Traditional Recording
In your Identity section set the Mode to Watch-Only. If you have continuous recording enabled Traditional will not work.
In your Global Detector Settings. Let's assume we want to Record a video of 12 seconds starting ~5 seconds before the event.
Enabled | Yes | Enable to reveal and use the other options. |
Send Frames | Yes | Push frames to the connected plugin to be analyzed. |
Allow Next Trigger | 2000 | The amount of milliseconds that needs to pass before allowing the next event registration. |
Save Events to SQL | Yes | Save Motion Events in SQL. This will allow display of events over video during the time events occurred in the Power Video Viewer. |
Detector Rate | 2 | How many frames per second to send to the motion detector. |
Feed-In Image Width | 640 | Width of the image being detected. Smaller sizes take less CPU. |
Feed-In Image Height | 480 | Height of the image being detected. Smaller sizes take less CPU. |
How to Record | Traditional | There are multiple methods to record. Read below on why that is. |
Trigger Record | Yes | When enabled it will give the command to start the recording process. |
Recording Timeout | 0.2 | The amount of time, in minutes, that the video will record for. |
Field | Recommended Option | Description |
---|
Now in the Motion Detection section.
If you would like to use Regions instead of Full Frame Detection then you can launch the Region Editor and create your regions. Set the indifference for them to 1 until you have found the appropriate values for your location.
Use Built-In | Yes | Use Kevin Godell's Motion Detector. This is built into Shinobi and requires no other configuration to activate. |
Indifference | 1 | When using Kevin's Detector Indifference means "minimum percentage changed in region". This option varies based on camera, start with 1 and work your way up. |
Max Indifference (leave blank until comfortable with minimum first) | As the name suggests it is a max value for Indifference. | |
Color Threshold | 9 | The amount of difference allowed in a pixel before it is considered motion. Default is 9. |
Full Frame Detection | Yes | Enabling Full Frame Detection will create a region that covers the entire frame. Only enable this if you aren't using regions made in the Region Editor. |
Trigger Threshold | 1 | Minimum number of detections to fire a motion event. Detections. Default is 1. Don't adjust it until tuning begins. |
Field | Recommended Option | Description |
---|
In your Traditional Recording section set the options below.
Field | Recommended Option | Description |
---|---|---|
Video Encoder | Auto |
The video writer. Shinobi will try to choose the best option for you when selecting Auto. For Manual Selection : RTSP cameras will generally take copy. MJPEG cameras will take libx264. |
Audio Encoder | No Audio | The aduio writer. RTSP cameras will generally take aac. MJPEG cameras must be set to No Audio. |
Segment Length | 2 | Set this to 2 for a buffer of ~5 seconds. |
What is the Region Editor?
Regions are similar to ZoneMinder's "Zones". It is an area that you select on the camera to create an event when motion is detected within it.
In the Region Editor you may see some familiar fields. If they are left blank they will use the values provided in the Motion Detection section in the Monitor Settings window.
- Indifference
- Max Indifference
- Trigger Threshold
- Color Threshold
Click the plus icon to create a region. Click anywhere on the stream to create a point for your region. Right-click the point to remove it. Points are only saved when you press Save on the Monitor Settings window.
To toggle the stream and snapshot of the region editor you can flip the toggle in the bottom left corner labelled "Live Stream Toggle".
If you are trying to use the snapshot and it appears a solid color then you need to enabled JPEG API in the monitor's settings before attempting to use the Region Editor.
Here is an older image of the editor from the gallery.
What is "No Motion" Detector?
When enabled it will set a timer every time there is motion, It will clear the last timer whenever it creates a new timer. If that timer ever gets to the end then you will be notified.
It's probably more aptly put as "No Event" Detector but when it was made only motion was the type of event Shinobi accepted. So it it s reset by object detection as well.
What is the Power Video Viewer?
It is a powerful timeline for your events and videos. It will draw object detection matrices and display the amount of motion that occurred at the time.
To see charts here you will need to have videos and events saving to the database.
Here is an older photo of it from the gallery that illustrates its usefulness.
Why are there multiple ways to record for events?
"How to Record" has multiple options because, in short, I was trying to find the best way to do it.
Originally Hotswap Modes was the only way to record on event but clearly it is has the unavoidable side-effect of missing a few seconds when it switches modes. That is okay only for some circumstances but generally you want to actually catch what happens before the trigger as well.
So I thought up the engine for Traditional. Instead of switching modes it would keep a HLS stream running in the background that could be siphoned at whim. It would hold a few seconds prior to the event, or longer if you wanted. I ended up having a lot of issues with cutting the recorded video so I thought up Delete Motionless as remedy.
Essentially using continuous recording and at the end of every video there would be a check to see if any events were counted during the period of said video. If none are counted then the video would be removed automatically. Of course the downside to this being it would be using disk space all the time and deleting over and over for times where there is nothing happening. This can shorten life of the disk.
After a little while I just accepted for the moment that I couldn't give Traditional the ability to have a dynamic timeout for the video cut off. I put the options for a fixed timeout and with that it worked.
You're probably thinking "so it's incomplete?" in a way it is. In future Traditional will have the ability to reset the timeout for the video cutoff but for now it is fixed to the time you give it in "Recording Timeout".
So moral of the story : Use Traditional. It's only going to get better. The other methods are now left for legacy purposes.