frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
// special case handling: opencv"s frame count sometimes differs from real frame count -> repeat
if frame is None and frames_counter < n_frames:
stop, _, _1, _2, _3, _4 = repeat_image_retrieval(
cap, file_path, video, take_all_frames, steps, frame, prev_frame_none,
frames_counter)
if stop: