  
  import cv2
  # TODO imageio single frame seek seems slow. Look into this
  # import imageio
  import imageio_ffmpeg as im_ffm
  
  from lib.alignments import Alignments
  from lib.faces_detect import DetectedFace
  from lib.utils import (_image_extensions, _video_extensions, cv2_read_img, hash_image_file,
                         hash_encode_image)
 
</s> remove from socket import timeout as socket_timeout, error as socket_error

 </s> add 
  
  import cv2
  # TODO imageio single frame seek seems slow. Look into this
  # import imageio

  
  from lib.alignments import Alignments
  from lib.faces_detect import DetectedFace
  from lib.utils import (_image_extensions, _video_extensions, cv2_read_img, hash_image_file,
                         hash_encode_image)
keep keep keep keep replace keep keep keep keep keep
 Bugfix: Fix extract/convert hanging when ffmpeg fails to get frame count 
tools/lib_alignments/media.py