  
      def _get_count_and_filelist(self, fast_count, count):
          if self._is_video:
              self._reader = imageio.get_reader(self.location, "ffmpeg")
              count, video_meta_data = self._reader.get_frame_info(
                  frame_pts=self._video_meta_data.get("pts_time", None),
                  keyframes=self._video_meta_data.get("keyframes", None))
              self._video_meta_data = video_meta_data
          super()._get_count_and_filelist(fast_count, count)
  
 
</s> remove             keyframe_pts, keyframe = self._previous_keyframe_info(index)
            seek_fast = keyframe_pts
            skip_frames = index - keyframe
 </s> add             if self.use_patch:
                keyframe_pts, keyframe = self._previous_keyframe_info(index)
                seek_fast = keyframe_pts
                skip_frames = index - keyframe
            else:
                starttime = index / self._meta["fps"]
                seek_slow = min(10, starttime)
                seek_fast = starttime - seek_slow </s> remove             frames_skipped = 0
            while skip_frames != frames_skipped:
                # Skip frames that are not the desired frame
                _ = self._read_gen.__next__()
                frames_skipped += 1
 </s> add             if self.use_patch:
                frames_skipped = 0
                while skip_frames != frames_skipped:
                    # Skip frames that are not the desired frame
                    _ = self._read_gen.__next__()
                    frames_skipped += 1 </s> remove             if self._frame_pts is None:
 </s> add             if self.use_patch and self._frame_pts is None:
            self._reader.use_patch = True
  
      def _get_count_and_filelist(self, fast_count, count):
          if self._is_video:
              self._reader = imageio.get_reader(self.location, "ffmpeg")
            self._reader.use_patch = True
              count, video_meta_data = self._reader.get_frame_info(
                  frame_pts=self._video_meta_data.get("pts_time", None),
                  keyframes=self._video_meta_data.get("keyframes", None))
              self._video_meta_data = video_meta_data
          super()._get_count_and_filelist(fast_count, count)
  
keep keep keep add keep keep keep keep keep keep
 Bugfix - lib.image - Make patched ffmpeg reader optional 
lib/image.py