added frame getter
refactored recording part
made two types of recording (ffmpeg and cv2.VideoWriter)