def number_of_frames(self): """Total number of frames in video source.""" return self.source.get(cv2.CAP_PROP_FRAME_COUNT)