Recording only when motion is detected
To start recording only when motion is detected:
- enable MotionDetector_Enabled,
- enable RecordingOnMotion_Enabled,
- adjust RecordingOnMotion_MotionThreshold and RecordingOnMotion_NoMotionPauseDelayMs if required,
- disable RecordingPauseCreatesNewFile to store all the recording in a single AVI file, or enable it to create a new AVI file each time no motion is detected,
- then invoke StartRecording.
RecordingOnMotion_Enabled: specifies to record only when motion is detected.
RecordingOnMotion_MotionThreshold: specifies the minimum motion ratio to (re)start the recording.
RecordingOnMotion_NoMotionPauseDelayMs: specifies the delay after which the recording is switched back to a paused state when no motion is detected.
E.g.:
VideoGrabber1->MotionDetector_Enabled = true;
VideoGrabber1->RecordingCanPause = true;
VideoGrabber1->RecordingOnMotion_Enabled = true;
VideoGrabber1->RecordingOnMotion_NoMotionPauseDelayMs = 2000;
VideoGrabber1->RecordingOnMotion_MotionThreshold = 0.001;
VideoGrabber1->RecordingPauseCreatesNewFile = true;
VideoGrabber1->StartRecording();