Add recording functionality

Use the VideoWriter class from OpenCV to create videos from the
frames during an alarm.