Feature #745

Add webcam recordings

Added by Hammel 8 months ago. Updated 3 months ago.

Status:In ProgressStart date:01 Mar 2020
Priority:ImmediateDue date:
Assignee:Hammel% Done:


Target version:2.0 - Harkonnen
Severity:03 - Medium


This should be allowed both by manual request and via motion detection.
There should be a playback option for all recordings as well.


#1 Updated by Hammel 3 months ago

  • Priority changed from High to Immediate

#2 Updated by Hammel 3 months ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 10

Recordings from mjpeg-streamer can be done with this command:

  ffmpeg -i //<IP-address>:8085 <file name>.avi

So I just need a keyboard command to run it from picam. Motion detection would do the same thing but that's in RM #744.

#3 Updated by Hammel 3 months ago

General Design

  1. Config option: "-r <file>", recordfile; specifies file to save to; default = picam-<timestamp>.avi
  2. Config option: "-R <dir>", recorddir; specifies directory to save to; default = /media/mmcblk0p3/home/recordings
  3. Config option: "-m <max>", recordmax; specifies maximum number of recordings to save; default = 5
  4. Keyboard control
    1. r = start recording
    2. s = stop recording
  5. Recording setup
    1. Test if stream exists
    2. Make recording directory
    3. Check if recording file exists
      1. Yes: rotate recordings up to max recordings
  6. Start recording
  7. Stop recording

Also available in: Atom PDF