title: Why does OpenCV cap.get(cv2.CAP_PROP_POS_MSEC) only return 0?
body: <p>I have recently installed OpenCV for PYTHON on my mac by following the tutorial:
  <a href="http://www.pyimagesearch.com/2016/12/19/install-opencv-3-on-macos-with-homebrew-the-easy-way/" rel="nofollow noreferrer">http://www.pyimagesearch.com/2016/12/19/install-opencv-3-on-macos-with-homebrew-the-easy-way/</a></p>
  
  <p>I wrote a code to read a videofile, which is able to retrieve the fps,timestamp,total no. of frames, at each frame that is read:</p>
  
  <pre><code>cap = cv2.VideoCapture(particle_name + video_file_type)
  
  while True:
      time = cap.get(cv2.CAP_PROP_POS_MSEC)
      fps = cap.get(cv2.CAP_PROP_FPS)
      total_frames = cap.get(cv2.CAP_PROP_FRAME_COUNT)
  
      print(time, fps, total_frames)
  
      ret, frame = cap.read()
      cv2.imshow('frame', frame)
  
  cap.release()
  cv2.destroyAllWindows()
  </code></pre>
  
  <p>I tried this code out on Video A, .mov format, Motion JPEG Video (dmb1) codec.
  And Video B, .avi format, Motion JPEG Video (MJPG) codec.</p>
  
  <p>For both Video A and Video B, the fps and total_frames printed out were constants. However, for Video A, time increased gradually (as it should), but for Video B, time remained constant at 0.</p>
  
  <p>I thought it could be the format of the videos that causes this difference so I changed the format of Video B to .mov while retaining the same codec, however the problem still persisted.</p>
  
  <p>May I know how I can retrieve the accurate timestamp from Video B?</p>