pi_video_stream module

class pi_video_stream.pi_video_stream(data_path, recorder)

Bases: object

__init__(data_path, recorder)

Constructor for pi_video_stream object. Creates a PiCamera object and loads the settings from ‘config.ini’ for camera.

Parameters
  • data_path (string) – path to and name of the folder where video(s) will be saved

  • recorder (recorder object) – recorder object; contains information of RFID readers

post_process(fps)

Takes the ‘raw.avi’ video and produces a new video ‘fps_corrected.avi’ such that the latter video has the specified FPS

Parameters

fps (integer) – frame rate (frames per second) to be matched towards

record(duration=None)

Starts a video stream that captures frame by frame and compiles into a video. Also writes the frame count, time stamp, and RFID readings into a text file.

Parameters

duration (integer, optional) – time of record duration in seconds, defaults to None

setdown()

Saves the recording and text file, stops camera preview, and display time and FPS on terminal.