Skip to content
andreasloe edited this page Jun 5, 2019 · 4 revisions

PiKrellCam

PiKrellCam is an audio/video recording motion detect program with an OSD web interface that detects motion using the Raspberry Pi camera motion vectors. Audio can be optionally recorded if a USB sound card + microphone is connected.

PiKrellCam's architecture is built around full featured internal motion detection without any dependence on an external motion detect program and it centralizes built in functionality for simplified web page interaction.

Features

  • Camera mjpeg streaming to a web displaying OSD user interface. Text, graphics and motion vectors are overlay drawn on the mjpeg stream. Audio can also be streamed but currently may not work in all browsers.
  • Pi camera MMAL motion vector detection and motion video recording with configurable one second resolution pre capture, post capture and event gap times.
  • Motion detect videos are saved with a corresponding thumbnail image that is a snapshot crop of the moving object in the video. So at a glance you can see the cause of the motion detect (car, animal, person, etc).
  • Built in motion start event, end event and motion preview jpeg save event command execution. Email a motion event jpeg or scp the motion video to one or more off site locations. The above image is a jpeg PiKrellCam emailed to me when it motion detected one of my roadrunners.
  • Motion detect regions of any number, size and position that are real time graphically edited from the web page. Motion regions are configured as presets or can be saved/loaded by name.
  • Real vector processing of the camera motion vectors with multiple passes to get good motion detect sensitivity and noise immunity. Dual motion detect algorithms with configurable sensitivites operate in parallel. One algorithm is tuned to detect smaller (possibly slower moving) objects at a distance and the other is tuned to detect larger or very close objects.
  • Command scheduling for shell scripts, FIFO commands or system commands is built in. Commands can be time and frequency scheduled from a dynamically reloaded arbitrary length list of commands.
  • Video record with pause function and timelapse with hold function for flexible record timings that can be scheduled from the command list.
  • Multiple settings presets which can be cycled through with single clicks of a web page button. Each setting preset can be configured with a set of motion detect regions and motion detect sensitivities.
  • Built in servo control using Pi hardware PWM GPIOs or optionally ServoBlaster. Graphical OSD configuration of servo position presets, servo pan/tilt limits and servo smooth motion timings. Moving between position presets is a single click web page button and each position preset has its own set of multiple settings presets.

The pikrellcam program, source, scripts, and www web files are all installed under /home/pi in the pikrellcam sub directory and the program runs as the user pi. The goal is that the install be as localized as possible, however, the media directory may optionally be relocated to some other convenient location.

This video on youtube shows the PiKrellCam OSD:

And this is a motion detect video PiKrellCam recorded. It demonstrates the pre capture and post capture times which are both set to 5 seconds. Roadrunners don't really fly, but they can hop "fly" into a tree and then glide down from a tree branch which is what this roadrunner did.