Video Classes

VideoRecorder

class perception.VideoRecorder(device_id, res=(640, 480), codec=’XVID’, fps=30)

Encapsulates video recording processes.

device_id

int – USB index of device

res

2-tuple – resolution of recording and saving. defaults to (640, 480)

codec

str – codec used for encoding video. default to XVID.

fps

int – frames per second of video captures. defaults to 30

start()

Starts the camera recording process.

start_recording(output_file)

Starts recording to a given output video file.

Parameters:output_file (str) – filename to write video to
stop_recording()

Stops writing video to file.

stop()

Stop the camera process.