title: Opencv skips frame
body: <p>I am trying to detect objects in opencv but anything I try, the program does not process all the frames. It skips and only ends up showing one or two frames each time. Even if I try something simple like this:</p>
  <pre class="lang-py prettyprint-override"><code>import cv2
  
  # Open the video
  cap = cv2.VideoCapture('video-4.mp4')
  
  while(1):
      success, frame = cap.read()
      if success:
          cv2.namedWindow(&quot;hi&quot;, cv2.WINDOW_NORMAL)
          cv2.imshow('hi', frame)
          cv2.waitKey(0)
      else:
          break
  cv2.destroyAllWindows()
  </code></pre>
  <p>It shows the first few frames, and one frame in the middle, and the last frame. I tried similar codes on my friend's computer and it worked. I am not sure what is wrong. Could it be something with my python set up?</p>